From 31a0afdaab309cd2e9fd22f0524730488202704d Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Wed, 29 Jul 2020 23:02:59 +0900 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E3=83=94=E3=83=B3=E7=95=99?= =?UTF-8?q?=E3=82=81=E3=81=95=E3=82=8C=E3=81=9F=E3=83=8E=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=8C=E3=83=AA=E3=82=A2=E3=82=AF=E3=83=86=E3=82=A3=E3=83=96?= =?UTF-8?q?=E3=81=A7=E3=81=AF=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/pages/user/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index 20eaca3687..e2f3d67caa 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -83,7 +83,7 @@ <router-view :user="user"></router-view> <template v-if="$route.name == 'user'"> <div class="pins"> - <x-note v-for="note in user.pinnedNotes" class="note" :note="note" :key="note.id" :detail="true" :pinned="true"/> + <x-note v-for="note in user.pinnedNotes" class="note" :note="note" @updated="pinnedNoteUpdated(note, $event)" :key="note.id" :detail="true" :pinned="true"/> </div> <mk-container :body-togglable="true" class="content"> <template #header><fa :icon="faImage"/>{{ $t('images') }}</template> @@ -210,6 +210,11 @@ export default Vue.extend({ const pos = -(top / z); banner.style.backgroundPosition = `center calc(50% - ${pos}px)`; }, + + pinnedNoteUpdated(oldValue, newValue) { + const i = this.user.pinnedNotes.findIndex(n => n === oldValue); + Vue.set(this.user.pinnedNotes, i, newValue); + }, } }); </script>