From 522dbb1e138f9fa2180a5ccc0b9075da306d72aa Mon Sep 17 00:00:00 2001 From: marihachi Date: Sat, 13 Mar 2021 10:56:27 +0900 Subject: [PATCH] update page editor (#7317) * fix buttons visibility * fix title of page editor --- src/client/pages/page-editor/page-editor.vue | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/client/pages/page-editor/page-editor.vue b/src/client/pages/page-editor/page-editor.vue index 45997dfd6..08856ebfe 100644 --- a/src/client/pages/page-editor/page-editor.vue +++ b/src/client/pages/page-editor/page-editor.vue @@ -4,9 +4,9 @@ {{ $ts._pages.viewPage }}
- {{ $ts.save }} + {{ $ts.save }} {{ $ts.duplicate }} - {{ $ts.delete }} + {{ $ts.delete }}
@@ -134,12 +134,18 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.initPageId ? { - title: this.$ts._pages.editPage, - icon: faPencilAlt, - } : { - title: this.$ts._pages.newPage, - icon: faPencilAlt, + INFO: computed(() => { + let title = this.$ts._pages.newPage; + if (this.initPageId) { + title = this.$ts._pages.editPage; + } + else if (this.initPageName && this.initUser) { + title = this.$ts._pages.readPage; + } + return { + title: title, + icon: faPencilAlt, + }; }), author: this.$i, readonly: false,