From 098042fbe1c8a1ff43cb64a4737bb7107972e9f3 Mon Sep 17 00:00:00 2001 From: Bruno Perel Date: Tue, 5 Nov 2024 17:13:09 +0100 Subject: [PATCH] dumili: wip --- apps/dumili/api/services/indexation/index.ts | 1 + apps/dumili/eslint.config.mjs | 14 +- apps/dumili/package.json | 3 +- .../src/components/AiSuggestionIcon.vue | 5 +- apps/dumili/src/components/AiTooltip.vue | 2 +- apps/dumili/src/components/Gallery.vue | 4 +- .../src/components/StorySuggestionList.vue | 36 +- apps/dumili/src/components/TableResults.vue | 12 +- apps/dumili/src/components/TextEditor.vue | 5 +- apps/dumili/src/pages/indexation/[id].vue | 2 +- apps/dumili/translations/messages.en.json | 3 +- apps/dumili/translations/messages.nb-NO.json | 1080 ++++++++--------- apps/dumili/tsconfig.json | 52 +- pnpm-lock.yaml | 54 + 14 files changed, 664 insertions(+), 609 deletions(-) diff --git a/apps/dumili/api/services/indexation/index.ts b/apps/dumili/api/services/indexation/index.ts index ee7532115..96bc62809 100644 --- a/apps/dumili/api/services/indexation/index.ts +++ b/apps/dumili/api/services/indexation/index.ts @@ -53,6 +53,7 @@ const setKumikoInferredPageStoryKinds = async (pages: page[]) => { data: { aiKumikoInferredStoryKind: inferredStoryKind, aiKumikoResultPanels: { + deleteMany: {}, createMany: { data: panelsOfPage, }, diff --git a/apps/dumili/eslint.config.mjs b/apps/dumili/eslint.config.mjs index 3555f14aa..d3866389d 100644 --- a/apps/dumili/eslint.config.mjs +++ b/apps/dumili/eslint.config.mjs @@ -1,5 +1,6 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; +import vueI18n from "@intlify/eslint-plugin-vue-i18n"; import { FlatCompat } from "@eslint/eslintrc"; import js from "@eslint/js"; @@ -16,14 +17,23 @@ const compat = new FlatCompat({ export default [ { - ignores: ["api/**/*", "**/*.d.ts", "**/dist", "**/node_modules"], + ignores: [ + "api/**/*", + "**/*.d.ts", + "**/dist", + "**/node_modules", + "**/*.json", + "**/*.yml", + ], }, + ...vueI18n.configs["flat/recommended"], ...compat.extends( "plugin:vue/vue3-recommended", "plugin:prettier-vue/recommended", "prettier", "plugin:@typescript-eslint/recommended", ), + { plugins: { "@typescript-eslint": typescriptEslint, @@ -58,6 +68,8 @@ export default [ ignores: [], }, ], + + "@intlify/vue-i18n/no-deprecated-i18n-component": "off", }, }, { diff --git a/apps/dumili/package.json b/apps/dumili/package.json index 4d4ebf74b..463974b47 100644 --- a/apps/dumili/package.json +++ b/apps/dumili/package.json @@ -45,6 +45,7 @@ "@eslint/eslintrc": "^3.1.0", "@eslint/js": "^9.14.0", "@intlify/unplugin-vue-i18n": "^5.2.0", + "@intlify/eslint-plugin-vue-i18n": "^3.0.0", "@types/js-cookie": "^3.0.6", "@vitejs/plugin-vue": "^5.1.4", "concurrently": "^9.0.1", @@ -69,4 +70,4 @@ "eslintConfig": { "extends": "@antfu" } -} \ No newline at end of file +} diff --git a/apps/dumili/src/components/AiSuggestionIcon.vue b/apps/dumili/src/components/AiSuggestionIcon.vue index 96d7a2925..658f80e70 100644 --- a/apps/dumili/src/components/AiSuggestionIcon.vue +++ b/apps/dumili/src/components/AiSuggestionIcon.vue @@ -50,7 +50,6 @@ svg { min-width: 20px; cursor: help; - color: grey; &.button { background: black; @@ -59,6 +58,10 @@ svg { height: 20px; } + &.idle { + color: grey; + } + &.success { color: yellow; } diff --git a/apps/dumili/src/components/AiTooltip.vue b/apps/dumili/src/components/AiTooltip.vue index 759e015b7..554ad87bb 100644 --- a/apps/dumili/src/components/AiTooltip.vue +++ b/apps/dumili/src/components/AiTooltip.vue @@ -32,7 +32,7 @@ const showRepeat = ref(false);