From fbf1f643f8ffa4fe9f0d840b6812be6a71d643f2 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Fri, 3 Apr 2026 11:02:53 +0200 Subject: [PATCH 01/15] use primevue dialog which is non-modal, resizable and movable Signed-off-by: Julien Veyssier --- package-lock.json | 86 +++++++++++++++++++ package.json | 2 + src/assistant.js | 12 +++ .../AssistantTextProcessingModal.vue | 72 ++++++++++------ 4 files changed, 147 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index f664d7e1..4d4f9c7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,11 @@ "@nextcloud/moment": "^1.3.1", "@nextcloud/router": "^3.0.0", "@nextcloud/vue": "^9.0.0-rc.5", + "@primeuix/themes": "^2.0.3", "extendable-media-recorder": "^9.2.11", "extendable-media-recorder-wav-encoder": "^7.0.129", "moment": "^2.30.1", + "primevue": "^4.5.4", "v-click-outside": "^3.2.0", "vue": "^3.5.16", "vue-material-design-icons": "^5.1.2" @@ -3726,6 +3728,74 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/@primeuix/styled": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@primeuix/styled/-/styled-0.7.4.tgz", + "integrity": "sha512-QSO/NpOQg8e9BONWRBx9y8VGMCMYz0J/uKfNJEya/RGEu7ARx0oYW0ugI1N3/KB1AAvyGxzKBzGImbwg0KUiOQ==", + "license": "MIT", + "dependencies": { + "@primeuix/utils": "^0.6.1" + }, + "engines": { + "node": ">=12.11.0" + } + }, + "node_modules/@primeuix/styles": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@primeuix/styles/-/styles-2.0.3.tgz", + "integrity": "sha512-2ykAB6BaHzR/6TwF8ShpJTsZrid6cVIEBVlookSdvOdmlWuevGu5vWOScgIwqWwlZcvkFYAGR/SUV3OHCTBMdw==", + "license": "MIT", + "dependencies": { + "@primeuix/styled": "^0.7.4" + } + }, + "node_modules/@primeuix/themes": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@primeuix/themes/-/themes-2.0.3.tgz", + "integrity": "sha512-3fS1883mtCWhgUgNf/feiaaDSOND4EBIOu9tZnzJlJ8QtYyL6eFLcA6V3ymCWqLVXQ1+lTVEZv1gl47FIdXReg==", + "license": "MIT", + "dependencies": { + "@primeuix/styled": "^0.7.4" + } + }, + "node_modules/@primeuix/utils": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@primeuix/utils/-/utils-0.6.4.tgz", + "integrity": "sha512-pZ5f+vj7wSzRhC7KoEQRU5fvYAe+RP9+m39CTscZ3UywCD1Y2o6Fe1rRgklMPSkzUcty2jzkA0zMYkiJBD1hgg==", + "license": "MIT", + "engines": { + "node": ">=12.11.0" + } + }, + "node_modules/@primevue/core": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/@primevue/core/-/core-4.5.4.tgz", + "integrity": "sha512-lYJJB3wTrDJ8MkLctzHfrPZAqXVxoatjIsswSJzupatf6ZogJHVYADUKcn1JAkLLk8dtV1FA2AxDek663fHO5Q==", + "license": "MIT", + "dependencies": { + "@primeuix/styled": "^0.7.4", + "@primeuix/utils": "^0.6.2" + }, + "engines": { + "node": ">=12.11.0" + }, + "peerDependencies": { + "vue": "^3.5.0" + } + }, + "node_modules/@primevue/icons": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/@primevue/icons/-/icons-4.5.4.tgz", + "integrity": "sha512-DxgryEc7ZmUqcEhYMcxGBRyFzdtLIoy3jLtlH1zsVSRZaG+iSAcjQ88nvfkZxGUZtZBFL7sRjF6KLq3bJZJwUw==", + "license": "MIT", + "dependencies": { + "@primeuix/utils": "^0.6.2", + "@primevue/core": "4.5.4" + }, + "engines": { + "node": ">=12.11.0" + } + }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-rc.2", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.2.tgz", @@ -12263,6 +12333,22 @@ "node": ">= 0.8.0" } }, + "node_modules/primevue": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/primevue/-/primevue-4.5.4.tgz", + "integrity": "sha512-nTyEohZABFJhVIpeUxgP0EJ8vKcJAhD+Z7DYj95e7ie/MNUCjRNcGjqmE1cXtXi4z54qDfTSI9h2uJ51qz2DIw==", + "license": "MIT", + "dependencies": { + "@primeuix/styled": "^0.7.4", + "@primeuix/styles": "^2.0.2", + "@primeuix/utils": "^0.6.2", + "@primevue/core": "4.5.4", + "@primevue/icons": "4.5.4" + }, + "engines": { + "node": ">=12.11.0" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", diff --git a/package.json b/package.json index fcab91ea..8e214060 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,11 @@ "@nextcloud/moment": "^1.3.1", "@nextcloud/router": "^3.0.0", "@nextcloud/vue": "^9.0.0-rc.5", + "@primeuix/themes": "^2.0.3", "extendable-media-recorder": "^9.2.11", "extendable-media-recorder-wav-encoder": "^7.0.129", "moment": "^2.30.1", + "primevue": "^4.5.4", "v-click-outside": "^3.2.0", "vue": "^3.5.16", "vue-material-design-icons": "^5.1.2" diff --git a/src/assistant.js b/src/assistant.js index f9ed4011..da5d7588 100644 --- a/src/assistant.js +++ b/src/assistant.js @@ -6,6 +6,8 @@ import { TASK_STATUS_STRING } from './constants.js' import { showError } from '@nextcloud/dialogs' import { emit } from '@nextcloud/event-bus' +import PrimeVue from 'primevue/config' +import Aura from '@primeuix/themes/aura' window.assistantPollTimerId = null @@ -103,6 +105,16 @@ export async function openAssistantForm({ }, ) app.mixin({ methods: { t, n } }) + app.use(PrimeVue, { + theme: { + preset: Aura, + options: { + prefix: 'p', + darkModeSelector: 'system', + cssLayer: false, + }, + }, + }) const view = app.mount(modalMountPoint) let lastTask = null diff --git a/src/components/AssistantTextProcessingModal.vue b/src/components/AssistantTextProcessingModal.vue index 70a32789..23ab6c26 100644 --- a/src/components/AssistantTextProcessingModal.vue +++ b/src/components/AssistantTextProcessingModal.vue @@ -3,13 +3,16 @@ - SPDX-License-Identifier: AGPL-3.0-or-later --> diff --git a/src/components/AssistantTextProcessingModal.vue b/src/components/AssistantTextProcessingModal.vue index 23ab6c26..e6f96e66 100644 --- a/src/components/AssistantTextProcessingModal.vue +++ b/src/components/AssistantTextProcessingModal.vue @@ -217,10 +217,18 @@ export default { diff --git a/src/components/ChattyLLM/ChattyLLMInputForm.vue b/src/components/ChattyLLM/ChattyLLMInputForm.vue index b6164487..8a2b1f6e 100644 --- a/src/components/ChattyLLM/ChattyLLMInputForm.vue +++ b/src/components/ChattyLLM/ChattyLLMInputForm.vue @@ -909,9 +909,13 @@ export default {