diff --git a/changelog/unreleased/enhancement-move-language-select-to-account-page b/changelog/unreleased/enhancement-move-language-select-to-account-page new file mode 100644 index 00000000000..64abd4f77b0 --- /dev/null +++ b/changelog/unreleased/enhancement-move-language-select-to-account-page @@ -0,0 +1,6 @@ +Enhancement: Move language selection to user account page + +The language selection has been moved from the settings app to the personal account page. +The settings app has been removed from the default configs because we don't need it currently. + +https://github.com/owncloud/web/pull/8294 diff --git a/config/config.json.sample-ocis b/config/config.json.sample-ocis index 9ca3c0741ee..a8b208c74bb 100644 --- a/config/config.json.sample-ocis +++ b/config/config.json.sample-ocis @@ -18,12 +18,6 @@ "external", "admin-settings" ], - "external_apps": [ - { - "id": "settings", - "path": "https://localhost:9200/settings.js" - } - ], "options" : { "previewFileMimeTypes" : [ "image/gif", diff --git a/config/vite_oc10/config.json b/config/vite_oc10/config.json index c4e14b3cfa1..4f278c3ccb3 100755 --- a/config/vite_oc10/config.json +++ b/config/vite_oc10/config.json @@ -8,6 +8,11 @@ "authUrl": "http://host.docker.internal:8080/index.php/apps/oauth2/authorize", "logoutUrl": "http://host.docker.internal:8080/index.php/logout" }, + "options": { + "accountEditLink": { + "href": "http://host.docker.internal:8080/index.php/settings/personal" + } + }, "apps": [ "files", "text-editor", diff --git a/config/vite_ocis/config.json b/config/vite_ocis/config.json index ee1fd1a58ab..a376651283b 100755 --- a/config/vite_ocis/config.json +++ b/config/vite_ocis/config.json @@ -23,10 +23,6 @@ "config": { "mimeTypes": ["image/tiff","image/bmp","image/x-ms-bmp"] } - }, - { - "id": "settings", - "path": "/settings.js" } ] } diff --git a/dev/docker/oc10.web.config.json b/dev/docker/oc10.web.config.json index 51471508d73..dcb17cc8750 100644 --- a/dev/docker/oc10.web.config.json +++ b/dev/docker/oc10.web.config.json @@ -34,16 +34,6 @@ }, "icon": "swap-box", "url": "http://host.docker.internal:8080/index.php/apps/files" - }, - { - "icon": "settings-4", - "menu": "user", - "target": "_self", - "title": { - "de": "Einstellungen", - "en": "Settings" - }, - "url": "http://host.docker.internal:8080/index.php/settings/personal" } ] } diff --git a/dev/docker/ocis.web.config.json b/dev/docker/ocis.web.config.json index 25740bdf7af..d4ea7a4e71d 100644 --- a/dev/docker/ocis.web.config.json +++ b/dev/docker/ocis.web.config.json @@ -40,10 +40,6 @@ "mimeTypes": ["image/tiff","image/bmp","image/x-ms-bmp"] } }, - { - "id": "settings", - "path": "/settings.js" - }, { "id": "draw-io", "path": "web-app-draw-io", diff --git a/docs/getting-started.md b/docs/getting-started.md index 21f793ff7ff..2389952febd 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -48,6 +48,8 @@ substring of a value of the authenticated user. Examples are `/Shares`, `/{{.Id} - `options.disablePreviews` Set this option to `true` to disable previews in all the different file listing views. The only list view that is not affected by this is the trash bin, as that doesn't allow showing previews at all. - `options.previewFileMimeTypes` Specifies which mimeTypes will be previewed in the ui. For example to only preview jpg and text files set this option to `["image/jpeg", "text/plain"]`. +- `options.accountEditLink` This accepts an object with the following optional fields to have a link on the account page: + - `options.accountEditLink.href` Set a different target URL for the edit link. Make sure to prepend it with `http(s)://`. - `options.disableFeedbackLink` Set this option to `true` to disable the feedback link in the topbar. Keeping it enabled (value `false` or absence of the option) allows ownCloud to get feedback from your user base through a dedicated survey website. - `options.feedbackLink` This accepts an object with the following optional fields to customize the feedback link in the topbar: diff --git a/packages/web-integration-oc10/lib/Controller/ConfigController.php b/packages/web-integration-oc10/lib/Controller/ConfigController.php index f5ee1c02669..67b903b37a9 100644 --- a/packages/web-integration-oc10/lib/Controller/ConfigController.php +++ b/packages/web-integration-oc10/lib/Controller/ConfigController.php @@ -73,6 +73,7 @@ public function getConfig(): JSONResponse { $configContent = \file_get_contents($configFile); $configAssoc = \json_decode($configContent, true); $extendedConfig = $this->addOC10AppsToConfig($configAssoc); + $extendedConfig = $this->addAccountEditLinkToConfig($extendedConfig); $response = new JSONResponse($extendedConfig); $response->addHeader('Cache-Control', 'max-age=0, no-cache, no-store, must-revalidate'); $response->addHeader('Pragma', 'no-cache'); @@ -124,4 +125,23 @@ private function addOC10AppsToConfig(array $config): array { $config['applications'] = $apps; return $config; } + + /** + * Add an account edit link to the config. + * + * @param array $config + * @return array + */ + private function addAccountEditLinkToConfig(array $config): array { + $options = $config['options'] ?? []; + if (isset($options['accountEditLink'])) { + return $config; + } + $serverUrl = $this->request->getServerProtocol() . '://' . $this->request->getServerHost(); + $options['accountEditLink'] = [ + 'href' => $serverUrl . '/index.php/settings/personal' + ]; + $config['options'] = $options; + return $config; + } } diff --git a/packages/web-runtime/src/pages/account.vue b/packages/web-runtime/src/pages/account.vue index 598c071e779..7b5b3a4b07b 100644 --- a/packages/web-runtime/src/pages/account.vue +++ b/packages/web-runtime/src/pages/account.vue @@ -18,25 +18,16 @@ - - - -

Account Information

@@ -75,17 +66,35 @@ > +
+
Language
+
+ +
+