aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/TimeLine.vue7
-rw-r--r--src/components/icon/CloseIcon.vue (renamed from src/components/icon/MinusIcon.vue)3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index fd119be..7d37ca8 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -48,10 +48,10 @@
</div>
</div>
<!-- Buttons -->
- <icon-button :size="30" class="absolute top-2 right-2"
+ <icon-button v-if="closeable" :size="30" class="absolute top-2 right-2"
:style="{color: store.color.text, backgroundColor: store.color.altDark2}"
@click="emit('remove')" title="Remove timeline">
- <minus-icon/>
+ <close-icon/>
</icon-button>
</div>
</template>
@@ -61,7 +61,7 @@ import {ref, onMounted, computed, watch, watchEffect, PropType, Ref, shallowRef,
// Components
import IconButton from './IconButton.vue';
// Icons
-import MinusIcon from './icon/MinusIcon.vue';
+import CloseIcon from './icon/CloseIcon.vue';
// Other
import {WRITING_MODE_HORZ, MIN_DATE, MAX_DATE, MONTH_SCALE, DAY_SCALE, SCALES,
MIN_CAL_YEAR, HistDate, CalDate, stepDate, inDateScale, getScaleRatio, getUnitDiff, getDaysInMonth,
@@ -78,6 +78,7 @@ const store = useStore();
// Props + events
const props = defineProps({
vert: {type: Boolean, required: true},
+ closeable: {type: Boolean, default: true},
initialState: {type: Object as PropType<TimelineState>, required: true},
eventTree: {type: Object as PropType<RBTree<HistEvent>>, required: true},
});
diff --git a/src/components/icon/MinusIcon.vue b/src/components/icon/CloseIcon.vue
index d316073..dd68c29 100644
--- a/src/components/icon/MinusIcon.vue
+++ b/src/components/icon/CloseIcon.vue
@@ -1,6 +1,7 @@
<template>
<svg viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <line x1="5" y1="12" x2="19" y2="12"/>
+ <line x1="18" y1="6" x2="6" y2="18"/>
+ <line x1="6" y1="6" x2="18" y2="18"/>
</svg>
</template>