summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-07-29 23:02:59 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-07-29 23:02:59 +0900
commit31a0afdaab309cd2e9fd22f0524730488202704d (patch)
tree2d4bbb6a42ce96d8fcf867da5b272380d4652753 /src/client
parent12.44.1 (diff)
downloadsharkey-31a0afdaab309cd2e9fd22f0524730488202704d.tar.gz
sharkey-31a0afdaab309cd2e9fd22f0524730488202704d.tar.bz2
sharkey-31a0afdaab309cd2e9fd22f0524730488202704d.zip
fix(client): ピン留めされたノートがリアクティブではない問題を修正
Diffstat (limited to 'src/client')
-rw-r--r--src/client/pages/user/index.vue7
1 files changed, 6 insertions, 1 deletions
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>