From 4f69bb8880f0f75fc60030b39ee455a64a441650 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Tue, 5 Nov 2024 20:15:17 +0900 Subject: [PATCH] Add loggen related stuff and fix bugs --- src-tauri/capabilities/migrated.json | 1 + src-tauri/gen/schemas/capabilities.json | 2 +- src/lang/en.ts | 2 + src/lib/ChatScreens/Chat.svelte | 15 +- src/lib/Others/AlertComp.svelte | 13 +- src/lib/Setting/Pages/DisplaySettings.svelte | 4 + src/ts/alert.ts | 2 +- src/ts/characterCards.ts | 8 +- src/ts/loggen.ts | 754 +++++++++++++++++++ src/ts/storage/database.svelte.ts | 1 + src/ts/update.ts | 2 +- 11 files changed, 795 insertions(+), 9 deletions(-) create mode 100644 src/ts/loggen.ts diff --git a/src-tauri/capabilities/migrated.json b/src-tauri/capabilities/migrated.json index c08f013c..e3d6abea 100644 --- a/src-tauri/capabilities/migrated.json +++ b/src-tauri/capabilities/migrated.json @@ -35,6 +35,7 @@ "dialog:allow-message", "dialog:allow-ask", "dialog:allow-confirm", + "updater:default", { "identifier": "http:default", "allow": [ diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json index bac4c1ed..bcf62660 100644 --- a/src-tauri/gen/schemas/capabilities.json +++ b/src-tauri/gen/schemas/capabilities.json @@ -1 +1 @@ -{"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"permissions":["updater:default","process:default","shell:default","http:default","deep-link:default"],"platforms":["macOS","windows","linux"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:default","fs:allow-read-file","fs:allow-write-file","fs:allow-read-dir","fs:allow-copy-file","fs:allow-mkdir","fs:allow-remove","fs:allow-remove","fs:allow-rename","fs:allow-exists",{"identifier":"fs:scope","allow":["$APPDATA","$APPDATA/*","$APPDATA/**/*","$DOWNLOAD/*","/data/**/*","$RESOURCE/*"]},"core:window:allow-maximize","core:window:allow-set-fullscreen","shell:allow-open","dialog:allow-open","dialog:allow-save","dialog:allow-message","dialog:allow-ask","dialog:allow-confirm",{"identifier":"http:default","allow":[{"url":"https://*/*"},{"url":"https://*/**/*"},{"url":"http://*/*"},{"url":"http://*/**/*"}]},"os:allow-platform","os:allow-version","os:allow-os-type","os:allow-family","os:allow-arch","os:allow-exe-extension","os:allow-locale","os:allow-hostname","process:allow-restart","core:app:allow-app-show","core:app:allow-app-hide","fs:default","os:default","dialog:default","process:default","shell:default","http:default","deep-link:default"]}} \ No newline at end of file +{"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"permissions":["updater:default","process:default","shell:default","http:default","deep-link:default"],"platforms":["macOS","windows","linux"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:default","fs:allow-read-file","fs:allow-write-file","fs:allow-read-dir","fs:allow-copy-file","fs:allow-mkdir","fs:allow-remove","fs:allow-remove","fs:allow-rename","fs:allow-exists",{"identifier":"fs:scope","allow":["$APPDATA","$APPDATA/*","$APPDATA/**/*","$DOWNLOAD/*","/data/**/*","$RESOURCE/*"]},"core:window:allow-maximize","core:window:allow-set-fullscreen","shell:allow-open","dialog:allow-open","dialog:allow-save","dialog:allow-message","dialog:allow-ask","dialog:allow-confirm","updater:default",{"identifier":"http:default","allow":[{"url":"https://*/*"},{"url":"https://*/**/*"},{"url":"http://*/*"},{"url":"http://*/**/*"}]},"os:allow-platform","os:allow-version","os:allow-os-type","os:allow-family","os:allow-arch","os:allow-exe-extension","os:allow-locale","os:allow-hostname","process:allow-restart","core:app:allow-app-show","core:app:allow-app-hide","fs:default","os:default","dialog:default","process:default","shell:default","http:default","deep-link:default"]}} \ No newline at end of file diff --git a/src/lang/en.ts b/src/lang/en.ts index 1ef9c394..f60817ff 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -751,4 +751,6 @@ export const languageEnglish = { groupOtherBotRole: "Non-Speaker Role in Group", defineCustomGUI: "Define Custom GUI", chatHTML: "Chat HTML", + logShare: "Show Share Log Button", + preview: "Preview", } \ No newline at end of file diff --git a/src/lib/ChatScreens/Chat.svelte b/src/lib/ChatScreens/Chat.svelte index ba1d9bec..3eac694b 100644 --- a/src/lib/ChatScreens/Chat.svelte +++ b/src/lib/ChatScreens/Chat.svelte @@ -1,11 +1,11 @@