From f5d5d26b0e9c80bbf0caa591454d73183922e38d Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 30 Jan 2020 06:19:18 +0900 Subject: [PATCH] Adjust page style --- package.json | 2 +- src/client/components/page/page.vue | 64 +---------------------------- src/client/pages/page.vue | 50 +++++++++++++++++++++- 3 files changed, 52 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index 3a6d1c81d..7b4c80d58 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "12.0.0-alpha.10", + "version": "12.0.0-alpha.11", "codename": "indigo", "repository": { "type": "git", diff --git a/src/client/components/page/page.vue b/src/client/components/page/page.vue index bd7831347..9ec5da81e 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 72c510173..f5ed55614 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 + }); + }); + } } });