From f5d5d26b0e9c80bbf0caa591454d73183922e38d Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 30 Jan 2020 06:19:18 +0900 Subject: Adjust page style --- src/client/components/page/page.vue | 64 ++----------------------------------- src/client/pages/page.vue | 50 ++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 63 deletions(-) (limited to 'src') diff --git a/src/client/components/page/page.vue b/src/client/components/page/page.vue index bd78313475..9ec5da81ed 100644 --- a/src/client/components/page/page.vue +++ b/src/client/components/page/page.vue @@ -1,27 +1,6 @@ @@ -77,16 +56,6 @@ export default Vue.extend({ type: Object, required: true }, - showTitle: { - type: Boolean, - required: false, - default: true - }, - showFooter: { - type: Boolean, - required: false, - default: false - }, }, data() { @@ -113,35 +82,6 @@ export default Vue.extend({ getPageVars() { return collectPageVars(this.page.content); }, - - like() { - this.$root.api('pages/like', { - pageId: this.page.id, - }).then(() => { - this.page.isLiked = true; - this.page.likedCount++; - }); - }, - - unlike() { - this.$root.api('pages/unlike', { - pageId: this.page.id, - }).then(() => { - this.page.isLiked = false; - this.page.likedCount--; - }); - }, - - pin(pin) { - this.$root.api('i/update', { - pinnedPageId: pin ? this.page.id : null, - }).then(() => { - this.$root.dialog({ - type: 'success', - splash: true - }); - }); - } } }); diff --git a/src/client/pages/page.vue b/src/client/pages/page.vue index 72c5101731..f5ed556146 100644 --- a/src/client/pages/page.vue +++ b/src/client/pages/page.vue @@ -3,7 +3,26 @@ {{ page.title || page.name }} - +
+
{{ page.title }}
+
+ +
+ +
@@ -58,6 +77,35 @@ export default Vue.extend({ this.page = page; }); }, + + like() { + this.$root.api('pages/like', { + pageId: this.page.id, + }).then(() => { + this.page.isLiked = true; + this.page.likedCount++; + }); + }, + + unlike() { + this.$root.api('pages/unlike', { + pageId: this.page.id, + }).then(() => { + this.page.isLiked = false; + this.page.likedCount--; + }); + }, + + pin(pin) { + this.$root.api('i/update', { + pinnedPageId: pin ? this.page.id : null, + }).then(() => { + this.$root.dialog({ + type: 'success', + splash: true + }); + }); + } } }); -- cgit v1.2.3-freya