Fix title change on route change

This commit is contained in:
Benedikt Kulmann
2020-04-24 09:47:16 +02:00
parent e16fa922ba
commit 92d03ffeb3
3 changed files with 22 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@@ -10,7 +10,7 @@ function $gettext(msg) {
const appInfo = {
name: $gettext('Settings'),
id: 'settings',
icon: 'info',
icon: 'application',
isFileEditor: false,
extensions: [],
config: {

View File

@@ -8,18 +8,20 @@
</p>
</oc-alert>
<template v-else>
<div class="uk-flex uk-flex-between uk-flex-middle">
<h1 v-translate class="oc-page-title">{{ selectedExtensionName }}</h1>
</div>
<hr />
<template>
<settings-bundle
v-for="bundle in selectedSettingsBundles"
:key="'bundle-' + bundle.key"
:bundle="bundle"
class="uk-margin-top"
/>
<template v-if="selectedExtensionName">
<div class="uk-flex uk-flex-between uk-flex-middle">
<h1 class="oc-page-title">
{{ selectedExtensionName }}
</h1>
</div>
<hr />
</template>
<settings-bundle
v-for="bundle in selectedSettingsBundles"
:key="'bundle-' + bundle.key"
:bundle="bundle"
class="uk-margin-top"
/>
</template>
</div>
<oc-loader v-else />
@@ -51,6 +53,8 @@ export default {
// TODO: extensions need to be registered with display names, separate from the settings bundles. until then: hardcoded translation
if (this.selectedExtension === 'ocis-accounts') {
return 'Account'
} else if (this.selectedExtension === 'ocis-test') {
return 'Test'
}
return this.selectedExtension
},
@@ -73,8 +77,9 @@ export default {
}
}
},
created () {
this.initialize()
async created () {
await this.initialize()
this.resetSelectedExtension()
},
watch: {
initialized() {