From d15c1636bdcf3274392f881bd5321db9f60b041c Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 7 Jul 2022 16:50:50 +0800 Subject: [PATCH] feat: config formkit styles Signed-off-by: Ryan Wang --- package.json | 15 +- pnpm-lock.yaml | 134 +++++++++++++----- src/formkit/formkit.config.ts | 11 ++ src/formkit/theme.ts | 79 +++++++++++ .../contents/attachments/AttachmentList.vue | 12 +- src/modules/contents/comments/CommentList.vue | 7 +- src/modules/contents/pages/PageList.vue | 12 +- src/modules/contents/posts/PostList.vue | 22 ++- src/modules/interface/themes/ThemeDetail.vue | 77 ++-------- src/modules/interface/themes/Visual.vue | 90 +++--------- src/modules/system/plugins/PluginDetail.vue | 45 ++---- src/modules/system/plugins/PluginList.vue | 12 +- src/modules/system/roles/RoleList.vue | 6 +- .../roles/components/RoleCreationModal.vue | 61 ++++---- .../system/settings/GeneralSettings.vue | 78 ++-------- .../system/settings/NotificationSettings.vue | 65 ++------- src/modules/system/users/Login.vue | 5 +- src/modules/system/users/PasswordChange.vue | 50 ++----- .../system/users/PersonalAccessTokens.vue | 29 +--- .../system/users/ProfileModification.vue | 76 ++++------ src/modules/system/users/UserList.vue | 7 +- .../users/components/UserCreationModal.vue | 115 ++++++--------- src/setup/setupComponents.ts | 12 +- tailwind.config.js | 1 + 24 files changed, 423 insertions(+), 598 deletions(-) create mode 100644 src/formkit/formkit.config.ts create mode 100644 src/formkit/theme.ts diff --git a/package.json b/package.json index 4493e453..a72cff7b 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,15 @@ "packages/*" ], "dependencies": { + "@formkit/core": "1.0.0-beta.9", + "@formkit/i18n": "1.0.0-beta.9", + "@formkit/inputs": "1.0.0-beta.9", "@formkit/themes": "1.0.0-beta.9", "@formkit/vue": "1.0.0-beta.9", "@halo-dev/admin-api": "^1.1.0", "@halo-dev/admin-shared": "workspace:*", "@halo-dev/components": "workspace:*", - "@vueuse/core": "^8.7.5", + "@vueuse/core": "^8.9.0", "filepond": "^4.30.4", "filepond-plugin-image-preview": "^4.6.11", "floating-vue": "2.0.0-beta.16", @@ -41,7 +44,7 @@ "vue": "^3.2.37", "vue-filepond": "^7.0.3", "vue-grid-layout": "3.0.0-beta1", - "vue-router": "^4.0.16" + "vue-router": "^4.1.1" }, "devDependencies": { "@rushstack/eslint-patch": "^1.1.4", @@ -57,14 +60,14 @@ "@vue/compiler-sfc": "^3.2.37", "@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-typescript": "^11.0.0", - "@vue/test-utils": "^2.0.1", + "@vue/test-utils": "^2.0.2", "@vue/tsconfig": "^0.1.3", "autoprefixer": "^10.4.7", "c8": "^7.11.3", "cypress": "^9.7.0", "eslint": "^8.19.0", "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-vue": "^9.1.1", + "eslint-plugin-vue": "^9.2.0", "husky": "^8.0.1", "jsdom": "^19.0.0", "postcss": "^8.4.14", @@ -80,9 +83,9 @@ "vite-compression-plugin": "^0.0.4", "vite-plugin-externals": "^0.5.0", "vite-plugin-pwa": "^0.12.2", - "vite-plugin-static-copy": "^0.6.0", + "vite-plugin-static-copy": "^0.6.1", "vite-plugin-vue-setup-extend": "^0.4.0", "vitest": "^0.16.0", - "vue-tsc": "^0.38.2" + "vue-tsc": "^0.38.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfb1e375..d686bd45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ importers: .: specifiers: + '@formkit/core': 1.0.0-beta.9 + '@formkit/i18n': 1.0.0-beta.9 + '@formkit/inputs': 1.0.0-beta.9 '@formkit/themes': 1.0.0-beta.9 '@formkit/vue': 1.0.0-beta.9 '@halo-dev/admin-api': ^1.1.0 @@ -22,15 +25,15 @@ importers: '@vue/compiler-sfc': ^3.2.37 '@vue/eslint-config-prettier': ^7.0.0 '@vue/eslint-config-typescript': ^11.0.0 - '@vue/test-utils': ^2.0.1 + '@vue/test-utils': ^2.0.2 '@vue/tsconfig': ^0.1.3 - '@vueuse/core': ^8.7.5 + '@vueuse/core': ^8.9.0 autoprefixer: ^10.4.7 c8: ^7.11.3 cypress: ^9.7.0 eslint: ^8.19.0 eslint-plugin-cypress: ^2.12.1 - eslint-plugin-vue: ^9.1.1 + eslint-plugin-vue: ^9.2.0 filepond: ^4.30.4 filepond-plugin-image-preview: ^4.6.11 floating-vue: 2.0.0-beta.16 @@ -53,21 +56,24 @@ importers: vite-compression-plugin: ^0.0.4 vite-plugin-externals: ^0.5.0 vite-plugin-pwa: ^0.12.2 - vite-plugin-static-copy: ^0.6.0 + vite-plugin-static-copy: ^0.6.1 vite-plugin-vue-setup-extend: ^0.4.0 vitest: ^0.16.0 vue: ^3.2.37 vue-filepond: ^7.0.3 vue-grid-layout: 3.0.0-beta1 - vue-router: ^4.0.16 - vue-tsc: ^0.38.2 + vue-router: ^4.1.1 + vue-tsc: ^0.38.3 dependencies: + '@formkit/core': 1.0.0-beta.9 + '@formkit/i18n': 1.0.0-beta.9 + '@formkit/inputs': 1.0.0-beta.9 '@formkit/themes': 1.0.0-beta.9_tailwindcss@3.1.4 '@formkit/vue': 1.0.0-beta.9_rkpirzljteu3gouykqigqhmb7i '@halo-dev/admin-api': 1.1.0 '@halo-dev/admin-shared': link:packages/shared '@halo-dev/components': link:packages/components - '@vueuse/core': 8.7.5_vue@3.2.37 + '@vueuse/core': 8.9.0_vue@3.2.37 filepond: 4.30.4 filepond-plugin-image-preview: 4.6.11_filepond@4.30.4 floating-vue: 2.0.0-beta.16_vue@3.2.37 @@ -78,7 +84,7 @@ importers: vue: 3.2.37 vue-filepond: 7.0.3_filepond@4.30.4+vue@3.2.37 vue-grid-layout: 3.0.0-beta1 - vue-router: 4.0.16_vue@3.2.37 + vue-router: 4.1.1_vue@3.2.37 devDependencies: '@rushstack/eslint-patch': 1.1.4 '@tailwindcss/aspect-ratio': 0.4.0_tailwindcss@3.1.4 @@ -92,15 +98,15 @@ importers: '@vitest/ui': 0.16.0 '@vue/compiler-sfc': 3.2.37 '@vue/eslint-config-prettier': 7.0.0_exbhzpnbupd3ikhi4722x4yn6e - '@vue/eslint-config-typescript': 11.0.0_rbwfxavh274jq5nrli6gjtdzua - '@vue/test-utils': 2.0.1_vue@3.2.37 + '@vue/eslint-config-typescript': 11.0.0_hko2ljsyixuca7xzzs7dalplrm + '@vue/test-utils': 2.0.2_vue@3.2.37 '@vue/tsconfig': 0.1.3_@types+node@17.0.45 autoprefixer: 10.4.7_postcss@8.4.14 c8: 7.11.3 cypress: 9.7.0 eslint: 8.19.0 eslint-plugin-cypress: 2.12.1_eslint@8.19.0 - eslint-plugin-vue: 9.1.1_eslint@8.19.0 + eslint-plugin-vue: 9.2.0_eslint@8.19.0 husky: 8.0.1 jsdom: 19.0.0 postcss: 8.4.14 @@ -116,10 +122,10 @@ importers: vite-compression-plugin: 0.0.4 vite-plugin-externals: 0.5.0_vite@2.9.13 vite-plugin-pwa: 0.12.2_vite@2.9.13 - vite-plugin-static-copy: 0.6.0_vite@2.9.13 + vite-plugin-static-copy: 0.6.1_vite@2.9.13 vite-plugin-vue-setup-extend: 0.4.0_vite@2.9.13 vitest: 0.16.0_5rlefaqlpcnjufbjtd4545rida - vue-tsc: 0.38.2_typescript@4.7.4 + vue-tsc: 0.38.3_typescript@4.7.4 packages/components: specifiers: @@ -2429,32 +2435,32 @@ packages: sirv: 2.0.2 dev: true - /@volar/code-gen/0.38.2: - resolution: {integrity: sha512-H81I6d7rZB7teqL+zhK/Xz1v0/kKkUwkB0Aq6b4+BTCqcJeiZkoWxd0gFhrhWTnUoqiM83lhoTGo2vkvx5YagQ==} + /@volar/code-gen/0.38.3: + resolution: {integrity: sha512-0yCkDtaxffyfC9e2dSLGXJmG3b0rCfTa6vqxjr70ZFTtcf/VytmMBwboFicnm+Zoen9EI8wUNfw4upw9Slz5RQ==} dependencies: - '@volar/source-map': 0.38.2 + '@volar/source-map': 0.38.3 dev: true - /@volar/source-map/0.38.2: - resolution: {integrity: sha512-DWcYbYt9SPwk0r4VmXk1F0v4X5+hCqH1JRkAWSeJymQyXCQ2OQDEbY2PF12a7y2qn4FUBD2gOba2TynAqI8ZFQ==} + /@volar/source-map/0.38.3: + resolution: {integrity: sha512-8aVM+r4lsHnLjhvnjQ6kn4J++3I6VXtJblcGzWuIOn9M8pJmRGW6Si/eOVjayLWfvPCxXUM7e3sg4Nm2tufTmg==} dev: true - /@volar/vue-code-gen/0.38.2: - resolution: {integrity: sha512-whLunD6phSGWBUHZKdTxeglrpzQu26ii8CRVapFdjfyMaVhQ7ESNeIAhkTVyg2ovOPc0PiDYPQEPzfWAADIWog==} + /@volar/vue-code-gen/0.38.3: + resolution: {integrity: sha512-euVuKtwV/KurRSVwNz5bZbCBJLwVOE56+Uh2PhsHcAM5Wzlt82cwLj07FbFagCftoC3IC/bsn43yuLc2I+ZjAQ==} dependencies: - '@volar/code-gen': 0.38.2 - '@volar/source-map': 0.38.2 + '@volar/code-gen': 0.38.3 + '@volar/source-map': 0.38.3 '@vue/compiler-core': 3.2.37 '@vue/compiler-dom': 3.2.37 '@vue/shared': 3.2.37 dev: true - /@volar/vue-typescript/0.38.2: - resolution: {integrity: sha512-5IKvSK2m5yUmH6iu/tNScVlvJGuiHawTfSmjxaMs+/tod25WeK37LEdf+pdKtlJ30bYTQmmkAuEfG01QvvBRGQ==} + /@volar/vue-typescript/0.38.3: + resolution: {integrity: sha512-rXh4RQBZrNfkiSnpBYbHrsxg7vBbZeYsGFgE/n8FVLcZfGlelsdXFIINsr/aZGUCJre9I15wQ44eEmXnc4+qww==} dependencies: - '@volar/code-gen': 0.38.2 - '@volar/source-map': 0.38.2 - '@volar/vue-code-gen': 0.38.2 + '@volar/code-gen': 0.38.3 + '@volar/source-map': 0.38.3 + '@volar/vue-code-gen': 0.38.3 '@vue/compiler-sfc': 3.2.37 '@vue/reactivity': 3.2.37 dev: true @@ -2529,7 +2535,7 @@ packages: prettier: 2.7.1 dev: true - /@vue/eslint-config-typescript/11.0.0_rbwfxavh274jq5nrli6gjtdzua: + /@vue/eslint-config-typescript/11.0.0_hko2ljsyixuca7xzzs7dalplrm: resolution: {integrity: sha512-txuRzxnQVmtUvvy9UyWUy9sHWXNeRPGmSPqP53hRtaiUeCTAondI9Ho9GQYI/8/eWljYOST7iA4Aa8sANBkWaA==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: @@ -2543,7 +2549,7 @@ packages: '@typescript-eslint/eslint-plugin': 5.13.0_vv7hakxknrvn7cajscbm2swloy '@typescript-eslint/parser': 5.13.0_4x5o4skxv6sl53vpwefgt23khm eslint: 8.19.0 - eslint-plugin-vue: 9.1.1_eslint@8.19.0 + eslint-plugin-vue: 9.2.0_eslint@8.19.0 typescript: 4.7.4 vue-eslint-parser: 9.0.2_eslint@8.19.0 transitivePeerDependencies: @@ -2589,8 +2595,8 @@ packages: /@vue/shared/3.2.37: resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} - /@vue/test-utils/2.0.1_vue@3.2.37: - resolution: {integrity: sha512-4kt7Sw1gzXeQOsMqrwrQbmEiG8El4MP8P4hfxkmfXdUHf7yHa3xC5CQc0x2YyuhT41w2d4K4O0ZdRvZhGdZlow==} + /@vue/test-utils/2.0.2_vue@3.2.37: + resolution: {integrity: sha512-E2P4oXSaWDqTZNbmKZFVLrNN/siVN78YkEqs7pHryWerrlZR9bBFLWdJwRoguX45Ru6HxIflzKl4vQvwRMwm5g==} peerDependencies: vue: ^3.0.1 dependencies: @@ -2624,9 +2630,33 @@ packages: '@vueuse/shared': 8.7.5_vue@3.2.37 vue: 3.2.37 vue-demi: 0.12.1_vue@3.2.37 + dev: true + + /@vueuse/core/8.9.0_vue@3.2.37: + resolution: {integrity: sha512-eKWehF6gsiLYxnYM/1xgDu16bKED7AWvkk56JIFNQes8OKgktr3Jc1wUy8UWIulrnwCXICUu9YUo+Wkq4r2JNw==} + peerDependencies: + '@vue/composition-api': ^1.1.0 + vue: ^2.6.0 || ^3.2.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue: + optional: true + dependencies: + '@types/web-bluetooth': 0.0.14 + '@vueuse/metadata': 8.9.0 + '@vueuse/shared': 8.9.0_vue@3.2.37 + vue: 3.2.37 + vue-demi: 0.12.1_vue@3.2.37 + dev: false /@vueuse/metadata/8.7.5: resolution: {integrity: sha512-emJZKRQSaEnVqmlu39NpNp8iaW+bPC2kWykWoWOZMSlO/0QVEmO/rt8A5VhOEJTKLX3vwTevqbiRy9WJRwVOQg==} + dev: true + + /@vueuse/metadata/8.9.0: + resolution: {integrity: sha512-pjkIbQgJPRUrxK5/iXVKQFGC+OhJ+Vd6fhBsdwgj+NNJEHUotRliYymwdvhnEke/o+kkulT0xMvoK19nyPoiMw==} + dev: false /@vueuse/shared/8.7.5_vue@3.2.37: resolution: {integrity: sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw==} @@ -2641,6 +2671,22 @@ packages: dependencies: vue: 3.2.37 vue-demi: 0.12.1_vue@3.2.37 + dev: true + + /@vueuse/shared/8.9.0_vue@3.2.37: + resolution: {integrity: sha512-Pmu3Fopk/JJjN8b90uQuFrVCc/RPcSA/0zDFRTyn3YIhoB5ESna/1Sac5WZxK+n82g/ERXHHQTetGI9yxEdPfA==} + peerDependencies: + '@vue/composition-api': ^1.1.0 + vue: ^2.6.0 || ^3.2.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue: + optional: true + dependencies: + vue: 3.2.37 + vue-demi: 0.12.1_vue@3.2.37 + dev: false /abab/2.0.5: resolution: {integrity: sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==} @@ -3922,8 +3968,8 @@ packages: prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-vue/9.1.1_eslint@8.19.0: - resolution: {integrity: sha512-W9n5PB1X2jzC7CK6riG0oAcxjmKrjTF6+keL1rni8n57DZeilx/Fulz+IRJK3lYseLNAygN0I62L7DvioW40Tw==} + /eslint-plugin-vue/9.2.0_eslint@8.19.0: + resolution: {integrity: sha512-W2hc+NUXoce8sZtWgZ45miQTy6jNyuSdub5aZ1IBune4JDeAyzucYX0TzkrQ1jMO52sNUDYlCIHDoaNePe0p5g==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 @@ -3933,7 +3979,7 @@ packages: natural-compare: 1.4.0 nth-check: 2.0.1 postcss-selector-parser: 6.0.10 - semver: 7.3.5 + semver: 7.3.7 vue-eslint-parser: 9.0.2_eslint@8.19.0 xml-name-validator: 4.0.0 transitivePeerDependencies: @@ -6894,8 +6940,8 @@ packages: - supports-color dev: true - /vite-plugin-static-copy/0.6.0_vite@2.9.13: - resolution: {integrity: sha512-KfNhy33p//M5Fq1RcZU+H+1KVagXR9JbAy6KIE8IiWj2j3wRtRPoyh8TYJvVgC+adyKj3Y+KiGUf0GwjI9JHtg==} + /vite-plugin-static-copy/0.6.1_vite@2.9.13: + resolution: {integrity: sha512-A6SMuRPhJ9igTStuzZKkkWtz+4PukhI2WsmcmMQ2emPHlexh/LqgHksqWlKDQ08mqWzlEp4zYbT2IlG45s5GNw==} engines: {node: '>=12.2'} peerDependencies: vite: ^2.6.14 @@ -7083,14 +7129,24 @@ packages: dependencies: '@vue/devtools-api': 6.1.4 vue: 3.2.37 + dev: true - /vue-tsc/0.38.2_typescript@4.7.4: - resolution: {integrity: sha512-+OMmpw9BZC9khul3I1HGtWchv7BCiaM7NvfdilVAiOFkjnivIoaW6jJm6YPQJaEPouePtpkDUWovyzgNxWdDsw==} + /vue-router/4.1.1_vue@3.2.37: + resolution: {integrity: sha512-Wp1mEf2xCwT0ez7o9JvgpfBp9JGnVb+dPERzXDbugTatzJAJ60VWOhJKifQty85k+jOreoFHER4r5fu062PhPw==} + peerDependencies: + vue: ^3.2.0 + dependencies: + '@vue/devtools-api': 6.1.4 + vue: 3.2.37 + dev: false + + /vue-tsc/0.38.3_typescript@4.7.4: + resolution: {integrity: sha512-mWlneSF+PG2kXYGJI12N4XEAG4ljAkae7IcB93fspqSkEt/oKwDbWy3DzcPSgUm0LsXqOUprTMaZkwDVSRBIvw==} hasBin: true peerDependencies: typescript: '*' dependencies: - '@volar/vue-typescript': 0.38.2 + '@volar/vue-typescript': 0.38.3 typescript: 4.7.4 dev: true diff --git a/src/formkit/formkit.config.ts b/src/formkit/formkit.config.ts new file mode 100644 index 00000000..0b95d2e8 --- /dev/null +++ b/src/formkit/formkit.config.ts @@ -0,0 +1,11 @@ +import { generateClasses } from "@formkit/themes"; +import theme from "./theme"; +import type { FormKitOptions } from "@formkit/core"; + +const config: FormKitOptions = { + config: { + classes: generateClasses(theme), + }, +}; + +export default config; diff --git a/src/formkit/theme.ts b/src/formkit/theme.ts new file mode 100644 index 00000000..872d339b --- /dev/null +++ b/src/formkit/theme.ts @@ -0,0 +1,79 @@ +const textClassification = { + label: "block font-bold text-sm formkit-invalid:text-red-500 w-56", + wrapper: "flex flex-row items-center", + inner: + "inline-flex items-center w-full relative box-border border border-gray-300 formkit-invalid:border-red-500 rounded-[4px] overflow-hidden focus-within:border-themeable-primary-500", + input: + "outline-0 bg-white antialiased resize-none w-full text-black block transition-all appearance-none h-9 px-3 text-sm", +}; + +const boxClassification = { + fieldset: "border border-gray-400 rounded-md px-2 pb-1", + legend: "font-bold text-sm", + wrapper: "flex items-center mb-1 cursor-pointer", + help: "mb-2", + input: + "form-check-input appearance-none h-5 w-5 mr-2 border border-gray-500 rounded-sm bg-white checked:bg-blue-500 focus:outline-none focus:ring-0 transition duration-200", + label: "text-sm text-gray-700 mt-1", +}; + +const buttonClassification = { + wrapper: "mb-1", + input: + "bg-blue-500 hover:bg-blue-700 text-white text-sm font-normal py-3 px-5 rounded", +}; + +const theme: Record> = { + global: { + outer: "formkit-disabled:opacity-50", + help: "text-xs text-gray-500", + messages: "list-none p-0 mt-1 mb-0", + message: "text-red-500 mb-1 text-xs", + }, + button: buttonClassification, + color: { + label: "block mb-1 font-bold text-sm", + input: + "w-16 h-8 appearance-none cursor-pointer border border-gray-300 rounded-md mb-2 p-1", + }, + file: { + label: "block mb-1 font-bold text-sm", + inner: "cursor-pointer", + input: + "text-gray-600 text-sm mb-1 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:bg-blue-500 file:text-white hover:file:bg-blue-600", + noFiles: "block text-gray-800 text-sm mb-1", + fileItem: "block flex text-gray-800 text-sm mb-1", + fileRemove: "ml-auto text-blue-500 text-sm", + }, + checkbox: boxClassification, + radio: { + ...boxClassification, + input: boxClassification.input.replace("rounded-sm", "rounded-full"), + }, + range: { + inner: "", + input: + "form-range appearance-none w-full h-2 p-0 bg-gray-200 rounded-full focus:outline-none focus:ring-0 focus:shadow-none", + }, + search: textClassification, + select: textClassification, + submit: buttonClassification, + tel: textClassification, + text: textClassification, + time: textClassification, + url: textClassification, + week: textClassification, + month: textClassification, + number: textClassification, + password: textClassification, + email: textClassification, + date: textClassification, + "datetime-local": textClassification, + textarea: { + ...textClassification, + input: + "outline-0 bg-white antialiased w-full text-black block transition-all appearance-none h-32 px-3 py-2 text-sm", + }, +}; + +export default theme; diff --git a/src/modules/contents/attachments/AttachmentList.vue b/src/modules/contents/attachments/AttachmentList.vue index 6d8c5c5e..7ffb7d6d 100644 --- a/src/modules/contents/attachments/AttachmentList.vue +++ b/src/modules/contents/attachments/AttachmentList.vue @@ -10,7 +10,6 @@ import { IconSettings, VButton, VCard, - VInput, VModal, VPageHeader, VSpace, @@ -396,11 +395,11 @@ onMounted(() => { />
- + type="text" + > 设置 删除 @@ -452,7 +451,10 @@ onMounted(() => {
- +
    diff --git a/src/modules/contents/comments/CommentList.vue b/src/modules/contents/comments/CommentList.vue index 702055ab..cbaa331b 100644 --- a/src/modules/contents/comments/CommentList.vue +++ b/src/modules/contents/comments/CommentList.vue @@ -5,7 +5,6 @@ import { IconSettings, VButton, VCard, - VInput, VPageHeader, VSpace, } from "@halo-dev/components"; @@ -40,11 +39,11 @@ const checkAll = ref(false); />
- + type="text" + > 设置 删除 diff --git a/src/modules/contents/pages/PageList.vue b/src/modules/contents/pages/PageList.vue index 860603bb..333f871f 100644 --- a/src/modules/contents/pages/PageList.vue +++ b/src/modules/contents/pages/PageList.vue @@ -6,7 +6,6 @@ import { IconSettings, VButton, VCard, - VInput, VPageHeader, VSpace, VTabbar, @@ -146,11 +145,11 @@ onMounted(() => { />
- + type="text" + > 设置 删除 @@ -171,7 +170,10 @@ onMounted(() => {
- +
    diff --git a/src/modules/contents/posts/PostList.vue b/src/modules/contents/posts/PostList.vue index c1385c3d..4bdf94e1 100644 --- a/src/modules/contents/posts/PostList.vue +++ b/src/modules/contents/posts/PostList.vue @@ -7,7 +7,6 @@ import { IconSettings, VButton, VCard, - VInput, VPageHeader, VSpace, VTag, @@ -139,11 +138,11 @@ onMounted(() => { />
- + type="text" + > 设置 删除 @@ -198,7 +197,10 @@ onMounted(() => {
@@ -213,7 +215,10 @@ onMounted(() => {
@@ -230,7 +235,10 @@ onMounted(() => {
- +
    diff --git a/src/modules/interface/themes/ThemeDetail.vue b/src/modules/interface/themes/ThemeDetail.vue index 1d7a45c2..72cd9ab9 100644 --- a/src/modules/interface/themes/ThemeDetail.vue +++ b/src/modules/interface/themes/ThemeDetail.vue @@ -8,13 +8,11 @@ import { VAlert, VButton, VCard, - VInput, VModal, VPageHeader, VSpace, VTabbar, VTag, - VTextarea, } from "@halo-dev/components"; import { ref } from "vue"; import { RouterLink } from "vue-router"; @@ -284,73 +282,18 @@ const handleChangeTheme = (theme: any) => {
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
+ + + + + + -
- -
-
- -
-
-
-
- -
-
- -
-
-
+
+
+ 保存
- -
-
- 保存 -
-
- +
diff --git a/src/modules/interface/themes/Visual.vue b/src/modules/interface/themes/Visual.vue index 03a36429..4f2fa78c 100644 --- a/src/modules/interface/themes/Visual.vue +++ b/src/modules/interface/themes/Visual.vue @@ -7,15 +7,11 @@ import { IconTablet, VButton, VCard, - VInput, VModal, - VOption, - VSelect, VSpace, VTabbar, VTabItem, VTabs, - VTextarea, } from "@halo-dev/components"; import { computed, onMounted, ref } from "vue"; @@ -198,77 +194,25 @@ onMounted(() => {
-
-
-
-
- -
- -
-
- -
- -
- -
-
-
-
-
+ + + +
-
-
-
-
- -
- -
-
- -
- -
- - Java - C - Go - JavaScript - -
-
-
-
-
+ + + +
diff --git a/src/modules/system/plugins/PluginDetail.vue b/src/modules/system/plugins/PluginDetail.vue index 7c39ffd1..f573f6d6 100644 --- a/src/modules/system/plugins/PluginDetail.vue +++ b/src/modules/system/plugins/PluginDetail.vue @@ -2,7 +2,6 @@ import { VButton, VCard, - VInput, VPageHeader, VSpace, VSwitch, @@ -297,44 +296,16 @@ handleFetchPlugin();
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
+ + + + -
-
- 保存 -
+
+
+ 保存
- +
diff --git a/src/modules/system/plugins/PluginList.vue b/src/modules/system/plugins/PluginList.vue index bcf5762e..079a2dda 100644 --- a/src/modules/system/plugins/PluginList.vue +++ b/src/modules/system/plugins/PluginList.vue @@ -6,7 +6,6 @@ import { IconSettings, VButton, VCard, - VInput, VPageHeader, VSpace, VSwitch, @@ -90,11 +89,11 @@ onMounted(handleFetchPlugins); />
- + type="text" + > 禁用 卸载 @@ -149,7 +148,10 @@ onMounted(handleFetchPlugins);
- +
    diff --git a/src/modules/system/roles/RoleList.vue b/src/modules/system/roles/RoleList.vue index 7ebf86ed..45ffb336 100644 --- a/src/modules/system/roles/RoleList.vue +++ b/src/modules/system/roles/RoleList.vue @@ -6,7 +6,6 @@ import { IconShieldUser, VButton, VCard, - VInput, VPageHeader, VSpace, VTag, @@ -74,7 +73,10 @@ onMounted(() => { class="relative flex flex-col items-start sm:flex-row sm:items-center" >
    - +
    diff --git a/src/modules/system/roles/components/RoleCreationModal.vue b/src/modules/system/roles/components/RoleCreationModal.vue index 67ee08b0..8217db0c 100644 --- a/src/modules/system/roles/components/RoleCreationModal.vue +++ b/src/modules/system/roles/components/RoleCreationModal.vue @@ -1,5 +1,5 @@ diff --git a/src/modules/system/settings/NotificationSettings.vue b/src/modules/system/settings/NotificationSettings.vue index 62870871..d9b19165 100644 --- a/src/modules/system/settings/NotificationSettings.vue +++ b/src/modules/system/settings/NotificationSettings.vue @@ -1,56 +1,19 @@ diff --git a/src/modules/system/users/Login.vue b/src/modules/system/users/Login.vue index 47005381..3057c6b0 100644 --- a/src/modules/system/users/Login.vue +++ b/src/modules/system/users/Login.vue @@ -9,7 +9,6 @@ import { axiosInstance } from "@halo-dev/admin-shared"; import qs from "qs"; import logo from "../../../assets/logo.svg"; import { onMounted, ref } from "vue"; -import { useRouter } from "vue-router"; import { submitForm } from "@formkit/vue"; interface LoginForm { @@ -23,14 +22,12 @@ interface LoginFormState { state: LoginForm; } -const router = useRouter(); - const loginForm = ref({ logging: false, state: { _csrf: "", username: "admin", - password: "{no}123456", + password: "1A3DTGDF7yeGsZaR", }, }); diff --git a/src/modules/system/users/PasswordChange.vue b/src/modules/system/users/PasswordChange.vue index 054b6d38..ab7df96f 100644 --- a/src/modules/system/users/PasswordChange.vue +++ b/src/modules/system/users/PasswordChange.vue @@ -1,46 +1,16 @@ diff --git a/src/modules/system/users/PersonalAccessTokens.vue b/src/modules/system/users/PersonalAccessTokens.vue index 7c3786c3..2e73ccb9 100644 --- a/src/modules/system/users/PersonalAccessTokens.vue +++ b/src/modules/system/users/PersonalAccessTokens.vue @@ -4,7 +4,6 @@ import { IconDeleteBin, IconStopCircle, VButton, - VInput, VModal, VSpace, VTabItem, @@ -38,30 +37,10 @@ onMounted(() => { -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    + + + +
    diff --git a/src/modules/system/users/ProfileModification.vue b/src/modules/system/users/ProfileModification.vue index 1c784278..edff2a47 100644 --- a/src/modules/system/users/ProfileModification.vue +++ b/src/modules/system/users/ProfileModification.vue @@ -1,60 +1,36 @@ diff --git a/src/modules/system/users/UserList.vue b/src/modules/system/users/UserList.vue index c263653b..482875bc 100644 --- a/src/modules/system/users/UserList.vue +++ b/src/modules/system/users/UserList.vue @@ -7,7 +7,6 @@ import { IconUserSettings, VButton, VCard, - VInput, VPageHeader, VSpace, VTag, @@ -84,11 +83,11 @@ onMounted(() => { />
    - + type="text" + > 设置 删除 diff --git a/src/modules/system/users/components/UserCreationModal.vue b/src/modules/system/users/components/UserCreationModal.vue index 784dba3f..1c291ba3 100644 --- a/src/modules/system/users/components/UserCreationModal.vue +++ b/src/modules/system/users/components/UserCreationModal.vue @@ -2,13 +2,7 @@ import type { PropType } from "vue"; import { computed, ref, watch } from "vue"; import { axiosInstance } from "@halo-dev/admin-shared"; -import { - IconSave, - VButton, - VInput, - VModal, - VTextarea, -} from "@halo-dev/components"; +import { IconSave, VButton, VModal } from "@halo-dev/components"; import type { User } from "@/types/extension"; import { v4 as uuid } from "uuid"; @@ -100,76 +94,51 @@ const handleCreateUser = async () => { :width="700" @update:visible="handleVisibleChange" > -
    -
    -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    + + + + + + + +