From 1b171cab6638e54ed1fe987f5b06debb3562430a Mon Sep 17 00:00:00 2001 From: Kwaroran Date: Thu, 6 Feb 2025 09:48:55 +0900 Subject: [PATCH] Update version, gemini models, and new progress dialoge, and charxjpeg --- package.json | 1 + pnpm-lock.yaml | 58 ++++++++++++++++++-- src-tauri/tauri.conf.json | 2 +- src/App.svelte | 4 -- src/lib/Others/AlertComp.svelte | 15 +++++- src/lib/Others/SavePopupIcon.svelte | 21 +------- src/lib/UI/Googli.svelte | 48 +++++++++++------ src/lib/UI/Realm/RealmPopUp.svelte | 5 ++ src/styles.css | 17 ++++++ src/ts/alert.ts | 2 +- src/ts/characterCards.ts | 84 +++++++++++++++++++++++------ src/ts/model/modellist.ts | 22 +++++++- src/ts/process/processzip.ts | 7 +-- src/ts/process/request.ts | 4 ++ src/ts/storage/accountStorage.ts | 8 --- src/ts/storage/database.svelte.ts | 2 +- version.json | 2 +- vite.config.ts | 11 ++-- 18 files changed, 231 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index 12fb5a0a..1bd9395a 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "devDependencies": { "@capacitor/assets": "^3.0.4", "@capacitor/cli": "^5.6.0", + "@rollup/plugin-strip": "^3.0.4", "@sveltejs/vite-plugin-svelte": "^4.0.0", "@swc/core": "1.5.7", "@tailwindcss/typography": "^0.5.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8dad0810..726b3c9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,6 +228,9 @@ importers: '@capacitor/cli': specifier: ^5.6.0 version: 5.6.0 + '@rollup/plugin-strip': + specifier: ^3.0.4 + version: 3.0.4(rollup@3.29.4) '@sveltejs/vite-plugin-svelte': specifier: ^4.0.0 version: 4.0.0(svelte@5.1.9)(vite@5.4.9(@types/node@18.19.7)) @@ -299,7 +302,7 @@ importers: version: 5.1.9 svelte-check: specifier: ^4.0.5 - version: 4.0.5(svelte@5.1.9)(typescript@5.6.3) + version: 4.0.5(picomatch@4.0.2)(svelte@5.1.9)(typescript@5.6.3) svelte-preprocess: specifier: ^6.0.0 version: 6.0.3(postcss-load-config@4.0.2(postcss@8.4.33)(ts-node@10.9.2(@swc/core@1.5.7)(@types/node@18.19.7)(typescript@5.6.3)))(postcss@8.4.33)(svelte@5.1.9)(typescript@5.6.3) @@ -869,6 +872,15 @@ packages: '@risuai/ccardlib@0.4.1': resolution: {integrity: sha512-b9xL0umf772icKnKfTIyP/hU1Skfikd5/MbmUFI9PXpbpMxbGQMw0NqpTFHda2iFu6Qxhpigr8bheAE8zxoYnw==} + '@rollup/plugin-strip@3.0.4': + resolution: {integrity: sha512-LDRV49ZaavxUo2YoKKMQjCxzCxugu1rCPQa0lDYBOWLj6vtzBMr8DcoJjsmg+s450RbKbe3qI9ZLaSO+O1oNbg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/plugin-virtual@3.0.2': resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} @@ -878,6 +890,15 @@ packages: rollup: optional: true + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.24.0': resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} cpu: [arm] @@ -2004,6 +2025,9 @@ packages: esrap@1.2.2: resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -3019,6 +3043,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -4549,10 +4577,26 @@ snapshots: '@risuai/ccardlib@0.4.1': {} + '@rollup/plugin-strip@3.0.4(rollup@3.29.4)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@3.29.4) + estree-walker: 2.0.2 + magic-string: 0.30.12 + optionalDependencies: + rollup: 3.29.4 + '@rollup/plugin-virtual@3.0.2(rollup@3.29.4)': optionalDependencies: rollup: 3.29.4 + '@rollup/pluginutils@5.1.4(rollup@3.29.4)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 3.29.4 + '@rollup/rollup-android-arm-eabi@4.24.0': optional: true @@ -5695,6 +5739,8 @@ snapshots: '@jridgewell/sourcemap-codec': 1.5.0 '@types/estree': 1.0.6 + estree-walker@2.0.2: {} + etag@1.8.1: {} eventemitter3@4.0.7: {} @@ -5771,7 +5817,9 @@ snapshots: dependencies: pend: 1.2.0 - fdir@6.4.2: {} + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 fflate@0.6.10: {} @@ -6752,6 +6800,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + pify@2.3.0: {} pify@3.0.0: {} @@ -7325,11 +7375,11 @@ snapshots: dependencies: svelte: 5.1.9 - svelte-check@4.0.5(svelte@5.1.9)(typescript@5.6.3): + svelte-check@4.0.5(picomatch@4.0.2)(svelte@5.1.9)(typescript@5.6.3): dependencies: '@jridgewell/trace-mapping': 0.3.25 chokidar: 4.0.1 - fdir: 6.4.2 + fdir: 6.4.2(picomatch@4.0.2) picocolors: 1.0.1 sade: 1.8.1 svelte: 5.1.9 diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 9934b31e..c4672b73 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -29,7 +29,7 @@ }, "productName": "RisuAI", "mainBinaryName": "RisuAI", - "version": "149.0.0", + "version": "149.1.0", "identifier": "co.aiclient.risu", "plugins": { "updater": { diff --git a/src/App.svelte b/src/App.svelte index f372579b..68a3873b 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -18,7 +18,6 @@ import MobileFooter from './lib/Mobile/MobileFooter.svelte'; import CustomGUISettingMenu from './lib/Setting/Pages/CustomGUISettingMenu.svelte'; import { checkCharOrder } from './ts/globalApi.svelte'; - import Googli from './lib/UI/Googli.svelte'; let didFirstSetup: boolean = $derived(DBState.db?.didFirstSetup) @@ -51,9 +50,6 @@ {LoadingStatusState.text} - - - {:else if $CustomGUISettingMenuStore} diff --git a/src/lib/Others/AlertComp.svelte b/src/lib/Others/AlertComp.svelte index 030a8412..16273635 100644 --- a/src/lib/Others/AlertComp.svelte +++ b/src/lib/Others/AlertComp.svelte @@ -25,6 +25,7 @@ import { getCurrentCharacter } from "src/ts/storage/database.svelte"; import { message } from "@tauri-apps/plugin-dialog"; import HypaV3Modal from './HypaV3Modal.svelte'; + import Googli from "../UI/Googli.svelte"; let btn let input = $state('') let cardExportType = $state('realm') @@ -107,10 +108,22 @@ }}>Terms of Service to continue {:else if $alertStore.type !== 'select' && $alertStore.type !== 'requestdata' && $alertStore.type !== 'addchar' && $alertStore.type !== 'hypaV2' && $alertStore.type !== 'chatOptions'} {$alertStore.msg} - {#if $alertStore.submsg} + {#if $alertStore.submsg && $alertStore.type !== 'progress'} {$alertStore.submsg} {/if} {/if} + {#if $alertStore.type === 'progress'} +
+
+
+
+ {$alertStore.submsg + '%'} +
+
+ +
+ {/if} + {#if $alertStore.type === 'ask'}
-{/if} - - \ No newline at end of file +{/if} \ No newline at end of file diff --git a/src/lib/UI/Googli.svelte b/src/lib/UI/Googli.svelte index 736c5d04..03738d80 100644 --- a/src/lib/UI/Googli.svelte +++ b/src/lib/UI/Googli.svelte @@ -1,27 +1,43 @@ -{#if !import.meta.env.VITE_AD_CLIENT} -
- -
+{#if import.meta.env.VITE_AD_CLIENT} + {#if import.meta.env.VITE_AD_CLIENT === 'TEST'} +
+
728 ? "display:block !important;width:728px;height:90px" : "display:block !important;width:300px;height:100px"} + >TEST
+
+ {:else} +
+ 728 ? "display:block !important;width:728px;height:90px" : "display:block !important;width:300px;height:100px"} + data-ad-client={window.innerWidth > 728 ? import.meta.env.VITE_AD_CLIENT : import.meta.env.VITE_AD_CLIENT_MOBILE} + data-ad-slot={window.innerWidth > 728 ? import.meta.env.VITE_AD_SLOT : import.meta.env.VITE_AD_SLOT_MOBILE} + > +
+ {/if} {/if} \ No newline at end of file diff --git a/src/lib/UI/Realm/RealmPopUp.svelte b/src/lib/UI/Realm/RealmPopUp.svelte index 6fef1cbb..7cd78753 100644 --- a/src/lib/UI/Realm/RealmPopUp.svelte +++ b/src/lib/UI/Realm/RealmPopUp.svelte @@ -8,6 +8,7 @@ import RealmLicense from "./RealmLicense.svelte"; import MultiLangDisplay from "../GUI/MultiLangDisplay.svelte"; import { tooltip } from "src/ts/gui/tooltip"; + import Googli from "../Googli.svelte"; interface Props { openedData: hubType; @@ -50,6 +51,7 @@ {language.popularityLevel.replace('{}', openedData.download.toString())} +
{#if openedData.hasEmotion}
+ + +