Skip to content

Commit f43bf27

Browse files
committed
polish(snippets): hide top border for screenshot tools if fragments is shown
1 parent 85eaa64 commit f43bf27

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/renderer/components/screenshot/TheScreenshot.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<template>
22
<div class="snippet-screenshot">
3-
<div class="tools">
3+
<div
4+
class="tools"
5+
:class="{ 'no-top-border': snippetStore.isFragmentsShow }"
6+
>
47
<div class="left">
58
<div class="tools__item">
69
<AppCheckbox
@@ -103,6 +106,7 @@ import interact from 'interactjs'
103106
import { computed, onMounted, ref, watch } from 'vue'
104107
import { useHljsTheme } from '@/composable'
105108
import { store } from '@/electron'
109+
import { useSnippetStore } from '@/store/snippets'
106110
107111
const GUTTER_RIGHT_OFFSET = 10
108112
const GUTTER_WIDTH = 8
@@ -118,6 +122,7 @@ interface Props {
118122
const props = defineProps<Props>()
119123
120124
const appStore = useAppStore()
125+
const snippetStore = useSnippetStore()
121126
122127
const frameRef = ref<HTMLElement>()
123128
const snippetRef = ref<HTMLElement>()
@@ -257,11 +262,11 @@ init()
257262
display: flex;
258263
justify-content: space-between;
259264
align-items: center;
260-
261265
padding: 4px var(--spacing-xs);
262266
border-top: 1px solid var(--color-border);
263267
border-bottom: 1px solid var(--color-border);
264-
&__item {
268+
&.no-top-border {
269+
border-top: none;
265270
}
266271
.left {
267272
gap: var(--spacing-sm);

0 commit comments

Comments
 (0)