diff --git a/components.d.ts b/components.d.ts index bb1d3409..807ba0c4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -46,7 +46,6 @@ declare module 'vue' { IconFluentEyeOff16Regular: typeof import('~icons/fluent/eye-off16-regular')['default'] IconFluentHome20Regular: typeof import('~icons/fluent/home20-regular')['default'] IconFluentKeyboardLayoutFloat20Regular: typeof import('~icons/fluent/keyboard-layout-float20-regular')['default'] - IconFluentMailEdit20Regular: typeof import('~icons/fluent/mail-edit20-regular')['default'] IconFluentMyLocation20Regular: typeof import('~icons/fluent/my-location20-regular')['default'] IconFluentPaddingLeft20Regular: typeof import('~icons/fluent/padding-left20-regular')['default'] IconFluentPerson20Regular: typeof import('~icons/fluent/person20-regular')['default'] @@ -73,10 +72,12 @@ declare module 'vue' { IconFluentWeatherSunny16Regular: typeof import('~icons/fluent/weather-sunny16-regular')['default'] IconIconParkOutlineAddMusic: typeof import('~icons/icon-park-outline/add-music')['default'] IconMaterialSymbolsMail: typeof import('~icons/material-symbols/mail')['default'] + IconPhExportLight: typeof import('~icons/ph/export-light')['default'] IconRiTwitterFill: typeof import('~icons/ri/twitter-fill')['default'] IconSimpleIconsGithub: typeof import('~icons/simple-icons/github')['default'] IconSimpleIconsWechat: typeof import('~icons/simple-icons/wechat')['default'] IconSimpleIconsXiaohongshu: typeof import('~icons/simple-icons/xiaohongshu')['default'] + IconSystemUiconsImport: typeof import('~icons/system-uicons/import')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] SlideHorizontal: typeof import('./src/components/slide/SlideHorizontal.vue')['default'] diff --git a/package.json b/package.json index 8a00e21e..4cada8f7 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,12 @@ "@iconify-json/icon-park-outline": "^1.2.4", "@iconify-json/icon-park-solid": "^1.2.4", "@iconify-json/material-symbols": "^1.2.33", + "@iconify-json/oui": "^1.2.6", + "@iconify-json/ph": "^1.2.2", + "@iconify-json/qlementine-icons": "^1.2.11", "@iconify-json/ri": "^1.2.5", "@iconify-json/simple-icons": "^1.2.48", + "@iconify-json/system-uicons": "^1.2.4", "@types/file-saver": "^2.0.7", "@types/lodash-es": "^4.17.12", "@types/md5": "^2.1.33", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 623f3ebf..58353e20 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,9 +29,6 @@ importers: idb-keyval: specifier: ^6.2.2 version: 6.2.2 - libarchive-wasm: - specifier: ^1.2.0 - version: 1.2.0 md5: specifier: ^2.2.1 version: 2.3.0 @@ -78,18 +75,27 @@ importers: '@iconify-json/material-symbols': specifier: ^1.2.33 version: 1.2.33 + '@iconify-json/oui': + specifier: ^1.2.6 + version: 1.2.6 + '@iconify-json/ph': + specifier: ^1.2.2 + version: 1.2.2 + '@iconify-json/qlementine-icons': + specifier: ^1.2.11 + version: 1.2.11 '@iconify-json/ri': specifier: ^1.2.5 version: 1.2.5 '@iconify-json/simple-icons': specifier: ^1.2.48 version: 1.2.48 + '@iconify-json/system-uicons': + specifier: ^1.2.4 + version: 1.2.4 '@types/file-saver': specifier: ^2.0.7 version: 2.0.7 - '@types/jszip': - specifier: ^3.4.1 - version: 3.4.1 '@types/lodash-es': specifier: ^4.17.12 version: 4.17.12 @@ -508,12 +514,24 @@ packages: '@iconify-json/material-symbols@1.2.33': resolution: {integrity: sha512-Bs0X1+/vpJydW63olrGh60zkR8/Y70sI14AIWaP7Z6YQXukzWANH4q3I0sIPklbIn1oL6uwLvh0zQyd6Vh79LQ==} + '@iconify-json/oui@1.2.6': + resolution: {integrity: sha512-dBqxbLKztTtb0Cq3kEyLeYAdyJT2un+FzIZB0ei3busps/OwNIHjqowsVqPwRtHXiXTjiwOHUPbxgcVB0SCIsQ==} + + '@iconify-json/ph@1.2.2': + resolution: {integrity: sha512-PgkEZNtqa8hBGjHXQa4pMwZa93hmfu8FUSjs/nv4oUU6yLsgv+gh9nu28Kqi8Fz9CCVu4hj1MZs9/60J57IzFw==} + + '@iconify-json/qlementine-icons@1.2.11': + resolution: {integrity: sha512-ipCO0hd9z/SgmzCRsxCB9NGph1rcEp4aQBKGy9YOuDpQc9pwtgbB+yAJkGDfO4CzMDIEBSS6z7tmjk4cE9eHCw==} + '@iconify-json/ri@1.2.5': resolution: {integrity: sha512-kWGimOXMZrlYusjBKKXYOWcKhbOHusFsmrmRGmjS7rH0BpML5A9/fy8KHZqFOwZfC4M6amObQYbh8BqO5cMC3w==} '@iconify-json/simple-icons@1.2.48': resolution: {integrity: sha512-EACOtZMoPJtERiAbX1De0asrrCtlwI27+03c9OJlYWsly9w1O5vcD8rTzh+kDPjo+K8FOVnq2Qy+h/CzljSKDA==} + '@iconify-json/system-uicons@1.2.4': + resolution: {integrity: sha512-9WB9dmEm+TRCXI5Ml2IY8zQAPZES8euKxY0VOaf8D6E6ZaEr7ztO6DChMlGg7qWECs3m3FjFUqNgBx8ZpB+djw==} + '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -830,10 +848,6 @@ packages: '@types/file-saver@2.0.7': resolution: {integrity: sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==} - '@types/jszip@3.4.1': - resolution: {integrity: sha512-TezXjmf3lj+zQ651r6hPqvSScqBLvyPI9FxdXBqpEwBijNGQ2NXpaFW/7joGzveYkKQUil7iiDHLo6LV71Pc0A==} - deprecated: This is a stub types definition. jszip provides its own type definitions, so you do not need this installed. - '@types/lodash-es@4.17.12': resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} @@ -2272,9 +2286,6 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - immediate@3.0.6: - resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} - immutable@5.1.3: resolution: {integrity: sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==} @@ -2506,9 +2517,6 @@ packages: jstoxml@2.2.9: resolution: {integrity: sha512-OYWlK0j+roh+eyaMROlNbS5cd5R25Y+IUpdl7cNdB8HNrkgwQzIS7L9MegxOiWNBj9dQhA/yAxiMwCC5mwNoBw==} - jszip@3.10.1: - resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==} - just-debounce@1.1.0: resolution: {integrity: sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==} @@ -2550,12 +2558,6 @@ packages: resolution: {integrity: sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==} engines: {node: '>= 0.10'} - libarchive-wasm@1.2.0: - resolution: {integrity: sha512-aunFn8oL9VwGRj+brRvdOv8BRUD4Ea1WxJW45IdiuXE2Vp/m/X+M1UxSU+yPzXfc1mPPC8AARaflg/CtF11u8g==} - - lie@3.3.0: - resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} - liftoff@3.1.0: resolution: {integrity: sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==} engines: {node: '>= 0.8'} @@ -2857,9 +2859,6 @@ packages: package-manager-detector@1.3.0: resolution: {integrity: sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ==} - pako@1.0.11: - resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -3181,9 +3180,6 @@ packages: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} engines: {node: '>=0.10.0'} - setimmediate@1.0.5: - resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -4178,6 +4174,18 @@ snapshots: dependencies: '@iconify/types': 2.0.0 + '@iconify-json/oui@1.2.6': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify-json/ph@1.2.2': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify-json/qlementine-icons@1.2.11': + dependencies: + '@iconify/types': 2.0.0 + '@iconify-json/ri@1.2.5': dependencies: '@iconify/types': 2.0.0 @@ -4186,6 +4194,10 @@ snapshots: dependencies: '@iconify/types': 2.0.0 + '@iconify-json/system-uicons@1.2.4': + dependencies: + '@iconify/types': 2.0.0 + '@iconify/types@2.0.0': {} '@iconify/utils@2.3.0': @@ -4426,10 +4438,6 @@ snapshots: '@types/file-saver@2.0.7': {} - '@types/jszip@3.4.1': - dependencies: - jszip: 3.10.1 - '@types/lodash-es@4.17.12': dependencies: '@types/lodash': 4.17.20 @@ -6226,8 +6234,6 @@ snapshots: ieee754@1.2.1: {} - immediate@3.0.6: {} - immutable@5.1.3: {} import-fresh@3.3.1: @@ -6431,13 +6437,6 @@ snapshots: jstoxml@2.2.9: {} - jszip@3.10.1: - dependencies: - lie: 3.3.0 - pako: 1.0.11 - readable-stream: 2.3.8 - setimmediate: 1.0.5 - just-debounce@1.1.0: {} kind-of@3.2.2: @@ -6473,12 +6472,6 @@ snapshots: dependencies: flush-write-stream: 1.1.1 - libarchive-wasm@1.2.0: {} - - lie@3.3.0: - dependencies: - immediate: 3.0.6 - liftoff@3.1.0: dependencies: extend: 3.0.2 @@ -6830,8 +6823,6 @@ snapshots: package-manager-detector@1.3.0: {} - pako@1.0.11: {} - parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -7169,8 +7160,6 @@ snapshots: is-plain-object: 2.0.4 split-string: 3.1.0 - setimmediate@1.0.5: {} - side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 diff --git a/src/App.vue b/src/App.vue index 99e3e45a..ab40fc4e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,7 +4,7 @@ import {BaseState, useBaseStore} from "@/stores/base.ts"; import {useRuntimeStore} from "@/stores/runtime.ts"; import {useSettingStore} from "@/stores/setting.ts"; import useTheme from "@/hooks/theme.ts"; -import {LOCAL_FILE_KEY, SAVE_DICT_KEY, SAVE_SETTING_KEY} from "@/utils/const.ts"; +import {APP_VERSION, LOCAL_FILE_KEY, SAVE_DICT_KEY, SAVE_SETTING_KEY} from "@/utils/const.ts"; import {shakeCommonDict} from "@/utils"; import {routes} from "@/router.ts"; import {get, set} from 'idb-keyval' @@ -36,12 +36,14 @@ watch(store.$state, (n: BaseState) => { let result = [] //删除未使用到的文件 get(LOCAL_FILE_KEY).then((fileList: Array<{ id: string, file: Blob }>) => { - audioFileIdList.forEach(a => { - let item = fileList.find(b => b.id === a) - item && result.push(item) - }) - set(LOCAL_FILE_KEY, result) - lastAudioFileIdList = audioFileIdList + if (fileList && fileList.length > 0) { + audioFileIdList.forEach(a => { + let item = fileList.find(b => b.id === a) + item && result.push(item) + }) + set(LOCAL_FILE_KEY, result) + lastAudioFileIdList = audioFileIdList + } }) } }) @@ -55,6 +57,10 @@ async function init() { await settingStore.init() store.load = true setTheme(settingStore.theme) + + get(APP_VERSION.key).then(r => { + runtimeStore.isNew = r ? (APP_VERSION.version > Number(r)) : true + }) } onMounted(init) @@ -83,13 +89,13 @@ watch(() => route.path, (to, from) => { diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index 7ee78e36..376b71db 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -441,3 +441,7 @@ a { .page-title { @apply text-2xl; } + +.red-point { + @apply bg-red w-3 h-3 rounded-full absolute right-5; +} \ No newline at end of file diff --git a/src/config/ENV.ts b/src/config/ENV.ts index 0335c573..f955394e 100644 --- a/src/config/ENV.ts +++ b/src/config/ENV.ts @@ -1,5 +1,7 @@ export const GITHUB = 'https://github.com/zyronon/TypeWords' export const ProjectName = 'Type Words' +export const Host = '2study.top' +export const Origin = `https://${Host}` const common = { word_dict_list_version: 1 diff --git a/src/pages/pc/article/BatchEditArticlePage.vue b/src/pages/pc/article/BatchEditArticlePage.vue index 808ed391..2c0c5f59 100644 --- a/src/pages/pc/article/BatchEditArticlePage.vue +++ b/src/pages/pc/article/BatchEditArticlePage.vue @@ -1,12 +1,10 @@