aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src/App.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/App.vue')
-rw-r--r--packages/client/src/App.vue27
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/client/src/App.vue b/packages/client/src/App.vue
index e74b3f9..0c50f3a 100644
--- a/packages/client/src/App.vue
+++ b/packages/client/src/App.vue
@@ -2,6 +2,33 @@
<router-view />
</template>
+<script>
+export default {
+ name: "App",
+ data: function() {
+ return {
+ base_title: ""
+ };
+ },
+ methods: {
+ setTitle() {
+ const repo = this.$route.params.repo;
+ const route = this.$route.name;
+ document.title = repo ? `${repo} - ${route}` : this.base_title;
+ }
+ },
+ created() {
+ this.base_title = document.title;
+ this.setTitle();
+ },
+ watch: {
+ $route() {
+ this.setTitle();
+ }
+ }
+};
+</script>
+
<style lang="scss">
@use "scss/colors";
@use "scss/variables";