Skip to content

Commit 82801a6

Browse files
committed
patch modals don't close after button press
1 parent d481538 commit 82801a6

File tree

7 files changed

+10
-15
lines changed

7 files changed

+10
-15
lines changed

components.d.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
declare module 'vue' {
66
export interface GlobalComponents {
77
Content: typeof import('./src/components/Content.vue')['default']
8-
Editor: typeof import('./src/components/Editor.vue')['default']
98
ExportModal: typeof import('./src/components/exportModal.vue')['default']
10-
HoverArea: typeof import('./src/components/HoverArea.vue')['default']
119
HoverCorner: typeof import('./src/components/HoverCorner.vue')['default']
1210
'IGrommetIcons:documentWord': typeof import('~icons/grommet-icons/document-word')['default']
1311
'IMdi:arrowTopLeftThinCircleOutline': typeof import('~icons/mdi/arrow-top-left-thin-circle-outline')['default']
@@ -16,9 +14,6 @@ declare module 'vue' {
1614
'IMdi:spellcheck': typeof import('~icons/mdi/spellcheck')['default']
1715
'IMdi:themeLightDark': typeof import('~icons/mdi/theme-light-dark')['default']
1816
'IRi:settings3Line': typeof import('~icons/ri/settings3-line')['default']
19-
NCard: typeof import('naive-ui')['NCard']
20-
NDrawer: typeof import('naive-ui')['NDrawer']
21-
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
2217
NH2: typeof import('naive-ui')['NH2']
2318
NInput: typeof import('naive-ui')['NInput']
2419
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
@@ -27,8 +22,8 @@ declare module 'vue' {
2722
NSwitch: typeof import('naive-ui')['NSwitch']
2823
NTooltip: typeof import('naive-ui')['NTooltip']
2924
Options: typeof import('./src/components/Options.vue')['default']
25+
ShortcutModal: typeof import('./src/components/shortcutModal.vue')['default']
3026
Toolbar: typeof import('./src/components/Toolbar.vue')['default']
31-
WordCount: typeof import('./src/components/WordCount.vue')['default']
3227
}
3328
}
3429

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "window-reader",
3-
"version": "1.2.4",
3+
"version": "1.2.5",
44
"scripts": {
55
"dev": "tauri dev",
66
"build": "tauri build"

src-tauri/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "window_reader"
3-
version = "1.2.4"
3+
version = "1.2.5"
44
description = "A transparent notepad-like app"
55
authors = ["Ripwords"]
66
license = ""

src-tauri/tauri.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"package": {
33
"productName": "window-reader",
4-
"version": "1.2.4"
4+
"version": "1.2.5"
55
},
66
"build": {
77
"distDir": "../dist",

src/components/Content.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ await shortcutRegister()
227227
>
228228
<n-input type="text" v-model:value="store.exportName"></n-input>
229229
<div class="text-size-[30px] flex justify-end p-2">
230-
<button :theme-overridess="store.themeOverrides"><i-mdi:file-pdf class="m-[0.7rem]" @click="export2PDF()"></i-mdi:file-pdf></button>
231-
<button :theme-overridess="store.themeOverrides"><i-mdi:file-word class="m-[0.7rem]" @click="export2Word()"></i-mdi:file-word></button>
230+
<button :theme-overridess="store.themeOverrides"><i-mdi:file-pdf class="m-[0.7rem]" @click="export2PDF(); shortcutModal = false"></i-mdi:file-pdf></button>
231+
<button :theme-overridess="store.themeOverrides"><i-mdi:file-word class="m-[0.7rem]" @click="export2Word(); shortcutModal = false"></i-mdi:file-word></button>
232232
</div>
233233
</n-modal>
234234
<n-modal

src/components/exportModal.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const store = mainStore()
55
const props = defineProps<{
66
type: string,
77
show: boolean,
8-
func: Function
8+
func: any
99
}>()
1010
const emit = defineEmits(["close"])
1111
const showModal = ref(props.show)
@@ -27,8 +27,8 @@ watch(props, () => {
2727
<n-input type="text" v-model:value="store.exportName"></n-input>
2828
<div class="text-size-[30px] flex justify-end p-2">
2929
<button :theme-overridess="store.themeOverrides">
30-
<i-mdi:file-pdf v-if="props.type == 'pdf'" class="m-[0.7rem]" @click="func"></i-mdi:file-pdf>
31-
<i-grommet-icons:document-word v-if="props.type == 'word'" class="m-[0.7rem]" @click="func"></i-grommet-icons:document-word>
30+
<i-mdi:file-pdf v-if="props.type == 'pdf'" class="m-[0.7rem]" @click="props.func(); emit('close')"></i-mdi:file-pdf>
31+
<i-grommet-icons:document-word v-if="props.type == 'word'" class="m-[0.7rem]" @click="props.func(); emit('close')"></i-grommet-icons:document-word>
3232
</button>
3333
</div>
3434
</n-modal>

0 commit comments

Comments
 (0)