fix: updater

This commit is contained in:
reya
2024-07-30 15:47:17 +07:00
parent 0b132b53ad
commit 8195e25b8c
4 changed files with 37 additions and 28 deletions

View File

@@ -70,4 +70,4 @@ jobs:
releaseDraft: true releaseDraft: true
prerelease: false prerelease: false
args: ${{ matrix.args }} args: ${{ matrix.args }}
includeDebug: true includeDebug: false

View File

@@ -17,6 +17,8 @@
"shell:allow-open", "shell:allow-open",
"dialog:default", "dialog:default",
"dialog:allow-open", "dialog:allow-open",
"dialog:allow-ask",
"dialog:allow-message",
"window:allow-close", "window:allow-close",
"window:allow-center", "window:allow-center",
"window:allow-minimize", "window:allow-minimize",
@@ -25,6 +27,9 @@
"window:allow-set-focus", "window:allow-set-focus",
"window:allow-start-dragging", "window:allow-start-dragging",
"decorum:allow-show-snap-overlay", "decorum:allow-show-snap-overlay",
"prevent-default:default" "prevent-default:default",
"updater:default",
"updater:allow-check",
"updater:allow-download-and-install"
] ]
} }

View File

@@ -101,6 +101,7 @@ export function isEmojiOnly(str: string) {
*/ */
export async function checkForAppUpdates(silent: boolean) { export async function checkForAppUpdates(silent: boolean) {
try {
const update = await check(); const update = await check();
if (!update) { if (!update) {
@@ -131,6 +132,9 @@ export async function checkForAppUpdates(silent: boolean) {
await relaunch(); await relaunch();
} }
return;
}
} catch {
return; return;
} }
} }

View File

@@ -256,12 +256,12 @@ function Form() {
) : ( ) : (
<div className="flex-1 flex items-center gap-2"> <div className="flex-1 flex items-center gap-2">
<div className="inline-flex gap-1"> <div className="inline-flex gap-1">
<div {/*<div
title="Attach media" title="Attach media"
className="size-9 inline-flex items-center justify-center hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-full" className="size-9 inline-flex items-center justify-center hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-full"
> >
<Paperclip className="size-5" /> <Paperclip className="size-5" />
</div> </div>*/}
</div> </div>
<input <input
placeholder="Message..." placeholder="Message..."