Merge remote-tracking branch 'misskey-original/develop' into develop

# Conflicts:
#	CHANGELOG.md
#	packages/backend/src/server/api/endpoints/channels/timeline.ts
This commit is contained in:
mattyatea 2023-10-11 06:22:57 +09:00
commit 2e7c034b99
22 changed files with 24 additions and 67 deletions

View File

@ -14,8 +14,8 @@
## 2023.10.0
### NOTE
- muted_noteテーブルは使われなくなったため手動で削除を行ってください。
- 2023.9.2で導入されたノート編集機能はクオリティの高い実装が困難であることが判明したため撤回されました
- アップデートを行うと、タイムラインが一時的にリセットされます
### Changes
- API: users/notes, notes/local-timeline で fileType 指定はできなくなりました

View File

@ -995,9 +995,6 @@ _theme:
infoFg: "তথ্যের পাঠ্য"
infoWarnBg: "ওয়ার্নিং এর পটভূমি"
infoWarnFg: "ওয়ার্নিং এর পাঠ্য"
cwBg: "CW বাটনের পটভূমি"
cwFg: "CW বাটনের পাঠ্য"
cwHoverBg: "CW বাটনের পটভূমি (হভার)"
toastBg: "বিজ্ঞপ্তির পটভূমি"
toastFg: "বিজ্ঞপ্তির পাঠ্য"
buttonBg: "বাটনের পটভূমি"

View File

@ -1622,9 +1622,6 @@ _theme:
infoFg: "Text informací"
infoWarnBg: "Pozadí varování"
infoWarnFg: "Text varování"
cwBg: "Pozadí CW tlačítka"
cwFg: "Text CW tlačítka"
cwHoverBg: "Pozadí CW tlačítka (Hover)"
toastBg: "Pozadí oznámení"
toastFg: "Text oznámení"
buttonBg: "Pozadí tlačítka"

View File

@ -1685,9 +1685,6 @@ _theme:
infoFg: "Text von Informationen"
infoWarnBg: "Hintergrund von Warnungen"
infoWarnFg: "Text von Warnungen"
cwBg: "Hintergrund des Inhaltswarnungsknopfs"
cwFg: "Text des Inhaltswarnungsknopfs"
cwHoverBg: "Hintergrund des Inhaltswarnungsknopfs (Mouseover)"
toastBg: "Hintergrund von Benachrichtigungen"
toastFg: "Text von Benachrichtigungen"
buttonBg: "Hintergrund von Schaltflächen"

View File

@ -1693,9 +1693,6 @@ _theme:
infoFg: "Information text"
infoWarnBg: "Warning background"
infoWarnFg: "Warning text"
cwBg: "CW button background"
cwFg: "CW button text"
cwHoverBg: "CW button background (Hover)"
toastBg: "Notification background"
toastFg: "Notification text"
buttonBg: "Button background"

View File

@ -1666,9 +1666,6 @@ _theme:
infoFg: "Texto de información"
infoWarnBg: "Fondo de advertencias"
infoWarnFg: "Texto de advertencias"
cwBg: "Fondo del botón CW"
cwFg: "Texto del botón CW"
cwHoverBg: "Fondo del botón CW (hover)"
toastBg: "Fondo de notificaciones"
toastFg: "Texto de notificaciones"
buttonBg: "Fondo de botón"

View File

@ -1358,9 +1358,6 @@ _theme:
infoFg: "Texte d'information"
infoWarnBg: "Arrière-plan des avertissements"
infoWarnFg: "Texte davertissement"
cwBg: "Arrière-plan du CW"
cwFg: "Texte du bouton CW"
cwHoverBg: "Arrière-plan du bouton CW (survolé)"
toastBg: "Arrière-plan de la bulle de notification"
toastFg: "Texte de la bulle de notification"
buttonBg: "Arrière-plan du bouton"

View File

@ -1627,9 +1627,6 @@ _theme:
infoFg: "Teks informasi"
infoWarnBg: "Latar belakang peringatan"
infoWarnFg: "Teks peringatan"
cwBg: "Latar belakang tombol Sembunyikan Konten"
cwFg: "Teks tombol Sembunyikan Konten"
cwHoverBg: "Latar belakang tombol Sembunyikan Konten (Mengambang)"
toastBg: "Latar belakang notifikasi"
toastFg: "Teks notifikasi"
buttonBg: "Latar belakang tombol"

View File

@ -1685,9 +1685,6 @@ _theme:
infoFg: "Testo di informazioni"
infoWarnBg: "Sfondo degli avvisi"
infoWarnFg: "Testo di avviso"
cwBg: "Sfondo del CW"
cwFg: "Testo del pulsante CW"
cwHoverBg: "Sfondo del pulsante CW (sorvolato)"
toastBg: "Sfondo di notifica a comparsa"
toastFg: "Testo di notifica a comparsa"
buttonBg: "Sfondo del pulsante"

View File

@ -1649,9 +1649,6 @@ _theme:
infoFg: "情報の文字"
infoWarnBg: "警告の背景"
infoWarnFg: "警告の文字"
cwBg: "CW ボタンの背景"
cwFg: "CW ボタンの文字"
cwHoverBg: "CW ボタンの背景 (ホバー)"
toastBg: "通知トーストの背景"
toastFg: "通知トーストの文字"
buttonBg: "ボタンの背景"

View File

@ -1663,9 +1663,6 @@ _theme:
infoFg: "정보창 텍스트"
infoWarnBg: "경고창 배경"
infoWarnFg: "경고창 텍스트"
cwBg: "CW 버튼 배경"
cwFg: "CW 버튼 텍스트"
cwHoverBg: "CW 버튼 배경 (호버)"
toastBg: "알림창 배경"
toastFg: "알림창 텍스트"
buttonBg: "버튼 배경"

View File

@ -1043,9 +1043,6 @@ _theme:
infoFg: "Tekst informacji"
infoWarnBg: "Tło ostrzeżenia"
infoWarnFg: "Tekst ostrzeżenia"
cwBg: "Tło CW"
cwFg: "Tekst CW"
cwHoverBg: "Tło CW (po najechaniu)"
toastBg: "Tło powiadomień"
toastFg: "Tekst powiadomień"
buttonBg: "Tło przycisku"

View File

@ -1551,9 +1551,6 @@ _theme:
infoFg: "Текст сообщения"
infoWarnBg: "Фон предупреждения"
infoWarnFg: "Текст предупреждения"
cwBg: "Фон предупреждения о содержимом"
cwFg: "Текст предупреждения о содержимом"
cwHoverBg: "Фон предупреждения о содержимом (под указателем)"
toastBg: "Фон оповещения"
toastFg: "Текст оповещения"
buttonBg: "Фон кнопки"

View File

@ -1102,9 +1102,6 @@ _theme:
infoFg: "Informačný text"
infoWarnBg: "Pozadie varovania"
infoWarnFg: "Text varovania"
cwBg: "CW pozadie tlačidla"
cwFg: "CW text tlačidla"
cwHoverBg: "CW pozadie tlačidla (pod kurzorom)"
toastBg: "Pozadie upozornenia"
toastFg: "Text upozornenia"
buttonBg: "Pozadie tlačidla"

View File

@ -1663,9 +1663,6 @@ _theme:
infoFg: "ข้อความข้อมูล"
infoWarnBg: "คำเตือนพื้นหลัง"
infoWarnFg: "คำเตือนข้อความ"
cwBg: "ปุ่ม CW พื้นหลัง"
cwFg: "ปุ่ม CW ข้อความ"
cwHoverBg: "ปุ่ม CW พื้นหลัง (โฮเวอร์)"
toastBg: "ประวัติการแจ้งเตือน"
toastFg: "ข้อความแจ้งเตือน"
buttonBg: "ปุ่มพื้นหลัง"

View File

@ -1290,9 +1290,6 @@ _theme:
infoFg: "Текст інформації"
infoWarnBg: "Фон попередження"
infoWarnFg: "Текст попередження"
cwBg: "Фон чутливого змісту"
cwFg: "Текст чутливого змісту"
cwHoverBg: "Фон чутливого змісту (при наведенні)"
toastBg: "Фон повідомлення"
toastFg: "Текст повідомлення"
buttonBg: "Фон кнопки"

View File

@ -1467,9 +1467,6 @@ _theme:
infoFg: "Chữ thông tin"
infoWarnBg: "Nền cảnh báo"
infoWarnFg: "Chữ cảnh báo"
cwBg: "Nền nút nội dung ẩn"
cwFg: "Chữ nút nội dung ẩn"
cwHoverBg: "Nền nút nội dung ẩn (Chạm)"
toastBg: "Nền thông báo"
toastFg: "Chữ thông báo"
buttonBg: "Nền nút"

View File

@ -1673,9 +1673,6 @@ _theme:
infoFg: "信息文本"
infoWarnBg: "警告背景"
infoWarnFg: "警告文本"
cwBg: "隐藏内容按钮背景"
cwFg: "隐藏内容按钮文本"
cwHoverBg: "隐藏内容按钮背景(悬停)"
toastBg: "Toast 通知背景"
toastFg: "Toast 通知文本"
buttonBg: "按钮背景"

View File

@ -1685,9 +1685,6 @@ _theme:
infoFg: "資訊內容"
infoWarnBg: "警告背景"
infoWarnFg: "警告文字"
cwBg: "隱藏內容按鈕背景"
cwFg: "隱藏內容按鈕文字"
cwHoverBg: "隱藏內容按鈕背景(懸浮)"
toastBg: "通知背景"
toastFg: "通知文本"
buttonBg: "按鈕背景"

View File

@ -94,7 +94,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
] = me ? await Promise.all([
this.cacheService.userMutingsCache.fetch(me.id),
]) : [new Set<string>()];
console.log(userIdsWhoMeMuting)
let noteIds = await this.redisTimelineService.get(`channelTimeline:${channel.id}`, untilId, sinceId);
noteIds = noteIds.slice(0, ps.limit);

View File

@ -77,6 +77,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.genId(new Date(ps.untilDate!)) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.genId(new Date(ps.sinceDate!)) : null);
const isRangeSpecified = untilId != null && sinceId != null;
const isSelf = me && (me.id === ps.userId);
if (isRangeSpecified || sinceId == null) {
const [
@ -100,7 +101,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
noteIds = noteIds.slice(0, ps.limit);
if (noteIds.length > 0) {
const isFollowing = me ? me.id === ps.userId || Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(me.id), ps.userId) : false;
const isFollowing = me && Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(me.id), ps.userId);
const query = this.notesRepository.createQueryBuilder('note')
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
@ -122,8 +123,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}
if (note.channel?.isSensitive && !isSelf) return false;
if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false;
if (note.visibility === 'followers' && !isFollowing) return false;
if (note.visibility === 'followers' && !isFollowing && !isSelf) return false;
return true;
});

View File

@ -10,15 +10,18 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="$style.root">
<MkLoading v-if="fetching"/>
<div v-if="!fetching && files.length > 0" :class="$style.stream">
<MkA
v-for="file in files"
:key="file.note.id + file.file.id"
:class="$style.img"
:to="notePage(file.note)"
>
<template v-for="file in files" :key="file.note.id + file.file.id">
<div v-if="file.file.isSensitive && !showingFiles.includes(file.file.id)" :class="$style.sensitive" @click="showingFiles.push(file.file.id)">
<div>
<div><i class="ti ti-eye-exclamation"></i> {{ i18n.ts.sensitive }}</div>
<div>{{ i18n.ts.clickToShow }}</div>
</div>
</div>
<MkA v-else :class="$style.img" :to="notePage(file.note)">
<!-- TODO: 画像以外のファイルに対応 -->
<ImgWithBlurhash :hash="file.file.blurhash" :src="thumbnail(file.file)" :title="file.file.name"/>
</MkA>
</template>
</div>
<p v-if="!fetching && files.length == 0" :class="$style.empty">{{ i18n.ts.nothing }}</p>
</div>
@ -45,6 +48,7 @@ let files = $ref<{
note: Misskey.entities.Note;
file: Misskey.entities.DriveFile;
}[]>([]);
let showingFiles = $ref<string[]>([]);
function thumbnail(image: Misskey.entities.DriveFile): string {
return defaultStore.state.disableShowingAnimatedImages
@ -96,4 +100,9 @@ onMounted(() => {
padding: 16px;
text-align: center;
}
.sensitive {
display: grid;
place-items: center;
}
</style>