summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/scripts/should-mute-note.ts17
-rw-r--r--src/client/app/common/views/components/menu.vue6
-rw-r--r--src/client/app/desktop/views/components/note-detail.vue5
-rw-r--r--src/client/app/desktop/views/components/note.vue2
-rw-r--r--src/client/app/mobile/views/components/note-detail.vue2
-rw-r--r--src/client/app/mobile/views/components/note.vue2
6 files changed, 22 insertions, 12 deletions
diff --git a/src/client/app/common/scripts/should-mute-note.ts b/src/client/app/common/scripts/should-mute-note.ts
index 4eab76421d..8a6430b1df 100644
--- a/src/client/app/common/scripts/should-mute-note.ts
+++ b/src/client/app/common/scripts/should-mute-note.ts
@@ -2,8 +2,17 @@ export default function(me, settings, note) {
const isMyNote = note.userId == me.id;
const isPureRenote = note.renoteId != null && note.text == null && note.fileIds.length == 0 && note.poll == null;
- return settings.showMyRenotes === false && isMyNote && isPureRenote ||
- settings.showRenotedMyNotes === false && isPureRenote && note.renote.userId == me.id ||
- settings.showLocalRenotes === false && isPureRenote && note.renote.user.host == null ||
- !isMyNote && note.text && settings.mutedWords.some(q => q.length > 0 && !q.some(word => !note.text.includes(word)));
+ const includesMutedWords = (text: string) =>
+ text
+ ? settings.mutedWords.some(q => q.length > 0 && !q.some(word => !text.includes(word)))
+ : false;
+
+ return (
+ (!isMyNote && note.reply && includesMutedWords(note.reply.text)) ||
+ (!isMyNote && note.renote && includesMutedWords(note.renote.text)) ||
+ (settings.showMyRenotes === false && isMyNote && isPureRenote) ||
+ (settings.showRenotedMyNotes === false && isPureRenote && note.renote.userId == me.id) ||
+ (settings.showLocalRenotes === false && isPureRenote && note.renote.user.host == null) ||
+ (!isMyNote && includesMutedWords(note.text))
+ );
}
diff --git a/src/client/app/common/views/components/menu.vue b/src/client/app/common/views/components/menu.vue
index d601c74e7d..fb1b66a925 100644
--- a/src/client/app/common/views/components/menu.vue
+++ b/src/client/app/common/views/components/menu.vue
@@ -1,5 +1,5 @@
<template>
-<div class="onchrpzrvnoruiaenfcqvccjfuupzzwv" :class="{ big: $root.isMobile }">
+<div class="onchrpzrvnoruiaenfcqvccjfuupzzwv" :class="{ isMobile: $root.isMobile }">
<div class="backdrop" ref="backdrop" @click="close"></div>
<div class="popover" :class="{ hukidasi }" ref="popover">
<template v-for="item, i in items">
@@ -125,8 +125,10 @@ export default Vue.extend({
position initial
- &.big
+ &.isMobile
> .popover
+ border none
+
> button
font-size 15px
diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue
index 05dd10fe05..dfa11d57ab 100644
--- a/src/client/app/desktop/views/components/note-detail.vue
+++ b/src/client/app/desktop/views/components/note-detail.vue
@@ -32,8 +32,7 @@
<span class="visibility" v-if="appearNote.visibility != 'public'">
<fa v-if="appearNote.visibility == 'home'" icon="home"/>
<fa v-if="appearNote.visibility == 'followers'" icon="unlock"/>
- <fa v-if="appearNote.visibility == 'specified'" icon="envelope"/>
- <fa v-if="appearNote.visibility == 'private'" icon="lock"/>
+ <fa v-if="appearNote.visibility == 'specified'" icon="lock"/>
</span>
<span class="localOnly" v-if="appearNote.localOnly == true"><fa icon="heart"/></span>
</div>
@@ -71,7 +70,7 @@
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button v-if="['public', 'home'].includes(appearNote.visibility)" class="renoteButton" @click="renote()" :title="$t('renote')">
- <fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
+ <fa icon="retweet"/>
</button>
<button v-else class="inhibitedButton">
<fa icon="ban"/>
diff --git a/src/client/app/desktop/views/components/note.vue b/src/client/app/desktop/views/components/note.vue
index 50142e50bd..1953888c02 100644
--- a/src/client/app/desktop/views/components/note.vue
+++ b/src/client/app/desktop/views/components/note.vue
@@ -48,7 +48,7 @@
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button v-if="['public', 'home'].includes(appearNote.visibility)" class="renoteButton" @click="renote()" :title="$t('renote')">
- <fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
+ <fa icon="retweet"/>
</button>
<button v-else class="inhibitedButton">
<fa icon="ban"/>
diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue
index 72f522bbca..86620736c6 100644
--- a/src/client/app/mobile/views/components/note-detail.vue
+++ b/src/client/app/mobile/views/components/note-detail.vue
@@ -66,7 +66,7 @@
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button v-if="['public', 'home'].includes(appearNote.visibility)" @click="renote()" title="Renote">
- <fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
+ <fa icon="retweet"/>
</button>
<button v-else>
<fa icon="ban"/>
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index 6fb0f56dbf..09e55a9b99 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -44,7 +44,7 @@
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button v-if="['public', 'home'].includes(appearNote.visibility)" @click="renote()" title="Renote">
- <fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
+ <fa icon="retweet"/>
</button>
<button v-else>
<fa icon="ban"/>