This commit is contained in:
2021-07-21 23:09:04 +00:00
parent 38d1f386c6
commit 91d0692fd8
2 changed files with 23 additions and 22 deletions

View File

@@ -145,11 +145,9 @@
></v-app-bar-nav-icon>
<v-toolbar-title class="ml-n5 ml-sm-0 pl-sm-4">
<v-icon>{{ appBar.icon }}</v-icon>
<span
v-if="appBar.title"
class="text-subtitle-2 ml-2 text-sm-h6 ml-sm-4"
>{{ appBar.title }}</span
>
<span class="text-subtitle-2 ml-2 text-sm-h6 ml-sm-4">{{
titleDisplay
}}</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<!-- All users can see this, they may not be able to subscribe to notifications but they may see direct or system notifications for any account so this is always available -->
@@ -383,28 +381,28 @@ export default {
},
helpUrl() {
return this.$store.state.helpUrl;
},
titleDisplay() {
if (this.appBar.title == null) {
return null;
}
if (this.appBar.title.includes(":")) {
const t = this.appBar.title.split(":");
return t[1] + " " + this.$ay.t(t[0]);
}
if (this.appBar.isMain) {
//if ismain then it's a translation key
return this.$ay.t(this.appBar.title);
} else {
//if not ismain then it's a record name
return this.appBar.title;
}
}
},
props: {
source: { type: String, default: null }
},
methods: {
titleDisplay() {
//Allow for extra info in title
if (this.appBar.title == null) {
return null;
}
if (this.appBar.title.includes(":")) {
const t = this.appBar.title.split(":");
// if (this.$vuetify.breakpoint.smAndUp) {
// return this.$ay.t(t[0]) + " " + t[1];
// } else {
return t[1] + " " + this.$ay.t(t[0]);
//}
}
return this.$ay.t(this.appBar.title);
},
afterLeave() {
this.$root.$emit("triggerScroll");
},