From 8dfd892b71be7e594b6f192d8ceee71ab02d3f3f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Jun 2018 15:51:43 +0900 Subject: [PATCH] wip --- .../components/follow-requests-window.vue | 24 ++++++++++++++++--- .../views/components/ui.header.account.vue | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/client/app/desktop/views/components/follow-requests-window.vue b/src/client/app/desktop/views/components/follow-requests-window.vue index c864f1f9c..fd37c0a6a 100644 --- a/src/client/app/desktop/views/components/follow-requests-window.vue +++ b/src/client/app/desktop/views/components/follow-requests-window.vue @@ -3,7 +3,12 @@ %fa:envelope R% %i18n:@title%
- {{ req.followee | userName }} +
+ {{ req.follower | userName }} + + %i18n:@accept%|%i18n:@reject% + +
@@ -24,6 +29,16 @@ export default Vue.extend({ }); }, methods: { + accept(user) { + (this as any).api('following/requests/accept', { userId: user.id }).then(() => { + this.requests = this.requests.filter(r => r.follower.id != user.id); + }); + }, + reject(user) { + (this as any).api('following/requests/reject', { userId: user.id }).then(() => { + this.requests = this.requests.filter(r => r.follower.id != user.id); + }); + }, close() { (this as any).$refs.window.close(); } @@ -39,12 +54,15 @@ root(isDark) > button margin-bottom 16px - > a - display block + > div + display flex padding 16px border solid 1px isDark ? #1c2023 : #eee border-radius 4px + > span + margin 0 0 0 auto + [data-id="c1136cec-1278-49b1-9ea7-412c1ef794f4"][data-darkmode] root(true) diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue index d110d700a..8c2da6596 100644 --- a/src/client/app/desktop/views/components/ui.header.account.vue +++ b/src/client/app/desktop/views/components/ui.header.account.vue @@ -238,6 +238,7 @@ root(isDark) margin-left 4px padding 2px 8px font-size 90% + font-style normal background $theme-color color $theme-color-foreground border-radius 8px