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