From 782abed7c11820705d706b2d2943f60271d421c8 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Wed, 3 May 2023 10:39:33 +0200 Subject: [PATCH 1/3] Fix highlighting of the currently selected language --- .../enhancement-add-notifications-setting | 1 + packages/web-runtime/src/helpers/settings.ts | 53 +++++++++ packages/web-runtime/src/pages/account.vue | 35 +++--- .../tests/unit/pages/account.spec.ts | 107 +----------------- 4 files changed, 76 insertions(+), 120 deletions(-) create mode 100644 packages/web-runtime/src/helpers/settings.ts diff --git a/changelog/unreleased/enhancement-add-notifications-setting b/changelog/unreleased/enhancement-add-notifications-setting index 9facef34ac7..146f6d680b6 100644 --- a/changelog/unreleased/enhancement-add-notifications-setting +++ b/changelog/unreleased/enhancement-add-notifications-setting @@ -4,4 +4,5 @@ We've added notification setting to the account page, where the user can turn on or off receiving emails for notifications. https://github.com/owncloud/web/pull/8911 +https://github.com/owncloud/web/pull/8972 https://github.com/owncloud/web/issues/8904 diff --git a/packages/web-runtime/src/helpers/settings.ts b/packages/web-runtime/src/helpers/settings.ts new file mode 100644 index 00000000000..3f9a8e78018 --- /dev/null +++ b/packages/web-runtime/src/helpers/settings.ts @@ -0,0 +1,53 @@ +export interface SettingValue { + identifier: { + bundle: string + extension: string + setting: string + } + value: { + accountUuid: string + bundleId: string + id: string + resource: { + type: string + } + settingId: string + boolValue?: boolean + listValue?: { + values: { + stringValue: string + }[] + } + } +} + +export interface AccountBundleSetting { + description: string + displayName: string + id: string + name: string + resource: { + type: string + } + singleChoiceValue?: { + options: Record[] + } + boolValue?: Record +} + +export interface AccountBundle { + displayName: string + extension: string + id: string + name: string + resource: { + type: string + } + settings: AccountBundleSetting[] + type: string +} + +export interface LanguageOption { + label: string + value: string +} diff --git a/packages/web-runtime/src/pages/account.vue b/packages/web-runtime/src/pages/account.vue index 20e836eea2d..414e0b1a2db 100644 --- a/packages/web-runtime/src/pages/account.vue +++ b/packages/web-runtime/src/pages/account.vue @@ -124,6 +124,7 @@