Browse Source

Fix TaskPanel width

mj-deploy
Standa Lukeš 4 years ago
parent
commit
db787ab896
  1. 12
      frontend/src/TaskPanel.svelte

12
frontend/src/TaskPanel.svelte

@ -1,5 +1,6 @@
<script lang="ts">
import { grabAssignment } from "./ksp-task-grabber";
import type { TaskAssignmentData } from "./ksp-task-grabber";
import type { TasksFile, TaskDescriptor } from "./task-loader";
import TaskDisplay from "./TaskDisplay.svelte";
@ -8,9 +9,6 @@ import TaskDisplay from "./TaskDisplay.svelte";
let heightClass: "collapsed" | "full" | "preview" = "collapsed"
let taskPromise: Promise<string | null>
export function preSelect(task: TaskDescriptor) {
if (heightClass != "full") {
selectedTask = task
@ -30,20 +28,16 @@ import TaskDisplay from "./TaskDisplay.svelte";
selectedTask = task
heightClass = "full"
}
$: {
if (selectedTask != null)
taskPromise = grabAssignment(selectedTask.id)
}
</script>
<style>
.panel {
position: absolute;
width: calc(100%-200px);
width: 100%;
background-color: #222;
overflow: hidden;
padding: 0 100px 0 100px;
box-sizing: border-box;
}
.panel.collapsed:not(:hover) {
display: none;