mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 18:45:35 +02:00
Merge branch 'develop' into vue3
This commit is contained in:
@@ -71,10 +71,10 @@
|
||||
<button v-else class="button _button">
|
||||
<fa :icon="faBan"/>
|
||||
</button>
|
||||
<button v-if="!isMyNote && appearNote.myReaction == null" class="button _button" @click="react()" ref="reactButton">
|
||||
<button v-if="appearNote.myReaction == null" class="button _button" @click="react()" ref="reactButton">
|
||||
<fa :icon="faPlus"/>
|
||||
</button>
|
||||
<button v-if="!isMyNote && appearNote.myReaction != null" class="button _button reacted" @click="undoReact(appearNote)" ref="reactButton">
|
||||
<button v-if="appearNote.myReaction != null" class="button _button reacted" @click="undoReact(appearNote)" ref="reactButton">
|
||||
<fa :icon="faMinus"/>
|
||||
</button>
|
||||
<button class="button _button" @click="menu()" ref="menuButton">
|
||||
@@ -407,18 +407,18 @@ export default defineComponent({
|
||||
...this.appearNote,
|
||||
};
|
||||
|
||||
const choices = [...this.appearNote.poll.choices];
|
||||
choices[choice] = {
|
||||
...choices[choice],
|
||||
votes: choices[choice].votes + 1,
|
||||
...(body.userId === this.$store.state.i.id ? {
|
||||
isVoted: true
|
||||
} : {})
|
||||
};
|
||||
|
||||
n.poll = {
|
||||
...this.appearNote.poll,
|
||||
choices: {
|
||||
...this.appearNote.poll.choices,
|
||||
[choice]: {
|
||||
...this.appearNote.poll.choices[choice],
|
||||
votes: this.appearNote.poll.choices[choice].votes + 1,
|
||||
...(body.userId === this.$store.state.i.id ? {
|
||||
isVoted: true
|
||||
} : {})
|
||||
}
|
||||
}
|
||||
choices: choices
|
||||
};
|
||||
|
||||
this.updateAppearNote(n);
|
||||
|
||||
@@ -51,11 +51,8 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isMe(): boolean {
|
||||
return this.$store.getters.isSignedIn && this.$store.state.i.id === this.note.userId;
|
||||
},
|
||||
canToggle(): boolean {
|
||||
return !this.reaction.match(/@\w/) && !this.isMe && this.$store.getters.isSignedIn;
|
||||
return !this.reaction.match(/@\w/) && this.$store.getters.isSignedIn;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
</transition>
|
||||
</div>
|
||||
<div class="sub">
|
||||
<button v-if="widgetsEditMode" class="_button edit active" @click="widgetsEditMode = false"><fa :icon="faGripVertical"/></button>
|
||||
<button v-else class="_button edit" @click="widgetsEditMode = true"><fa :icon="faGripVertical"/></button>
|
||||
<template v-if="$store.getters.isSignedIn">
|
||||
<button v-if="widgetsEditMode" class="_button edit active" @click="widgetsEditMode = false"><fa :icon="faGripVertical"/></button>
|
||||
<button v-else class="_button edit" @click="widgetsEditMode = true"><fa :icon="faGripVertical"/></button>
|
||||
</template>
|
||||
<div class="search">
|
||||
<fa :icon="faSearch"/>
|
||||
<input type="search" :placeholder="$t('search')" v-model="searchQuery" v-autocomplete="{ model: 'searchQuery' }" :disabled="searchWait" @keypress="searchKeypress"/>
|
||||
@@ -141,7 +143,7 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
|
||||
widgets(): any[] {
|
||||
widgets(): any {
|
||||
if (this.$store.getters.isSignedIn) {
|
||||
const widgets = this.$store.state.deviceUser.widgets;
|
||||
return {
|
||||
@@ -150,18 +152,24 @@ export default defineComponent({
|
||||
mobile: widgets.filter(x => x.place === 'mobile'),
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
left: [],
|
||||
right: [{
|
||||
const right = [{
|
||||
name: 'calendar',
|
||||
id: 'b', place: 'right', data: {}
|
||||
}, {
|
||||
name: 'trends',
|
||||
id: 'c', place: 'right', data: {}
|
||||
}];
|
||||
|
||||
if (this.$route.name !== 'index') {
|
||||
right.unshift({
|
||||
name: 'welcome',
|
||||
id: 'a', place: 'right', data: {}
|
||||
}, {
|
||||
name: 'calendar',
|
||||
id: 'b', place: 'right', data: {}
|
||||
}, {
|
||||
name: 'trends',
|
||||
id: 'c', place: 'right', data: {}
|
||||
}],
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
left: [],
|
||||
right,
|
||||
mobile: [],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user