diff --git a/index.html b/index.html index ac1577d797d54e6b2502835f61a1ba031c0fa0c0..f0b4dfb9baaee4d7143a16ae4aad29c0272fcfde 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,13 @@ - + diff --git a/package.json b/package.json index e82c9c8eba2a7b5b70da32458e7d196ff85f83df..252b8fc7bca901739b2f2fbf19e7668fa9ef5921 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "canvas-confetti": "^1.4.0", "clipboard": "^2.0.8", "html2canvas": "^1.3.2", + "jszip": "^3.10.0", + "object-hash": "^3.0.0", "perfect-scrollbar": "^1.5.2", "vue": "^3.2.30", "vue-i18n": "^9.2.0-beta.9", @@ -33,6 +35,7 @@ "@babel/preset-typescript": "^7.16.7", "@types/canvas-confetti": "^1.4.2", "@types/jest": "^27.0.2", + "@types/object-hash": "^2.2.1", "@typescript-eslint/eslint-plugin": "^5.11.0", "@typescript-eslint/parser": "^5.11.0", "@vitejs/plugin-vue": "^2.1.0", diff --git a/src/App.vue b/src/App.vue index 4714afa1703c9f45e3a6968eafc7e486c47f8b9e..091e9eb3d7f6861844af334aee3e75eba197dea8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,11 +20,17 @@
- + + +
@@ -57,6 +71,12 @@ + + @@ -64,13 +84,14 @@ diff --git a/src/components/CodeModal.vue b/src/components/Modal/CodeModal.vue similarity index 73% rename from src/components/CodeModal.vue rename to src/components/Modal/CodeModal.vue index ea8e8b1413bdd5e570223d0b83c326c9fdfbe988..b02f96972b6d1d8cdb6babd49c01bbbec302a251 100644 --- a/src/components/CodeModal.vue +++ b/src/components/Modal/CodeModal.vue @@ -1,35 +1,33 @@ + + diff --git a/src/components/VueColorAvatar.vue b/src/components/VueColorAvatar.vue index ef08011722b744f44ca8aea956950aefe72a63fc..da793824883ae03bccb6f8fec9535f61555d34a6 100644 --- a/src/components/VueColorAvatar.vue +++ b/src/components/VueColorAvatar.vue @@ -24,7 +24,7 @@ export interface VueColorAvatarRef { import { ref, toRefs, watchEffect } from 'vue' import { WrapperShape } from '@/enums' -import { type AvatarOption } from '@/types' +import type { AvatarOption } from '@/types' import { getRandomAvatarOption } from '@/utils' import { AVATAR_LAYER, NONE } from '@/utils/constant' import { widgetData } from '@/utils/dynamic-data' diff --git a/src/hooks/useAvatarOption.ts b/src/hooks/useAvatarOption.ts index ab05fc767f8b20bbf7198f9eb83b5e1dd2bc492e..b204899428c1b08a9c3b2de86d2870119cc64dc4 100644 --- a/src/hooks/useAvatarOption.ts +++ b/src/hooks/useAvatarOption.ts @@ -2,7 +2,7 @@ import { computed } from 'vue' import { useStore } from '@/store' import { SET_AVATAR_OPTION } from '@/store/mutation-type' -import { type AvatarOption } from '@/types' +import type { AvatarOption } from '@/types' export default function useAvatarOption() { const store = useStore() diff --git a/src/i18n/locales/en/index.ts b/src/i18n/locales/en/index.ts index 57d04120852b0346ca9508366dd958c448c9c941..1cb145556d81e46d5d2f7dbb3f7c7c07d4ec9ee4 100644 --- a/src/i18n/locales/en/index.ts +++ b/src/i18n/locales/en/index.ts @@ -8,6 +8,7 @@ export default { code: 'code', randomize: 'Randomize', download: 'Download', + downloadMultiple: 'Download multiple', copyCode: 'Copy', copied: 'Copied', downloading: 'Downloading', @@ -39,5 +40,8 @@ export default { text: { codeModalTitle: 'Code', downloadTip: 'LONG PRESS or RIGHT CLICK to save', + downloadMultiple: 'Download', + downloadingMultiple: 'Downloading', + downloadMultipleTip: 'Automatically generate avatar for you', }, } diff --git a/src/i18n/locales/zh/index.ts b/src/i18n/locales/zh/index.ts index 54c691e94203e455218e843baf0554da7879fa76..1f69f678396e576bb570ecb801baf30c9e41a48c 100644 --- a/src/i18n/locales/zh/index.ts +++ b/src/i18n/locales/zh/index.ts @@ -8,6 +8,7 @@ export default { code: '配置代码', randomize: '随机生成', download: '下载头像', + downloadMultiple: '批量下载', copyCode: '复制代码', copied: '已复制', downloading: '准备下载', @@ -39,5 +40,8 @@ export default { text: { codeModalTitle: '配置代码', downloadTip: '长按图片或右键点击下载至本地相册', + downloadMultiple: '开始下载', + downloadingMultiple: '正在下载', + downloadMultipleTip: '已为你自动生成头像', }, } diff --git a/src/layouts/Header.vue b/src/layouts/Header.vue index c97caf206817ff213dcdb7a1fdbd95deaff816e5..c6118ab938dd3f202a75dd3a1376b50158b24ec5 100644 --- a/src/layouts/Header.vue +++ b/src/layouts/Header.vue @@ -11,6 +11,7 @@ rel="nofollow noopener noreferrer" >