From 9018dffc2488f6a49b162e0ee419f65cc63fad72 Mon Sep 17 00:00:00 2001 From: AndzejsP Date: Fri, 9 Jun 2023 17:58:26 +0300 Subject: [PATCH 01/11] wip --- web/src/views/SettingsView.vue | 49 ++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index 6b439029..38fdb895 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -272,7 +272,7 @@ class="flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"> -
+
@@ -615,6 +628,7 @@ export default { Toast, PersonalityEntry, BindingEntry, + }, data() { @@ -960,7 +974,7 @@ export default { this.isLoading = true this.update_setting('binding_name', value, (res) => { - + this.$refs.toast.showToast("Binding changed.", 4, true) this.settingsChanged = true @@ -1103,6 +1117,7 @@ export default { newItem = item newItem.category = catkey // add new props to items newItem.language = langkey // add new props to items + newItem.full_path = langkey + '/' + catkey + '/' + item.name // add new props to items return newItem }) @@ -1159,8 +1174,9 @@ export default { this.isLoading = false this.diskUsage = await this.api_get_req("disk_usage") this.ramUsage = await this.api_get_req("ram_usage") - console.log('ran', this.ramUsage) + this.isMounted = true + this.mountedPersonalities }, computed: { @@ -1225,6 +1241,29 @@ export default { return defaultPersonalityImgPlaceholder } }, + mountedPersonalities() { + if (!this.isMounted) { + return [] + } + let mountedPersArr = [] + if (this.configFile.personalities.length > 0) { + + for (let i = 0; i < this.configFile.personalities.length; i++) { + const full_path_item = this.configFile.personalities[i] + + const index = this.$refs.personalitiesZoo.findIndex(item => item.personality.full_path == full_path_item) + if (index) { + + const pers = this.$refs.personalitiesZoo[index] + mountedPersArr.push(pers) + } + } + + } + console.log('mountedPers', mountedPersArr) + + return mountedPersArr + } }, watch: { From f02c868306334239e3382119e2becc913e92be1f Mon Sep 17 00:00:00 2001 From: AndzejsP Date: Sat, 10 Jun 2023 16:17:10 +0300 Subject: [PATCH 02/11] bs wip --- web/src/components/PersonalityEntry.vue | 48 +++-- web/src/views/SettingsView.vue | 251 +++++++++++++++++++----- 2 files changed, 234 insertions(+), 65 deletions(-) diff --git a/web/src/components/PersonalityEntry.vue b/web/src/components/PersonalityEntry.vue index 3b48341b..e4c25941 100644 --- a/web/src/components/PersonalityEntry.vue +++ b/web/src/components/PersonalityEntry.vue @@ -1,13 +1,28 @@