Compare commits
65 Commits
Author | SHA1 | Date | |
---|---|---|---|
ac32077221 | |||
a5902acacd | |||
c7c08b7511 | |||
7de915d47b | |||
9107547501 | |||
95dc76ca19 | |||
49c2a9b372 | |||
b378cabfc7 | |||
4263dbef31 | |||
32fc6ae2eb | |||
238cb0077f | |||
f5a06b6494 | |||
502de89ab1 | |||
128de6750c | |||
e59e2d9f0b | |||
2504b8391b | |||
330ea7d210 | |||
1edd173a29 | |||
98d873a7f9 | |||
09175b84df | |||
177e19632a | |||
8e6207f3e9 | |||
ff3a97f6cf | |||
b8e155ab40 | |||
b8e7df198d | |||
34311e3181 | |||
46115d3f04 | |||
c1d25d2394 | |||
880cea5a56 | |||
e7205d9cc2 | |||
f456feb3ff | |||
3f83beedb7 | |||
e6c9b1d9bd | |||
b46114f4fa | |||
8d77e2ba22 | |||
cb3900921f | |||
ae2021583d | |||
36cd88e6b7 | |||
517b0908da | |||
b23b3e4d21 | |||
883fc5dde0 | |||
9d044329f6 | |||
d1e9e74cb8 | |||
98a87ee75f | |||
331491077d | |||
913c3a6636 | |||
fbaf5fe355 | |||
804c932f60 | |||
cef6d1d1b6 | |||
e4e7ab1135 | |||
6ca30df8c4 | |||
a340d4ed8e | |||
ca7cb94358 | |||
54779b25f5 | |||
44d7652171 | |||
c9ed15b682 | |||
8faad646ae | |||
1d50bc3382 | |||
da4af041af | |||
e2ff408f2f | |||
f799375635 | |||
65704bbf01 | |||
9cb3882efa | |||
a0833ca691 | |||
a4f197f608 |
65
CHANGELOG.md
65
CHANGELOG.md
@ -1,6 +1,71 @@
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
12.19.0 (2020/02/21)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
* アンテナで除外キーワードを設定できるように
|
||||
|
||||
### 🐛Fixes
|
||||
* ハッシュタグをもっと見るできないのを修正
|
||||
* 無効になっているタイムラインでも使用できるかのように表示される問題を修正
|
||||
* バックグラウンドで受信したノートの画像が表示されない問題を修正
|
||||
* サインインフォームが表示されない場所がある問題を修正
|
||||
* ボリュームが0のときサウンドを鳴らさないように
|
||||
|
||||
12.18.1 (2020/02/20)
|
||||
-------------------
|
||||
### 🐛Fixes
|
||||
* タイムラインのハイライトに自分のノートは含めないように
|
||||
* ハッシュタグの集計に関する問題を修正
|
||||
|
||||
12.18.0 (2020/02/20)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
* 効果音設定を強化
|
||||
* UIの調整
|
||||
|
||||
### 🐛Fixes
|
||||
* ユーザープレビューが稀に画面上から消えなくなってしまう問題を修正
|
||||
* ハッシュタグ検索が遅い問題を修正
|
||||
|
||||
12.17.0 (2020/02/20)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
* 効果音を実装
|
||||
* 切断時ダイアログを控えめに
|
||||
|
||||
### 🐛Fixes
|
||||
* 新しいノートの通知が崩れる問題を修正
|
||||
* LegacyReaction変換にstarを追加
|
||||
* ユーザープレビューが稀に画面上から消えなくなってしまう問題を修正
|
||||
* media-listのgridの高さがsub-note-detailsのdetailsの中だと287pxになってしまっていたのを修正
|
||||
|
||||
12.16.0 (2020/02/19)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
* 通知一覧をポップアップではなくページで表示できるように
|
||||
* 返信、引用、メンションの通知を直接ノートとして表示するように
|
||||
|
||||
### 🐛Fixes
|
||||
* v12以前のリアクションが表示されない問題を修正
|
||||
|
||||
12.15.0 (2020/02/19)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
* 固定投稿フォームを実装
|
||||
* ページ遷移のトランジションを無しに
|
||||
* スクロールしてるときに新しいノートが来たときにわかるように表示するように
|
||||
|
||||
### 🐛Fixes
|
||||
* ページのいいねボタンを修正
|
||||
|
||||
12.14.0 (2020/02/18)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
* オブジェクトストレージの設定を実装
|
||||
* サーバーログビューア実装
|
||||
|
||||
12.13.0 (2020/02/18)
|
||||
-------------------
|
||||
### ✨Improvements
|
||||
|
@ -26,14 +26,86 @@ uploading: "Upload läuft"
|
||||
save: "Speichern"
|
||||
users: "Benutzer"
|
||||
addUser: "Benutzer hinzufügen"
|
||||
favorite: "Favoriten"
|
||||
favorites: "Favoriten"
|
||||
unfavorite: "Aus Favoriten entfernen"
|
||||
pin: "Anheften"
|
||||
unpin: "Lösen"
|
||||
copyContent: "Inhalt kopieren"
|
||||
copyLink: "Link kopieren"
|
||||
delete: "Löschen"
|
||||
addToList: "Zur Liste hinzufügen"
|
||||
sendMessage: "Nachricht senden"
|
||||
copyUsername: "Benutzernamen kopieren"
|
||||
reply: "Antworten"
|
||||
loadMore: "Zeige mehr"
|
||||
youGotNewFollower: "Sie haben einen neuen Follower"
|
||||
receiveFollowRequest: "Follow Request erhalten."
|
||||
followRequestAccepted: "FollowRequestAkzeptiert"
|
||||
mentions: "Erwähnungen"
|
||||
directNotes: "Direktnachrichten"
|
||||
importAndExport: "Importieren und Exportieren"
|
||||
import: "Importieren"
|
||||
export: "Exportieren"
|
||||
files: "Dateien"
|
||||
download: "Download"
|
||||
lists: "Listen"
|
||||
noLists: "Keine Liste!"
|
||||
note: "Noten"
|
||||
following: "Folgen"
|
||||
followers: "Folgende"
|
||||
manageLists: "Liste verwalten"
|
||||
error: "Ein Problem ist aufgetreten"
|
||||
retry: "Wiederholen"
|
||||
privacy: "Privatsphäre"
|
||||
defaultNoteVisibility: "Die Standardsichtbarkeit"
|
||||
follow: "Folgen"
|
||||
followRequest: "Follower-Anfragen"
|
||||
followRequests: "Follower-Anfragen"
|
||||
unfollow: "Nicht mehr folgen"
|
||||
followRequestPending: "Ausstehend"
|
||||
clickToShow: "Klicke zum den Inhalt anzusehen"
|
||||
sensitive: "Dieser Inhalt ist NSFW"
|
||||
add: "Hinzufügen"
|
||||
reaction: "Reaktionen"
|
||||
selectUser: "Benutzer wählen"
|
||||
instances: "Instanz"
|
||||
mutedUsers: "Stummgestellte Benutzer"
|
||||
blockedUsers: "Blockierte Benutzer"
|
||||
noUsers: "Keine Benutzer"
|
||||
remove: "Löschen"
|
||||
nsfw: "Dieser Inhalt ist NSFW"
|
||||
userList: "Listen"
|
||||
_sfx:
|
||||
notification: "Benachrichtigungen"
|
||||
_widgets:
|
||||
notifications: "Benachrichtigungen"
|
||||
timeline: "Zeitleiste"
|
||||
_cw:
|
||||
show: "Zeige mehr"
|
||||
_visibility:
|
||||
followers: "Folgende"
|
||||
_profile:
|
||||
username: "Benutzername"
|
||||
_exportOrImport:
|
||||
followingList: "Folgen"
|
||||
userLists: "Listen"
|
||||
_pages:
|
||||
script:
|
||||
categories:
|
||||
list: "Listen"
|
||||
blocks:
|
||||
_join:
|
||||
arg1: "Listen"
|
||||
_randomPick:
|
||||
arg1: "Listen"
|
||||
_dailyRandomPick:
|
||||
arg1: "Listen"
|
||||
_seedRandomPick:
|
||||
arg2: "Listen"
|
||||
_pick:
|
||||
arg1: "Listen"
|
||||
_listLen:
|
||||
arg1: "Listen"
|
||||
types:
|
||||
array: "Listen"
|
||||
|
@ -239,6 +239,8 @@ avatar: "Avatar"
|
||||
banner: "Banner"
|
||||
nsfw: "NSFW"
|
||||
disconnectedFromServer: "Connection to the server was inturrupted"
|
||||
reload: "Refresh"
|
||||
doNothing: "Ignore"
|
||||
reloadConfirm: "Would you like to retry?"
|
||||
watch: "Watch"
|
||||
unwatch: "Undo Watch"
|
||||
@ -412,6 +414,29 @@ dayOverDayChanges: "Daily"
|
||||
accessibility: "Accessibility"
|
||||
clinetSettings: "Client Settings"
|
||||
accountSettings: "Account Settings"
|
||||
promotion: "Promoted"
|
||||
promote: "Promote"
|
||||
numberOfDays: "Amount of days"
|
||||
hideThisNote: "Hide this note"
|
||||
showFeaturedNotesInTimeline: "Show Featured notes in Timeline"
|
||||
objectStorage: "Object Storage"
|
||||
useObjectStorage: "Use object storage"
|
||||
serverLogs: "Server logs"
|
||||
deleteAll: "Delete all"
|
||||
showFixedPostForm: "Display the posting form at the top of the timeline"
|
||||
newNoteRecived: "You've got a new note"
|
||||
useNotificationsPopup: "Display notification list in popup"
|
||||
sounds: "Sounds"
|
||||
listen: "Listen"
|
||||
none: "None"
|
||||
volume: "Volume"
|
||||
_sfx:
|
||||
note: "New note"
|
||||
noteMy: "My note"
|
||||
notification: "Notifications"
|
||||
chat: "Messaging"
|
||||
chatBg: "Messaging (Background)"
|
||||
antenna: "Antenna Reception"
|
||||
_ago:
|
||||
unknown: "Unknown"
|
||||
future: "Future"
|
||||
@ -513,6 +538,7 @@ _widgets:
|
||||
clock: "Clock"
|
||||
rss: "RSS reader"
|
||||
activity: "Activity"
|
||||
photos: "Photos"
|
||||
_cw:
|
||||
hide: "Hide"
|
||||
show: "Load more"
|
||||
|
@ -239,6 +239,8 @@ avatar: "Avatar"
|
||||
banner: "Banner"
|
||||
nsfw: "Marcado como sensible"
|
||||
disconnectedFromServer: "Desconectado del servidor"
|
||||
reload: "Recargar"
|
||||
doNothing: "No hacer nada"
|
||||
reloadConfirm: "¿Desea recargar?"
|
||||
watch: "Ver"
|
||||
unwatch: "Dejar de ver"
|
||||
@ -412,6 +414,29 @@ dayOverDayChanges: "Dif diaria"
|
||||
accessibility: "Accesibilidad"
|
||||
clinetSettings: "Ajustes del cliente"
|
||||
accountSettings: "Ajustes de cuenta"
|
||||
promotion: "Promovido"
|
||||
promote: "Promover"
|
||||
numberOfDays: "Cantidad de dias"
|
||||
hideThisNote: "Ocultar esta nota"
|
||||
showFeaturedNotesInTimeline: "Mostrar notas destacadas en la línea de tiempo"
|
||||
objectStorage: "Almacenamiento de objetos"
|
||||
useObjectStorage: "Usar almacenamiento de objetos"
|
||||
serverLogs: "Registros del servidor"
|
||||
deleteAll: "Eliminar todos"
|
||||
showFixedPostForm: "Mostrar el formulario de las entradas encima de la línea de tiempo"
|
||||
newNoteRecived: "Tienes una nota nuevo"
|
||||
useNotificationsPopup: "Mostrar lista de notificaciones en ventana emergente"
|
||||
sounds: "Sonidos"
|
||||
listen: "Escuchar"
|
||||
none: "Ninguna"
|
||||
volume: "Volumen"
|
||||
_sfx:
|
||||
note: "Notas"
|
||||
noteMy: "Nota (a mí mismo)"
|
||||
notification: "Notificaciones"
|
||||
chat: "Chat"
|
||||
chatBg: "Chat (Fondo)"
|
||||
antenna: "Antena receptora"
|
||||
_ago:
|
||||
unknown: "Desconocido"
|
||||
future: "Futuro"
|
||||
@ -513,6 +538,7 @@ _widgets:
|
||||
clock: "Reloj"
|
||||
rss: "Lector RSS"
|
||||
activity: "Actividad"
|
||||
photos: "Fotos"
|
||||
_cw:
|
||||
hide: "Ocultar"
|
||||
show: "Ver más"
|
||||
|
@ -239,6 +239,8 @@ avatar: "Avatar"
|
||||
banner: "Bannière"
|
||||
nsfw: "Contenu sensible"
|
||||
disconnectedFromServer: "Déconnecté du serveur"
|
||||
reload: "Rafraîchir"
|
||||
doNothing: "Ignorer"
|
||||
reloadConfirm: "Voulez-vous recharger?"
|
||||
watch: "Surveiller"
|
||||
unwatch: "Ne plus surveiller"
|
||||
@ -412,6 +414,29 @@ dayOverDayChanges: "Diff quotidien"
|
||||
accessibility: "Accessibilité"
|
||||
clinetSettings: "Paramètres du client"
|
||||
accountSettings: "Paramètres du compte"
|
||||
promotion: "Promu"
|
||||
promote: "Promouvoir"
|
||||
numberOfDays: "Nombre de jours"
|
||||
hideThisNote: "Masquer cette note"
|
||||
showFeaturedNotesInTimeline: "Afficher les notes en vedette dans Fil d'actualité"
|
||||
objectStorage: "Stockage d'objets"
|
||||
useObjectStorage: "Utiliser le stockage d'objets"
|
||||
serverLogs: "Journaux serveur"
|
||||
deleteAll: "Supprimer tout"
|
||||
showFixedPostForm: "Afficher le formulaire en haut du fil d'actualité"
|
||||
newNoteRecived: "Vous avez un nouveau note"
|
||||
useNotificationsPopup: "Afficher la liste des notifications dans une fenêtre contextuelle"
|
||||
sounds: "Sons"
|
||||
listen: "Écouter"
|
||||
none: "Rien"
|
||||
volume: "Volume"
|
||||
_sfx:
|
||||
note: "Nouvelle note"
|
||||
noteMy: "Ma note"
|
||||
notification: "Notifications"
|
||||
chat: "Discuter"
|
||||
chatBg: "Discuter (De fond)"
|
||||
antenna: "Réception d'antenne"
|
||||
_ago:
|
||||
unknown: "Inconnu"
|
||||
future: "Futur"
|
||||
@ -431,6 +456,16 @@ _time:
|
||||
_tutorial:
|
||||
title: "Comment utiliser Misskey"
|
||||
step1_1: "Bienvenue,"
|
||||
step1_2: "Cette page est appelée \"timeline\". Elle montre les \"notes\" des personnes que vous \"suivez\" dans l'ordre chronologique."
|
||||
step1_3: "Vous n'avez pas encore posté de notes ou ne suivez personne, vous ne devriez donc rien voir dans la chronologie."
|
||||
step2_1: "Finissons de créer votre profil avant d'écrire une note ou de suivre quelqu'un."
|
||||
step2_2: "En fournissant quelques informations sur vous, il sera plus facile pour les autres de vous suivre."
|
||||
step3_1: "Vous avez fini de créer votre profil ?"
|
||||
step3_2: "L’étape suivante consiste à créer une note. Vous pouvez commencer en cliquant sur l’icône crayon sur l’écran."
|
||||
step3_3: "Remplissez le cadran et cliquez sur le bouton en haut à droite pour envoyer."
|
||||
step3_4: "Vous n'avez rien à dire ? Essayez de dire \"J'ai commencé à utiliser Misskey\"."
|
||||
step4_1: "Avez-vous posté votre première notes ?"
|
||||
step4_2: "Votre première note est maintenant affichée sur votre timeline."
|
||||
_2fa:
|
||||
alreadyRegistered: "Cette étape à déjà été complétée"
|
||||
registerDevice: "S’inscrire l'appareil"
|
||||
@ -493,6 +528,7 @@ _widgets:
|
||||
clock: "Horloge"
|
||||
rss: "Lecteur de flux RSS"
|
||||
activity: "Activités"
|
||||
photos: "Photos"
|
||||
_cw:
|
||||
hide: "Masquer"
|
||||
show: "Voir plus"
|
||||
|
@ -239,6 +239,8 @@ avatar: "アイコン"
|
||||
banner: "バナー"
|
||||
nsfw: "閲覧注意"
|
||||
disconnectedFromServer: "サーバーから切断されました"
|
||||
reload: "リロード"
|
||||
doNothing: "なにもしない"
|
||||
reloadConfirm: "リロードしますか?"
|
||||
watch: "ウォッチ"
|
||||
unwatch: "ウォッチ解除"
|
||||
@ -284,6 +286,7 @@ manageAntennas: "アンテナの管理"
|
||||
name: "名前"
|
||||
antennaSource: "受信ソース"
|
||||
antennaKeywords: "受信キーワード"
|
||||
antennaExcludeKeywords: "除外キーワード"
|
||||
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
||||
notifyAntenna: "新しいノートを通知する"
|
||||
withFileAntenna: "ファイルが添付されたノートのみ"
|
||||
@ -417,6 +420,25 @@ promote: "プロモート"
|
||||
numberOfDays: "日数"
|
||||
hideThisNote: "このノートを非表示"
|
||||
showFeaturedNotesInTimeline: "タイムラインにおすすめのノートを表示する"
|
||||
objectStorage: "オブジェクトストレージ"
|
||||
useObjectStorage: "オブジェクトストレージを使用"
|
||||
serverLogs: "サーバーログ"
|
||||
deleteAll: "全て削除"
|
||||
showFixedPostForm: "タイムライン上部に投稿フォームを表示する"
|
||||
newNoteRecived: "新しいノートがあります"
|
||||
useNotificationsPopup: "通知一覧をポップアップで表示"
|
||||
sounds: "サウンド"
|
||||
listen: "聴く"
|
||||
none: "なし"
|
||||
volume: "音量"
|
||||
|
||||
_sfx:
|
||||
note: "ノート"
|
||||
noteMy: "ノート(自分)"
|
||||
notification: "通知"
|
||||
chat: "チャット"
|
||||
chatBg: "チャット(バックグラウンド)"
|
||||
antenna: "アンテナ受信"
|
||||
|
||||
_ago:
|
||||
unknown: "謎"
|
||||
|
@ -109,6 +109,8 @@ aboutMisskey: "Misskeyってなんや?"
|
||||
notFoundDescription: "指定されたURLに該当するページはあらへんやった。"
|
||||
close: "さいなら"
|
||||
joinedGroups: "参加しとるグループ"
|
||||
_sfx:
|
||||
notification: "通知"
|
||||
_ago:
|
||||
unknown: "謎"
|
||||
future: "未来"
|
||||
|
@ -23,7 +23,12 @@ login: "ಪ್ರವೇಶ"
|
||||
loggingIn: "ಪ್ರವೇಶಿಸುತ್ತಾ..."
|
||||
logout: "ಆಚೆಗೆ"
|
||||
signup: "ನೋಂದಣಿ"
|
||||
uploading: "ಅಪ್ಲೋಡಾಗುತ್ತಿದೆ"
|
||||
save: "ಉಳಿಸಿ"
|
||||
users: "ಬಳಕೆದಾರ"
|
||||
instances: "ನಿದರ್ಶನ"
|
||||
_sfx:
|
||||
notification: "ಅಧಿಸೂಚನೆಗಳು"
|
||||
_widgets:
|
||||
notifications: "ಅಧಿಸೂಚನೆಗಳು"
|
||||
timeline: "ಸಮಯಸಾಲು"
|
||||
|
@ -239,6 +239,8 @@ avatar: "아바타"
|
||||
banner: "배너"
|
||||
nsfw: "열람주의"
|
||||
disconnectedFromServer: "서버와의 연결이 끊어졌습니다"
|
||||
reload: "새로고침"
|
||||
doNothing: "무시하기"
|
||||
reloadConfirm: "새로고침 하시겠습니까?"
|
||||
watch: "지켜보기"
|
||||
unwatch: "지켜보기 해제"
|
||||
@ -412,6 +414,29 @@ dayOverDayChanges: "어제보다"
|
||||
accessibility: "접근성"
|
||||
clinetSettings: "클라이언트 설정"
|
||||
accountSettings: "계정 설정"
|
||||
promotion: "프로모션"
|
||||
promote: "프로모션하기"
|
||||
numberOfDays: "며칠동안"
|
||||
hideThisNote: "이 노트를 숨기기"
|
||||
showFeaturedNotesInTimeline: "타임라인에 추천 노트를 표시"
|
||||
objectStorage: "오브젝트 스토리지"
|
||||
useObjectStorage: "오브젝트 스토리지를 사용"
|
||||
serverLogs: "서버 로그"
|
||||
deleteAll: "모두 삭제"
|
||||
showFixedPostForm: "타임라인 상단에 글 작성란을 표시"
|
||||
newNoteRecived: "새 노트가 있습니다"
|
||||
useNotificationsPopup: "알림 목록을 팝업으로 표시"
|
||||
sounds: "소리"
|
||||
listen: "듣기"
|
||||
none: "없음"
|
||||
volume: "음량"
|
||||
_sfx:
|
||||
note: "새 노트"
|
||||
noteMy: "내 노트"
|
||||
notification: "알림"
|
||||
chat: "대화"
|
||||
chatBg: "대화 (백그라운드)"
|
||||
antenna: "안테나 수신"
|
||||
_ago:
|
||||
unknown: "알 수 없음"
|
||||
future: "미래"
|
||||
@ -513,6 +538,7 @@ _widgets:
|
||||
clock: "시계"
|
||||
rss: "RSS 리더"
|
||||
activity: "활동"
|
||||
photos: "사진"
|
||||
_cw:
|
||||
hide: "숨기기"
|
||||
show: "더 보기"
|
||||
|
@ -315,8 +315,10 @@ moderator: "版主"
|
||||
nUsersMentioned: "{n} 被提到"
|
||||
securityKey: "安全密钥"
|
||||
securityKeyName: "密钥名称"
|
||||
registerSecurityKey: "注册安全密钥"
|
||||
lastUsed: "最后使用:"
|
||||
unregister: "删除账户"
|
||||
passwordLessLogin: "无密码登录"
|
||||
resetPassword: "重置密码"
|
||||
newPasswordIs: "新的密码是「{password}」"
|
||||
post: "投稿"
|
||||
@ -327,10 +329,12 @@ autoNoteWatchDescription: "让您能够收到关于「反应」和回复其他
|
||||
reduceUiAnimation: "减少UI动画"
|
||||
share: "分享"
|
||||
notFound: "未找到"
|
||||
notFoundDescription: "没有与指定URL对应的页面。"
|
||||
uploadFolder: "默认上传文件夹"
|
||||
cacheClear: "清空缓存"
|
||||
markAsReadAllNotifications: "将所有通知标为已读"
|
||||
markAsReadAllUnreadNotes: "将所有帖子标记为已读"
|
||||
markAsReadAllTalkMessages: "将所有聊天标记为已读"
|
||||
help: "帮助"
|
||||
inputMessageHere: "在此键入信息"
|
||||
close: "关闭"
|
||||
@ -343,6 +347,8 @@ invites: "邀请"
|
||||
groupName: "群组名"
|
||||
members: "成员"
|
||||
transfer: "转让"
|
||||
messagingWithUser: "与用户聊天"
|
||||
messagingWithGroup: "与群组聊天"
|
||||
title: "标题"
|
||||
text: "文本"
|
||||
enable: "启用"
|
||||
@ -353,6 +359,7 @@ inviteToGroup: "群组邀请"
|
||||
maxNoteTextLength: "帖子的字数限制"
|
||||
quoteAttached: "已引用"
|
||||
quoteQuestion: "是否将其作为引用附上?"
|
||||
noMessagesYet: "现在没有新的聊天"
|
||||
newMessageExists: "新信息"
|
||||
onlyOneFileCanBeAttached: "只能添加一个附件"
|
||||
signinRequired: "请先登录"
|
||||
@ -368,6 +375,8 @@ normalPassword: "密码强度:中等"
|
||||
strongPassword: "密码强度:强"
|
||||
passwordMatched: "密码一致"
|
||||
passwordNotMatched: "密码不一致"
|
||||
signinWith: "以{x}登录"
|
||||
tapSecurityKey: "点击安全密钥"
|
||||
or: "或者"
|
||||
uiLanguage: "显示语言"
|
||||
groupInvited: "群组招待"
|
||||
@ -380,6 +389,7 @@ disableAnimatedMfm: "禁用MFM动画"
|
||||
doing: "正在进行"
|
||||
category: "类别"
|
||||
tags: "标签"
|
||||
docSource: "文件来源"
|
||||
createAccount: "注册账户"
|
||||
existingAcount: "现有的帐户"
|
||||
regenerate: "重新生成"
|
||||
@ -395,6 +405,21 @@ dayOverDayChanges: "与前一日相比"
|
||||
accessibility: "辅助功能"
|
||||
clinetSettings: "客户端设置"
|
||||
accountSettings: "账户设置"
|
||||
numberOfDays: "天数"
|
||||
hideThisNote: "隐藏这条帖子"
|
||||
showFeaturedNotesInTimeline: "在时间轴上显示热门推荐"
|
||||
objectStorage: "对象存储"
|
||||
useObjectStorage: "使用对象存储"
|
||||
serverLogs: "服务器日志"
|
||||
deleteAll: "删除全部"
|
||||
showFixedPostForm: "在时间线顶部显示帖子表单"
|
||||
newNoteRecived: "有新的帖子"
|
||||
useNotificationsPopup: "在弹出窗口中显示通知列表"
|
||||
none: "空"
|
||||
_sfx:
|
||||
note: "帖子"
|
||||
notification: "通知"
|
||||
chat: "聊天"
|
||||
_ago:
|
||||
unknown: "未知"
|
||||
future: "未来"
|
||||
@ -414,6 +439,16 @@ _time:
|
||||
_tutorial:
|
||||
title: "Misskey的使用方法"
|
||||
step1_1: "欢迎!"
|
||||
step1_2: "这个页面叫做「时间线」,它会按照时间顺序显示所有你「关注」的人所发的「帖子」。"
|
||||
step1_3: "如果你并没有发布任何帖子,也没有关注其他的人,你的时间线页面应当什么都没有显示。"
|
||||
step2_1: "在你想发布一些帖子之前,让我们先进行一下个人资料设置。"
|
||||
step2_2: "如果别人能够更加的了解你,关注你的概率也会得到提升。"
|
||||
step3_1: "已经设置完个人资料了吗?"
|
||||
step3_2: "那么接下来,试着写一些什么东西来发布吧。你可以通过点击屏幕上的铅笔图标来打开投稿页面。"
|
||||
step3_3: "写完内容后,点击窗口右上方的按钮就可以投稿。"
|
||||
step3_4: "不知道说些什么好吗?那就写下「Misskey我来啦!」这样的话吧。"
|
||||
step4_1: "将你的话语发布出去了吗?"
|
||||
step4_2: "太棒了!现在你可以在你的时间线中看到你刚刚发布的帖子了。"
|
||||
step7_3: "接下来,享受Misskey带来的乐趣吧🚀"
|
||||
_2fa:
|
||||
alreadyRegistered: "此设备已被注册"
|
||||
@ -447,6 +482,7 @@ _auth:
|
||||
permissionAsk: "这个应用程序需要以下权限"
|
||||
_antennaSources:
|
||||
all: "所有帖子"
|
||||
homeTimeline: "已关注用户的帖子"
|
||||
_weekday:
|
||||
sunday: "星期日"
|
||||
monday: "星期一"
|
||||
@ -464,6 +500,7 @@ _widgets:
|
||||
clock: "时钟"
|
||||
rss: "RSS阅读器"
|
||||
activity: "活动"
|
||||
photos: "照片"
|
||||
_cw:
|
||||
hide: "隐藏"
|
||||
show: "查看更多"
|
||||
@ -534,6 +571,7 @@ _charts:
|
||||
notesIncDec: "帖子:增加/减少"
|
||||
notesTotal: "帖子总数"
|
||||
_instanceCharts:
|
||||
requests: "请求"
|
||||
users: "用户数量:增加/减少"
|
||||
usersTotal: "用户总数"
|
||||
notes: "帖子:增加/减少"
|
||||
|
14
migration/1582210532752-antenna-exclude.ts
Normal file
14
migration/1582210532752-antenna-exclude.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class antennaExclude1582210532752 implements MigrationInterface {
|
||||
name = 'antennaExclude1582210532752'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.query(`ALTER TABLE "antenna" ADD "excludeKeywords" jsonb NOT NULL DEFAULT '[]'`, undefined);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "excludeKeywords"`, undefined);
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <syuilotan@yahoo.co.jp>",
|
||||
"version": "12.13.0",
|
||||
"version": "12.19.0",
|
||||
"codename": "indigo",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -50,21 +50,27 @@
|
||||
<router-link class="item index" active-class="active" to="/" exact v-else>
|
||||
<fa :icon="faHome" fixed-width/><span class="text">{{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }}</span>
|
||||
</router-link>
|
||||
<button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.getters.isSignedIn">
|
||||
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
||||
<i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i>
|
||||
</button>
|
||||
<router-link class="item" active-class="active" to="/my/messaging" v-if="$store.getters.isSignedIn">
|
||||
<fa :icon="faComments" fixed-width/><span class="text">{{ $t('messaging') }}</span>
|
||||
<i v-if="$store.state.i.hasUnreadMessagingMessage"><fa :icon="faCircle"/></i>
|
||||
</router-link>
|
||||
<router-link class="item" active-class="active" to="/my/drive" v-if="$store.getters.isSignedIn">
|
||||
<fa :icon="faCloud" fixed-width/><span class="text">{{ $t('drive') }}</span>
|
||||
</router-link>
|
||||
<router-link class="item" active-class="active" to="/my/follow-requests" v-if="$store.getters.isSignedIn && $store.state.i.isLocked">
|
||||
<fa :icon="faUserClock" fixed-width/><span class="text">{{ $t('followRequests') }}</span>
|
||||
<i v-if="$store.state.i.hasPendingReceivedFollowRequest"><fa :icon="faCircle"/></i>
|
||||
</router-link>
|
||||
<template v-if="$store.getters.isSignedIn">
|
||||
<button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.state.device.useNotificationsPopup">
|
||||
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
||||
<i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i>
|
||||
</button>
|
||||
<router-link class="item notifications" active-class="active" to="/my/notifications" ref="notificationButton" v-else>
|
||||
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
||||
<i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i>
|
||||
</router-link>
|
||||
<router-link class="item" active-class="active" to="/my/messaging">
|
||||
<fa :icon="faComments" fixed-width/><span class="text">{{ $t('messaging') }}</span>
|
||||
<i v-if="$store.state.i.hasUnreadMessagingMessage"><fa :icon="faCircle"/></i>
|
||||
</router-link>
|
||||
<router-link class="item" active-class="active" to="/my/drive">
|
||||
<fa :icon="faCloud" fixed-width/><span class="text">{{ $t('drive') }}</span>
|
||||
</router-link>
|
||||
<router-link class="item" active-class="active" to="/my/follow-requests" v-if="$store.state.i.isLocked">
|
||||
<fa :icon="faUserClock" fixed-width/><span class="text">{{ $t('followRequests') }}</span>
|
||||
<i v-if="$store.state.i.hasPendingReceivedFollowRequest"><fa :icon="faCircle"/></i>
|
||||
</router-link>
|
||||
</template>
|
||||
<div class="divider"></div>
|
||||
<router-link class="item" active-class="active" to="/featured">
|
||||
<fa :icon="faFireAlt" fixed-width/><span class="text">{{ $t('featured') }}</span>
|
||||
@ -87,7 +93,7 @@
|
||||
<fa :icon="faEllipsisH" fixed-width/><span class="text">{{ $t('more') }}</span>
|
||||
<i v-if="$store.getters.isSignedIn && ($store.state.i.hasUnreadMentions || $store.state.i.hasUnreadSpecifiedNotes)"><fa :icon="faCircle"/></i>
|
||||
</button>
|
||||
<router-link class="item" active-class="active" to="/settings">
|
||||
<router-link class="item" active-class="active" to="/preferences">
|
||||
<fa :icon="faCog" fixed-width/><span class="text">{{ $t('settings') }}</span>
|
||||
</router-link>
|
||||
</div>
|
||||
@ -143,7 +149,8 @@
|
||||
<button class="button nav _button" @click="showNav = true" ref="navButton"><fa :icon="faBars"/><i v-if="$store.getters.isSignedIn && ($store.state.i.hasUnreadSpecifiedNotes || $store.state.i.hasPendingReceivedFollowRequest || $store.state.i.hasUnreadMessagingMessage || $store.state.i.hasUnreadAnnouncement)"><fa :icon="faCircle"/></i></button>
|
||||
<button v-if="$route.name === 'index'" class="button home _button" @click="top()"><fa :icon="faHome"/></button>
|
||||
<button v-else class="button home _button" @click="$router.push('/')"><fa :icon="faHome"/></button>
|
||||
<button v-if="$store.getters.isSignedIn" class="button notifications _button" @click="notificationsOpen = !notificationsOpen" ref="notificationButton2"><fa :icon="notificationsOpen ? faTimes : faBell"/><i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i></button>
|
||||
<button v-if="$store.getters.isSignedIn && $store.state.device.useNotificationsPopup" class="button notifications _button" @click="notificationsOpen = !notificationsOpen" ref="notificationButton2"><fa :icon="notificationsOpen ? faTimes : faBell"/><i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i></button>
|
||||
<button v-if="$store.getters.isSignedIn && !$store.state.device.useNotificationsPopup" class="button notifications _button" @click="$router.push('/my/notifications')" ref="notificationButton2"><fa :icon="faBell"/><i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i></button>
|
||||
<button v-if="$store.getters.isSignedIn" class="button post _buttonPrimary" @click="post()"><fa :icon="faPencilAlt"/></button>
|
||||
</div>
|
||||
|
||||
@ -152,6 +159,8 @@
|
||||
<transition name="zoom-in-top">
|
||||
<x-notifications v-if="notificationsOpen" class="notifications" ref="notifications"/>
|
||||
</transition>
|
||||
|
||||
<stream-indicator v-if="$store.getters.isSignedIn"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -194,7 +203,6 @@ export default Vue.extend({
|
||||
widgetsEditMode: false,
|
||||
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
||||
canBack: false,
|
||||
disconnectedDialog: null as Promise<void> | null,
|
||||
wallpaper: localStorage.getItem('wallpaper') != null,
|
||||
faGripVertical, faChevronLeft, faComments, faHashtag, faBroadcastTower, faFireAlt, faEllipsisH, faPencilAlt, faBars, faTimes, faBell, faSearch, faUserCog, faCog, faUser, faHome, faStar, faCircle, faAt, faEnvelope, faListUl, faPlus, faUserClock, faLaugh, faUsers, faTachometerAlt, faExchangeAlt, faGlobe, faChartBar, faCloud, faServer
|
||||
};
|
||||
@ -258,30 +266,6 @@ export default Vue.extend({
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
this.$root.stream.on('_disconnected_', () => {
|
||||
if (this.disconnectedDialog) return;
|
||||
if (this.$store.state.device.autoReload) {
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.$root.stream.state !== 'reconnecting') return;
|
||||
|
||||
this.disconnectedDialog = this.$root.dialog({
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
title: this.$t('disconnectedFromServer'),
|
||||
text: this.$t('reloadConfirm'),
|
||||
}).then(({ canceled }) => {
|
||||
if (!canceled) {
|
||||
location.reload();
|
||||
}
|
||||
this.disconnectedDialog = null;
|
||||
});
|
||||
}, 150)
|
||||
});
|
||||
},
|
||||
|
||||
mounted() {
|
||||
@ -571,13 +555,17 @@ export default Vue.extend({
|
||||
|
||||
onNotification(notification) {
|
||||
// TODO: ユーザーが画面を見てないと思われるとき(ブラウザやタブがアクティブじゃないなど)は送信しない
|
||||
this.$root.stream.send('readNotification', {
|
||||
id: notification.id
|
||||
});
|
||||
if (true) {
|
||||
this.$root.stream.send('readNotification', {
|
||||
id: notification.id
|
||||
});
|
||||
|
||||
this.$root.new(MkToast, {
|
||||
notification
|
||||
});
|
||||
this.$root.new(MkToast, {
|
||||
notification
|
||||
});
|
||||
}
|
||||
|
||||
this.$root.sound('notification');
|
||||
},
|
||||
|
||||
onMousedown(e) {
|
||||
@ -638,30 +626,6 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header-enter-active, .header-leave-active {
|
||||
transition: opacity 0.5s, transform 0.5s !important;
|
||||
}
|
||||
.header-enter {
|
||||
opacity: 0;
|
||||
transform: scale(0.9);
|
||||
}
|
||||
.header-leave-to {
|
||||
opacity: 0;
|
||||
transform: scale(0.9);
|
||||
}
|
||||
|
||||
.page-enter-active, .page-leave-active {
|
||||
transition: opacity 0.5s, transform 0.5s !important;
|
||||
}
|
||||
.page-enter {
|
||||
opacity: 0;
|
||||
transform: translateY(-32px);
|
||||
}
|
||||
.page-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(32px);
|
||||
}
|
||||
|
||||
.nav-enter-active,
|
||||
.nav-leave-active {
|
||||
opacity: 1;
|
||||
@ -1218,15 +1182,17 @@ export default Vue.extend({
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 auto;
|
||||
padding: 8px 8px 0 8px;
|
||||
z-index: 10001;
|
||||
width: 350px;
|
||||
height: 400px;
|
||||
box-sizing: border-box;
|
||||
background: var(--vocsgcxy);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
backdrop-filter: blur(12px);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15);
|
||||
overflow: hidden;
|
||||
overflow: auto;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
width: 320px;
|
||||
|
BIN
src/client/assets/fedi.jpg
Normal file
BIN
src/client/assets/fedi.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
src/client/assets/sounds/aisha/1.mp3
Normal file
BIN
src/client/assets/sounds/aisha/1.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/aisha/2.mp3
Normal file
BIN
src/client/assets/sounds/aisha/2.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/aisha/3.mp3
Normal file
BIN
src/client/assets/sounds/aisha/3.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/noizenecio/kick_gaba.mp3
Normal file
BIN
src/client/assets/sounds/noizenecio/kick_gaba.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/down.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/down.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/poi1.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/poi1.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/poi2.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/poi2.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/pope1.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/pope1.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/pope2.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/pope2.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/popo.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/popo.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/triple.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/triple.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/up.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/up.mp3
Normal file
Binary file not shown.
BIN
src/client/assets/sounds/syuilo/waon.mp3
Normal file
BIN
src/client/assets/sounds/syuilo/waon.mp3
Normal file
Binary file not shown.
@ -55,6 +55,7 @@ import { faTimesCircle, faQuestionCircle } from '@fortawesome/free-regular-svg-i
|
||||
import MkButton from './ui/button.vue';
|
||||
import MkInput from './ui/input.vue';
|
||||
import MkSelect from './ui/select.vue';
|
||||
import MkSignin from './signin.vue';
|
||||
import parseAcct from '../../misc/acct/parse';
|
||||
import i18n from '../i18n';
|
||||
|
||||
@ -65,6 +66,7 @@ export default Vue.extend({
|
||||
MkButton,
|
||||
MkInput,
|
||||
MkSelect,
|
||||
MkSignin,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
@ -105,16 +105,6 @@ export default Vue.extend({
|
||||
text: this.$t('delete'),
|
||||
icon: faTrashAlt,
|
||||
action: this.deleteFile
|
||||
}, null, {
|
||||
type: 'nest',
|
||||
text: this.$t('contextmenu.else-files'),
|
||||
menu: [{
|
||||
text: this.$t('contextmenu.set-as-avatar'),
|
||||
action: this.setAsAvatar
|
||||
}, {
|
||||
text: this.$t('contextmenu.set-as-banner'),
|
||||
action: this.setAsBanner
|
||||
}]
|
||||
}],
|
||||
source: ev.currentTarget || ev.target,
|
||||
});
|
||||
|
@ -11,6 +11,7 @@ import url from './url.vue';
|
||||
import loading from './loading.vue';
|
||||
import SequentialEntrance from './sequential-entrance.vue';
|
||||
import error from './error.vue';
|
||||
import streamIndicator from './stream-indicator.vue';
|
||||
|
||||
Vue.component('mfm', mfm);
|
||||
Vue.component('mk-acct', acct);
|
||||
@ -23,3 +24,4 @@ Vue.component('mk-url', url);
|
||||
Vue.component('mk-loading', loading);
|
||||
Vue.component('mk-error', error);
|
||||
Vue.component('sequential-entrance', SequentialEntrance);
|
||||
Vue.component('stream-indicator', streamIndicator);
|
||||
|
@ -3,8 +3,8 @@
|
||||
<template v-for="media in mediaList.filter(media => !previewable(media))">
|
||||
<x-banner :media="media" :key="media.id"/>
|
||||
</template>
|
||||
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container">
|
||||
<div :data-count="mediaList.filter(media => previewable(media)).length" ref="grid">
|
||||
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container" ref="gridOuter">
|
||||
<div :data-count="mediaList.filter(media => previewable(media)).length" :style="gridInnerStyle">
|
||||
<template v-for="media in mediaList">
|
||||
<x-video :video="media" :key="media.id" v-if="media.type.startsWith('video')"/>
|
||||
<x-image :image="media" :key="media.id" v-else-if="media.type.startsWith('image')" :raw="raw"/>
|
||||
@ -32,19 +32,47 @@ export default Vue.extend({
|
||||
},
|
||||
raw: {
|
||||
default: false
|
||||
},
|
||||
// specify the parent element
|
||||
parentElement: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
gridInnerStyle: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//#region for Safari bug
|
||||
if (this.$refs.grid) {
|
||||
this.$refs.grid.style.height = this.$refs.grid.clientHeight ? `${this.$refs.grid.clientHeight}px`
|
||||
: '287px';
|
||||
}
|
||||
//#endregion
|
||||
this.size();
|
||||
window.addEventListener('resize', this.size);
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.size);
|
||||
},
|
||||
activated() {
|
||||
this.size();
|
||||
},
|
||||
methods: {
|
||||
previewable(file) {
|
||||
return file.type.startsWith('video') || file.type.startsWith('image');
|
||||
},
|
||||
size() {
|
||||
// for Safari bug
|
||||
if (this.$refs.gridOuter) {
|
||||
let height = 287;
|
||||
const parent = this.$props.parentElement || this.$parent.$el;
|
||||
|
||||
if (this.$refs.gridOuter.clientHeight) {
|
||||
height = this.$refs.gridOuter.clientHeight;
|
||||
} else if (parent) {
|
||||
height = parent.getBoundingClientRect().width * 9 / 16;
|
||||
}
|
||||
|
||||
this.gridInnerStyle = { height: `${height}px` };
|
||||
} else {
|
||||
this.gridInnerStyle = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="mk-notification" :class="notification.type">
|
||||
<div class="mk-notification" :class="notification.type" v-size="[{ max: 500 }, { max: 600 }]">
|
||||
<div class="head">
|
||||
<mk-avatar class="avatar" :user="notification.user"/>
|
||||
<div class="icon" :class="notification.type">
|
||||
@ -113,12 +113,17 @@ export default Vue.extend({
|
||||
.mk-notification {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
padding: 24px 32px;
|
||||
font-size: 0.9em;
|
||||
overflow-wrap: break-word;
|
||||
display: flex;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
&.max-width_600px {
|
||||
padding: 16px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
&.max-width_500px {
|
||||
padding: 12px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
@ -1,19 +1,18 @@
|
||||
<template>
|
||||
<div class="mk-notifications">
|
||||
<div class="contents">
|
||||
<x-list class="notifications" :items="items" v-slot="{ item: notification, i }">
|
||||
<x-notification :notification="notification" :with-time="true" :full="true" class="notification" :key="notification.id"/>
|
||||
</x-list>
|
||||
<div class="mk-notifications" :class="{ page }">
|
||||
<x-list class="notifications" :items="items" v-slot="{ item: notification }">
|
||||
<x-note v-if="['reply', 'quote', 'mention'].includes(notification.type)" :note="notification.note" :key="notification.id"/>
|
||||
<x-notification v-else :notification="notification" :with-time="true" :full="true" class="notification" :class="{ _panel: page }" :key="notification.id"/>
|
||||
</x-list>
|
||||
|
||||
<button class="more _button" v-if="more" @click="fetchMore" :disabled="moreFetching">
|
||||
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
|
||||
<template v-if="moreFetching"><fa :icon="faSpinner" pulse fixed-width/></template>
|
||||
</button>
|
||||
<button class="more _button" v-if="more" @click="fetchMore" :disabled="moreFetching">
|
||||
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
|
||||
<template v-if="moreFetching"><fa :icon="faSpinner" pulse fixed-width/></template>
|
||||
</button>
|
||||
|
||||
<p class="empty" v-if="empty">{{ $t('noNotifications') }}</p>
|
||||
<p class="empty" v-if="empty">{{ $t('noNotifications') }}</p>
|
||||
|
||||
<mk-error v-if="error" @retry="init()"/>
|
||||
</div>
|
||||
<mk-error v-if="error" @retry="init()"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -24,6 +23,7 @@ import i18n from '../i18n';
|
||||
import paging from '../scripts/paging';
|
||||
import XNotification from './notification.vue';
|
||||
import XList from './date-separated-list.vue';
|
||||
import XNote from './note.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
@ -31,6 +31,7 @@ export default Vue.extend({
|
||||
components: {
|
||||
XNotification,
|
||||
XList,
|
||||
XNote,
|
||||
},
|
||||
|
||||
mixins: [
|
||||
@ -42,7 +43,7 @@ export default Vue.extend({
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
wide: {
|
||||
page: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
@ -93,11 +94,15 @@ export default Vue.extend({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mk-notifications {
|
||||
> .contents {
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
padding: 8px 8px 0 8px;
|
||||
&.page {
|
||||
> .notifications {
|
||||
> ::v-deep * {
|
||||
margin-bottom: var(--margin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.page) {
|
||||
> .notifications {
|
||||
> ::v-deep * {
|
||||
margin-bottom: 8px;
|
||||
@ -109,28 +114,28 @@ export default Vue.extend({
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .more {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
> .more {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
|
||||
> [data-icon] {
|
||||
margin-right: 4px;
|
||||
}
|
||||
> [data-icon] {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
> .empty {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
color: var(--fg);
|
||||
}
|
||||
> .empty {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
> .placeholder {
|
||||
padding: 32px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
> .placeholder {
|
||||
padding: 32px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -112,8 +112,7 @@ export default Vue.extend({
|
||||
margin: 4px 0;
|
||||
padding: 4px 8px;
|
||||
width: 100%;
|
||||
color: var(--pollChoiceText);
|
||||
border: solid 1px var(--pollChoiceBorder);
|
||||
border: solid 1px var(--divider);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
|
@ -6,7 +6,7 @@
|
||||
@drop.stop="onDrop"
|
||||
>
|
||||
<header>
|
||||
<button class="cancel _button" @click="cancel"><fa :icon="faTimes"/></button>
|
||||
<button v-if="!fixed" class="cancel _button" @click="cancel"><fa :icon="faTimes"/></button>
|
||||
<div>
|
||||
<span class="text-count" :class="{ over: trimmedLength(text) > max }">{{ max - trimmedLength(text) }}</span>
|
||||
<button class="_button visibility" @click="setVisibility" ref="visibilityButton">
|
||||
@ -18,7 +18,7 @@
|
||||
<button class="submit _buttonPrimary" :disabled="!canPost" @click="post">{{ submitText }}<fa :icon="reply ? faReply : renote ? faQuoteRight : faPaperPlane"/></button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="form">
|
||||
<div class="form" :class="{ fixed }">
|
||||
<x-note-preview class="preview" v-if="reply" :note="reply"/>
|
||||
<x-note-preview class="preview" v-if="renote" :note="renote"/>
|
||||
<div class="with-quote" v-if="quoteId"><fa icon="quote-left"/> {{ $t('quoteAttached') }}<button @click="quoteId = null"><fa icon="times"/></button></div>
|
||||
@ -108,6 +108,11 @@ export default Vue.extend({
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
fixed: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
@ -582,7 +587,6 @@ export default Vue.extend({
|
||||
.gafaadew {
|
||||
background: var(--panel);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: 0 0 2px rgba(#000, 0.1);
|
||||
|
||||
> header {
|
||||
z-index: 1000;
|
||||
@ -651,6 +655,10 @@ export default Vue.extend({
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
|
||||
&.fixed {
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
> .preview {
|
||||
padding: 16px;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<x-window ref="window" @closed="() => { $emit('closed'); destroyDom(); }">
|
||||
<template #header>{{ $t('login') }}</template>
|
||||
<x-signin :auto-set="autoSet" @login="onLogin"/>
|
||||
<mk-signin :auto-set="autoSet" @login="onLogin"/>
|
||||
</x-window>
|
||||
</template>
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
import Vue from 'vue';
|
||||
import i18n from '../i18n';
|
||||
import XWindow from './window.vue';
|
||||
import XSignin from './signin.vue';
|
||||
import MkSignin from './signin.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
|
||||
components: {
|
||||
XSignin,
|
||||
MkSignin,
|
||||
XWindow,
|
||||
},
|
||||
|
||||
|
80
src/client/components/stream-indicator.vue
Normal file
80
src/client/components/stream-indicator.vue
Normal file
@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div class="nsbbhtug" v-if="hasDisconnected" @click="resetDisconnected">
|
||||
<div>{{ $t('disconnectedFromServer') }}</div>
|
||||
<div class="command">
|
||||
<button class="_textButton" @click="reload">{{ $t('reload') }}</button>
|
||||
<button class="_textButton">{{ $t('doNothing') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import i18n from '../i18n';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
data() {
|
||||
return {
|
||||
hasDisconnected: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
stream() {
|
||||
return this.$root.stream;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$root.stream.on('_connected_', this.onConnected);
|
||||
this.$root.stream.on('_disconnected_', this.onDisconnected);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$root.stream.off('_connected_', this.onConnected);
|
||||
this.$root.stream.off('_disconnected_', this.onDisconnected);
|
||||
},
|
||||
methods: {
|
||||
onConnected() {
|
||||
if (this.hasDisconnected) {
|
||||
if (this.$store.state.device.autoReload) {
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
onDisconnected() {
|
||||
this.hasDisconnected = true;
|
||||
},
|
||||
resetDisconnected() {
|
||||
this.hasDisconnected = false;
|
||||
},
|
||||
reload() {
|
||||
location.reload();
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.nsbbhtug {
|
||||
position: fixed;
|
||||
z-index: 16385;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
margin: 0;
|
||||
padding: 6px 12px;
|
||||
font-size: 0.9em;
|
||||
color: #fff;
|
||||
background: #000;
|
||||
opacity: 0.8;
|
||||
border-radius: 4px;
|
||||
max-width: 320px;
|
||||
|
||||
> .command {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
> button {
|
||||
padding: 0.7em;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<x-notes ref="tl" :pagination="pagination" @before="$emit('before')" @after="e => $emit('after', e)"/>
|
||||
<x-notes ref="tl" :pagination="pagination" @before="$emit('before')" @after="e => $emit('after', e)" @queue="$emit('queue', $event)"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@ -21,6 +21,11 @@ export default Vue.extend({
|
||||
},
|
||||
antenna: {
|
||||
required: false
|
||||
},
|
||||
sound: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
|
||||
@ -46,6 +51,10 @@ export default Vue.extend({
|
||||
|
||||
const prepend = note => {
|
||||
(this.$refs.tl as any).prepend(note);
|
||||
|
||||
if (this.sound) {
|
||||
this.$root.sound(note.userId === this.$store.state.i.id ? 'noteMy' : 'note');
|
||||
}
|
||||
};
|
||||
|
||||
const onUserAdded = () => {
|
||||
|
@ -56,7 +56,7 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
filled(): boolean {
|
||||
return this.v != '' && this.v != null;
|
||||
return true;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -100,6 +100,7 @@ export default Vue.extend({
|
||||
|
||||
> .input {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
|
@ -51,6 +51,7 @@ export default Vue.extend({
|
||||
target: self ? null : '_blank',
|
||||
showTimer: null,
|
||||
hideTimer: null,
|
||||
checkTimer: null,
|
||||
preview: null,
|
||||
faExternalLinkSquareAlt
|
||||
};
|
||||
@ -78,9 +79,14 @@ export default Vue.extend({
|
||||
}).$mount();
|
||||
|
||||
document.body.appendChild(this.preview.$el);
|
||||
|
||||
this.checkTimer = setInterval(() => {
|
||||
if (!document.body.contains(this.$el)) this.closePreview();
|
||||
}, 1000);
|
||||
},
|
||||
closePreview() {
|
||||
if (this.preview) {
|
||||
clearInterval(this.checkTimer);
|
||||
this.preview.destroyDom();
|
||||
this.preview = null;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header><mk-user-name :user="user"/></template>
|
||||
<div class="vrcsvlkm">
|
||||
<mk-button @click="resetPassword()" primary>{{ $t('resetPassword') }}</mk-button>
|
||||
<mk-switch v-if="$store.state.i.isAdmin && !user.isAdmin" @change="toggleModerator()" v-model="moderator">{{ $t('moderator') }}</mk-switch>
|
||||
<mk-switch v-if="$store.state.i.isAdmin && (this.moderator || !user.isAdmin)" @change="toggleModerator()" v-model="moderator">{{ $t('moderator') }}</mk-switch>
|
||||
<mk-switch @change="toggleSilence()" v-model="silenced">{{ $t('silence') }}</mk-switch>
|
||||
<mk-switch @change="toggleSuspend()" v-model="suspended">{{ $t('suspend') }}</mk-switch>
|
||||
</div>
|
||||
|
@ -53,6 +53,7 @@ export default Vue.extend({
|
||||
return {
|
||||
u: null,
|
||||
show: false,
|
||||
closed: false,
|
||||
top: 0,
|
||||
left: 0,
|
||||
};
|
||||
@ -68,6 +69,7 @@ export default Vue.extend({
|
||||
{ userId: this.user };
|
||||
|
||||
this.$root.api('users/show', query).then(user => {
|
||||
if (this.closed) return;
|
||||
this.u = user;
|
||||
this.show = true;
|
||||
});
|
||||
@ -83,6 +85,7 @@ export default Vue.extend({
|
||||
|
||||
methods: {
|
||||
close() {
|
||||
this.closed = true;
|
||||
this.show = false;
|
||||
if (this.$refs.content) (this.$refs.content as any).style.pointerEvents = 'none';
|
||||
}
|
||||
|
@ -8,9 +8,11 @@ export default {
|
||||
self.tag = null;
|
||||
self.showTimer = null;
|
||||
self.hideTimer = null;
|
||||
self.checkTimer = null;
|
||||
|
||||
self.close = () => {
|
||||
if (self.tag) {
|
||||
clearInterval(self.checkTimer);
|
||||
self.tag.close();
|
||||
self.tag = null;
|
||||
}
|
||||
@ -38,6 +40,14 @@ export default {
|
||||
});
|
||||
|
||||
document.body.appendChild(self.tag.$el);
|
||||
|
||||
self.checkTimer = setInterval(() => {
|
||||
if (!document.body.contains(el)) {
|
||||
clearTimeout(self.showTimer);
|
||||
clearTimeout(self.hideTimer);
|
||||
self.close();
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
el.addEventListener('mouseover', () => {
|
||||
@ -60,8 +70,6 @@ export default {
|
||||
|
||||
unbind(el, binding, vn) {
|
||||
const self = el._userPreviewDirective_;
|
||||
clearTimeout(self.showTimer);
|
||||
clearTimeout(self.hideTimer);
|
||||
self.close();
|
||||
clearInterval(self.checkTimer);
|
||||
}
|
||||
};
|
||||
|
@ -189,6 +189,14 @@ os.init(async () => {
|
||||
if (cb) vm.$once('closed', cb);
|
||||
(vm as any).focus();
|
||||
},
|
||||
sound(type: string) {
|
||||
if (this.$store.state.device.sfxVolume === 0) return;
|
||||
const sound = this.$store.state.device['sfx' + type.substr(0, 1).toUpperCase() + type.substr(1)];
|
||||
if (sound == null) return;
|
||||
const audio = new Audio(`/assets/sounds/${sound}.mp3`);
|
||||
audio.volume = this.$store.state.device.sfxVolume;
|
||||
audio.play();
|
||||
}
|
||||
},
|
||||
router: router,
|
||||
render: createEl => createEl(App)
|
||||
@ -198,4 +206,96 @@ os.init(async () => {
|
||||
|
||||
// マウント
|
||||
app.$mount('#app');
|
||||
|
||||
if (app.$store.getters.isSignedIn) {
|
||||
const main = os.stream.useSharedConnection('main');
|
||||
|
||||
// 自分の情報が更新されたとき
|
||||
main.on('meUpdated', i => {
|
||||
app.$store.dispatch('mergeMe', i);
|
||||
});
|
||||
|
||||
main.on('readAllNotifications', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadNotification: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadNotification', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadNotification: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadMention', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadMentions: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllUnreadMentions', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadMentions: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadSpecifiedNote', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadSpecifiedNotes: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllUnreadSpecifiedNotes', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadSpecifiedNotes: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllMessagingMessages', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadMessagingMessage: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadMessagingMessage', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadMessagingMessage: true
|
||||
});
|
||||
|
||||
app.sound('chatBg');
|
||||
});
|
||||
|
||||
main.on('readAllAntennas', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadAntenna: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadAntenna', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadAntenna: true
|
||||
});
|
||||
|
||||
app.sound('antenna');
|
||||
});
|
||||
|
||||
main.on('readAllAnnouncements', () => {
|
||||
app.$store.dispatch('mergeMe', {
|
||||
hasUnreadAnnouncement: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('clientSettingUpdated', x => {
|
||||
app.$store.commit('settings/set', {
|
||||
key: x.key,
|
||||
value: x.value
|
||||
});
|
||||
});
|
||||
|
||||
// トークンが再生成されたとき
|
||||
// このままではMisskeyが利用できないので強制的にサインアウトさせる
|
||||
main.on('myTokenRegenerated', () => {
|
||||
os.signout();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import Vue from 'vue';
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
|
||||
import initStore from './store';
|
||||
import { apiUrl, version, locale } from './config';
|
||||
import { apiUrl, version } from './config';
|
||||
import Progress from './scripts/loading';
|
||||
|
||||
import Stream from './scripts/stream';
|
||||
@ -142,94 +142,6 @@ export default class MiOS extends EventEmitter {
|
||||
@autobind
|
||||
private initStream() {
|
||||
this.stream = new Stream(this);
|
||||
|
||||
if (this.store.getters.isSignedIn) {
|
||||
const main = this.stream.useSharedConnection('main');
|
||||
|
||||
// 自分の情報が更新されたとき
|
||||
main.on('meUpdated', i => {
|
||||
this.store.dispatch('mergeMe', i);
|
||||
});
|
||||
|
||||
main.on('readAllNotifications', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadNotification: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadNotification', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadNotification: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadMention', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadMentions: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllUnreadMentions', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadMentions: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadSpecifiedNote', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadSpecifiedNotes: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllUnreadSpecifiedNotes', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadSpecifiedNotes: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllMessagingMessages', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadMessagingMessage: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadMessagingMessage', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadMessagingMessage: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllAntennas', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadAntenna: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadAntenna', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadAntenna: true
|
||||
});
|
||||
});
|
||||
|
||||
main.on('readAllAnnouncements', () => {
|
||||
this.store.dispatch('mergeMe', {
|
||||
hasUnreadAnnouncement: false
|
||||
});
|
||||
});
|
||||
|
||||
main.on('clientSettingUpdated', x => {
|
||||
this.store.commit('settings/set', {
|
||||
key: x.key,
|
||||
value: x.value
|
||||
});
|
||||
});
|
||||
|
||||
// トークンが再生成されたとき
|
||||
// このままではMisskeyが利用できないので強制的にサインアウトさせる
|
||||
main.on('myTokenRegenerated', () => {
|
||||
this.signout();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,11 +34,13 @@
|
||||
import Vue from 'vue';
|
||||
import i18n from '../i18n';
|
||||
import XForm from './auth.form.vue';
|
||||
import MkSignin from '../components/signin.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
components: {
|
||||
XForm
|
||||
XForm,
|
||||
MkSignin,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -14,9 +14,12 @@
|
||||
</button>
|
||||
</portal>
|
||||
|
||||
<div class="new" v-if="queue > 0" :style="{ width: width + 'px' }"><button class="_buttonPrimary" @click="top()">{{ $t('newNoteRecived') }}</button></div>
|
||||
|
||||
<x-tutorial class="tutorial" v-if="$store.state.settings.tutorial != -1"/>
|
||||
|
||||
<x-timeline ref="tl" :key="src === 'list' ? `list:${list.id}` : src === 'antenna' ? `antenna:${antenna.id}` : src" :src="src" :list="list" :antenna="antenna" @before="before()" @after="after()"/>
|
||||
<x-post-form class="post-form _panel" fixed v-if="$store.state.device.showFixedPostForm"/>
|
||||
<x-timeline ref="tl" :key="src === 'list' ? `list:${list.id}` : src === 'antenna' ? `antenna:${antenna.id}` : src" :src="src" :list="list" :antenna="antenna" :sound="true" @before="before()" @after="after()" @queue="queueUpdated"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -27,6 +30,7 @@ import { faComments } from '@fortawesome/free-regular-svg-icons';
|
||||
import Progress from '../scripts/loading';
|
||||
import XTimeline from '../components/timeline.vue';
|
||||
import XTutorial from './index.home.tutorial.vue';
|
||||
import XPostForm from '../components/post-form.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
metaInfo() {
|
||||
@ -38,6 +42,7 @@ export default Vue.extend({
|
||||
components: {
|
||||
XTimeline,
|
||||
XTutorial,
|
||||
XPostForm,
|
||||
},
|
||||
|
||||
props: {
|
||||
@ -53,6 +58,8 @@ export default Vue.extend({
|
||||
list: null,
|
||||
antenna: null,
|
||||
menuOpened: false,
|
||||
queue: 0,
|
||||
width: 0,
|
||||
faAngleDown, faAngleUp, faHome, faShareAlt, faGlobe, faComments, faListUl, faSatellite, faCircle
|
||||
};
|
||||
},
|
||||
@ -63,6 +70,10 @@ export default Vue.extend({
|
||||
't': this.focus
|
||||
};
|
||||
},
|
||||
|
||||
meta() {
|
||||
return this.$store.state.instance.meta;
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
@ -91,6 +102,10 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.width = this.$el.offsetWidth;
|
||||
},
|
||||
|
||||
methods: {
|
||||
before() {
|
||||
Progress.start();
|
||||
@ -100,7 +115,17 @@ export default Vue.extend({
|
||||
Progress.done();
|
||||
},
|
||||
|
||||
queueUpdated(q) {
|
||||
if (this.$el.offsetWidth !== 0) this.width = this.$el.offsetWidth;
|
||||
this.queue = q;
|
||||
},
|
||||
|
||||
top() {
|
||||
window.scroll({ top: 0, behavior: 'instant' });
|
||||
},
|
||||
|
||||
async choose(ev) {
|
||||
if (this.meta == null) return;
|
||||
this.menuOpened = true;
|
||||
const [antennas, lists] = await Promise.all([
|
||||
this.$root.api('antennas/list'),
|
||||
@ -128,15 +153,15 @@ export default Vue.extend({
|
||||
text: this.$t('_timelines.home'),
|
||||
icon: faHome,
|
||||
action: () => { this.setSrc('home') }
|
||||
}, {
|
||||
}, this.meta.disableLocalTimeline && !this.$store.state.i.isModerator && !this.$store.state.i.isAdmin ? undefined : {
|
||||
text: this.$t('_timelines.local'),
|
||||
icon: faComments,
|
||||
action: () => { this.setSrc('local') }
|
||||
}, {
|
||||
}, this.meta.disableLocalTimeline && !this.$store.state.i.isModerator && !this.$store.state.i.isAdmin ? undefined : {
|
||||
text: this.$t('_timelines.social'),
|
||||
icon: faShareAlt,
|
||||
action: () => { this.setSrc('social') }
|
||||
}, {
|
||||
}, this.meta.disableGlobalTimeline && !this.$store.state.i.isModerator && !this.$store.state.i.isAdmin ? undefined : {
|
||||
text: this.$t('_timelines.global'),
|
||||
icon: faGlobe,
|
||||
action: () => { this.setSrc('global') }
|
||||
@ -169,9 +194,26 @@ export default Vue.extend({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mk-home {
|
||||
> .new {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
|
||||
> button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding: 8px 16px;
|
||||
border-radius: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
> .tutorial {
|
||||
margin-bottom: var(--margin);
|
||||
}
|
||||
|
||||
> .post-form {
|
||||
position: relative;
|
||||
margin-bottom: var(--margin);
|
||||
}
|
||||
}
|
||||
|
||||
._kjvfvyph_ {
|
||||
|
@ -5,6 +5,38 @@
|
||||
|
||||
<mk-instance-stats style="margin-bottom: var(--margin);"/>
|
||||
|
||||
<section class="_card logs">
|
||||
<div class="_title"><fa :icon="faStream"/> {{ $t('serverLogs') }}</div>
|
||||
<div class="_content">
|
||||
<div class="_inputs">
|
||||
<mk-input v-model="logDomain" :debounce="true">
|
||||
<span>{{ $t('domain') }}</span>
|
||||
</mk-input>
|
||||
<mk-select v-model="logLevel">
|
||||
<template #label>{{ $t('level') }}</template>
|
||||
<option value="all">{{ $t('levels.all') }}</option>
|
||||
<option value="info">{{ $t('levels.info') }}</option>
|
||||
<option value="success">{{ $t('levels.success') }}</option>
|
||||
<option value="warning">{{ $t('levels.warning') }}</option>
|
||||
<option value="error">{{ $t('levels.error') }}</option>
|
||||
<option value="debug">{{ $t('levels.debug') }}</option>
|
||||
</mk-select>
|
||||
</div>
|
||||
|
||||
<div class="logs">
|
||||
<code v-for="log in logs" :key="log.id" :class="log.level">
|
||||
<details>
|
||||
<summary><mk-time :time="log.createdAt"/> [{{ log.domain.join('.') }}] {{ log.message }}</summary>
|
||||
<vue-json-pretty v-if="log.data" :data="log.data"></vue-json-pretty>
|
||||
</details>
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
<div class="_footer">
|
||||
<mk-button @click="deleteAllLogs()" primary><fa :icon="faTrashAlt"/> {{ $t('deleteAll') }}</mk-button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="_card chart">
|
||||
<div class="_title"><fa :icon="faMicrochip"/> {{ $t('cpuAndMemory') }}</div>
|
||||
<div class="_content" style="margin-top: -8px; margin-bottom: -12px;">
|
||||
@ -67,9 +99,13 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faServer, faExchangeAlt, faMicrochip, faHdd } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faServer, faExchangeAlt, faMicrochip, faHdd, faStream, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import Chart from 'chart.js';
|
||||
import VueJsonPretty from 'vue-json-pretty';
|
||||
import MkInstanceStats from '../../components/instance-stats.vue';
|
||||
import MkButton from '../../components/ui/button.vue';
|
||||
import MkSelect from '../../components/ui/select.vue';
|
||||
import MkInput from '../../components/ui/input.vue';
|
||||
import { version, url } from '../../config';
|
||||
import i18n from '../../i18n';
|
||||
|
||||
@ -92,6 +128,10 @@ export default Vue.extend({
|
||||
|
||||
components: {
|
||||
MkInstanceStats,
|
||||
MkButton,
|
||||
MkSelect,
|
||||
MkInput,
|
||||
VueJsonPretty
|
||||
},
|
||||
|
||||
data() {
|
||||
@ -104,7 +144,10 @@ export default Vue.extend({
|
||||
memUsage: 0,
|
||||
chartCpuMem: null,
|
||||
chartNet: null,
|
||||
faServer, faExchangeAlt, faMicrochip, faHdd
|
||||
logs: [],
|
||||
logLevel: 'all',
|
||||
logDomain: '',
|
||||
faServer, faExchangeAlt, faMicrochip, faHdd, faStream, faTrashAlt
|
||||
}
|
||||
},
|
||||
|
||||
@ -114,7 +157,20 @@ export default Vue.extend({
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
logLevel() {
|
||||
this.logs = [];
|
||||
this.fetchLogs();
|
||||
},
|
||||
logDomain() {
|
||||
this.logs = [];
|
||||
this.fetchLogs();
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.fetchLogs();
|
||||
|
||||
Chart.defaults.global.defaultFontColor = getComputedStyle(document.documentElement).getPropertyValue('--fg');
|
||||
|
||||
this.chartCpuMem = new Chart(this.$refs.cpumem, {
|
||||
@ -330,6 +386,25 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
methods: {
|
||||
fetchLogs() {
|
||||
this.$root.api('admin/logs', {
|
||||
level: this.logLevel === 'all' ? null : this.logLevel,
|
||||
domain: this.logDomain === '' ? null : this.logDomain,
|
||||
limit: 30
|
||||
}).then(logs => {
|
||||
this.logs = logs.reverse();
|
||||
});
|
||||
},
|
||||
|
||||
deleteAllLogs() {
|
||||
this.$root.api('admin/delete-logs').then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
onStats(stats) {
|
||||
const cpu = (stats.cpu * 100).toFixed(0);
|
||||
const memActive = (stats.mem.active / this.serverInfo.mem.total * 100).toFixed(0);
|
||||
@ -389,6 +464,37 @@ export default Vue.extend({
|
||||
}
|
||||
}
|
||||
|
||||
> .logs {
|
||||
> ._content {
|
||||
> .logs {
|
||||
padding: 8px;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
font-size: 0.9em;
|
||||
|
||||
> code {
|
||||
display: block;
|
||||
|
||||
&.error {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
&.warning {
|
||||
color: #ff0;
|
||||
}
|
||||
|
||||
&.success {
|
||||
color: #0f0;
|
||||
}
|
||||
|
||||
&.debug {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .chart {
|
||||
> ._content {
|
||||
> .table {
|
||||
|
@ -61,10 +61,10 @@
|
||||
<div class="_content">
|
||||
<mk-switch v-model="enableServiceWorker">{{ $t('enableServiceworker') }}<template #desc>{{ $t('serviceworkerInfo') }}</template></mk-switch>
|
||||
<template v-if="enableServiceWorker">
|
||||
<mk-horizon-group inputs class="fit-bottom">
|
||||
<div class="_inputs">
|
||||
<mk-input v-model="swPublicKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Public key</mk-input>
|
||||
<mk-input v-model="swPrivateKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Private key</mk-input>
|
||||
</mk-horizon-group>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="_footer">
|
||||
@ -97,6 +97,33 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="_card">
|
||||
<div class="_title"><fa :icon="faCloud"/> {{ $t('objectStorage') }}</div>
|
||||
<div class="_content">
|
||||
<mk-switch v-model="useObjectStorage">{{ $t('useObjectStorage') }}</mk-switch>
|
||||
<template v-if="useObjectStorage">
|
||||
<mk-input v-model="objectStorageBaseUrl" :disabled="!useObjectStorage">URL</mk-input>
|
||||
<div class="_inputs">
|
||||
<mk-input v-model="objectStorageBucket" :disabled="!useObjectStorage">Bucket</mk-input>
|
||||
<mk-input v-model="objectStoragePrefix" :disabled="!useObjectStorage">Prefix</mk-input>
|
||||
</div>
|
||||
<mk-input v-model="objectStorageEndpoint" :disabled="!useObjectStorage">Endpoint</mk-input>
|
||||
<div class="_inputs">
|
||||
<mk-input v-model="objectStorageRegion" :disabled="!useObjectStorage">Region</mk-input>
|
||||
<mk-input v-model="objectStoragePort" type="number" :disabled="!useObjectStorage">Port</mk-input>
|
||||
</div>
|
||||
<div class="_inputs">
|
||||
<mk-input v-model="objectStorageAccessKey" :disabled="!useObjectStorage"><template #icon><fa :icon="faKey"/></template>Access key</mk-input>
|
||||
<mk-input v-model="objectStorageSecretKey" :disabled="!useObjectStorage"><template #icon><fa :icon="faKey"/></template>Secret key</mk-input>
|
||||
</div>
|
||||
<mk-switch v-model="objectStorageUseSSL" :disabled="!useObjectStorage">SSL</mk-switch>
|
||||
</template>
|
||||
</div>
|
||||
<div class="_footer">
|
||||
<mk-button primary @click="save(true)"><fa :icon="faSave"/> {{ $t('save') }}</mk-button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="_card">
|
||||
<div class="_title"><fa :icon="faGhost"/> {{ $t('proxyAccount') }}</div>
|
||||
<div class="_content">
|
||||
@ -213,6 +240,16 @@ export default Vue.extend({
|
||||
enableServiceWorker: false,
|
||||
swPublicKey: null,
|
||||
swPrivateKey: null,
|
||||
useObjectStorage: false,
|
||||
objectStorageBaseUrl: null,
|
||||
objectStorageBucket: null,
|
||||
objectStoragePrefix: null,
|
||||
objectStorageEndpoint: null,
|
||||
objectStorageRegion: null,
|
||||
objectStoragePort: null,
|
||||
objectStorageAccessKey: null,
|
||||
objectStorageSecretKey: null,
|
||||
objectStorageUseSSL: false,
|
||||
enableTwitterIntegration: false,
|
||||
twitterConsumerKey: null,
|
||||
twitterConsumerSecret: null,
|
||||
@ -257,6 +294,16 @@ export default Vue.extend({
|
||||
this.enableServiceWorker = this.meta.enableServiceWorker;
|
||||
this.swPublicKey = this.meta.swPublickey;
|
||||
this.swPrivateKey = this.meta.swPrivateKey;
|
||||
this.useObjectStorage = this.meta.useObjectStorage;
|
||||
this.objectStorageBaseUrl = this.meta.objectStorageBaseUrl;
|
||||
this.objectStorageBucket = this.meta.objectStorageBucket;
|
||||
this.objectStoragePrefix = this.meta.objectStoragePrefix;
|
||||
this.objectStorageEndpoint = this.meta.objectStorageEndpoint;
|
||||
this.objectStorageRegion = this.meta.objectStorageRegion;
|
||||
this.objectStoragePort = this.meta.objectStoragePort;
|
||||
this.objectStorageAccessKey = this.meta.objectStorageAccessKey;
|
||||
this.objectStorageSecretKey = this.meta.objectStorageSecretKey;
|
||||
this.objectStorageUseSSL = this.meta.objectStorageUseSSL;
|
||||
this.enableTwitterIntegration = this.meta.enableTwitterIntegration;
|
||||
this.twitterConsumerKey = this.meta.twitterConsumerKey;
|
||||
this.twitterConsumerSecret = this.meta.twitterConsumerSecret;
|
||||
@ -341,6 +388,16 @@ export default Vue.extend({
|
||||
enableServiceWorker: this.enableServiceWorker,
|
||||
swPublicKey: this.swPublicKey,
|
||||
swPrivateKey: this.swPrivateKey,
|
||||
useObjectStorage: this.useObjectStorage,
|
||||
objectStorageBaseUrl: this.objectStorageBaseUrl ? this.objectStorageBaseUrl : null,
|
||||
objectStorageBucket: this.objectStorageBucket ? this.objectStorageBucket : null,
|
||||
objectStoragePrefix: this.objectStoragePrefix ? this.objectStoragePrefix : null,
|
||||
objectStorageEndpoint: this.objectStorageEndpoint ? this.objectStorageEndpoint : null,
|
||||
objectStorageRegion: this.objectStorageRegion ? this.objectStorageRegion : null,
|
||||
objectStoragePort: this.objectStoragePort ? this.objectStoragePort : null,
|
||||
objectStorageAccessKey: this.objectStorageAccessKey ? this.objectStorageAccessKey : null,
|
||||
objectStorageSecretKey: this.objectStorageSecretKey ? this.objectStorageSecretKey : null,
|
||||
objectStorageUseSSL: this.objectStorageUseSSL,
|
||||
enableTwitterIntegration: this.enableTwitterIntegration,
|
||||
twitterConsumerKey: this.twitterConsumerKey,
|
||||
twitterConsumerSecret: this.twitterConsumerSecret,
|
||||
|
@ -184,12 +184,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
onMessage(message) {
|
||||
// サウンドを再生する
|
||||
if (this.$store.state.device.enableSounds) {
|
||||
const sound = new Audio(`${url}/assets/message.mp3`);
|
||||
sound.volume = this.$store.state.device.soundVolume;
|
||||
sound.play();
|
||||
}
|
||||
this.$root.sound('chat');
|
||||
|
||||
const isBottom = this.isBottom();
|
||||
|
||||
|
@ -30,6 +30,10 @@
|
||||
<span>{{ $t('antennaKeywords') }}</span>
|
||||
<template #desc>{{ $t('antennaKeywordsDescription') }}</template>
|
||||
</mk-textarea>
|
||||
<mk-textarea v-model="excludeKeywords">
|
||||
<span>{{ $t('antennaExcludeKeywords') }}</span>
|
||||
<template #desc>{{ $t('antennaKeywordsDescription') }}</template>
|
||||
</mk-textarea>
|
||||
<mk-switch v-model="caseSensitive">{{ $t('caseSensitive') }}</mk-switch>
|
||||
<mk-switch v-model="withFile">{{ $t('withFileAntenna') }}</mk-switch>
|
||||
<mk-switch v-model="notify">{{ $t('notifyAntenna') }}</mk-switch>
|
||||
@ -75,6 +79,7 @@ export default Vue.extend({
|
||||
userGroupId: null,
|
||||
users: '',
|
||||
keywords: '',
|
||||
excludeKeywords: '',
|
||||
caseSensitive: false,
|
||||
withReplies: false,
|
||||
withFile: false,
|
||||
@ -107,6 +112,7 @@ export default Vue.extend({
|
||||
this.userGroupId = this.antenna.userGroupId;
|
||||
this.users = this.antenna.users.join('\n');
|
||||
this.keywords = this.antenna.keywords.map(x => x.join(' ')).join('\n');
|
||||
this.excludeKeywords = this.antenna.excludeKeywords.map(x => x.join(' ')).join('\n');
|
||||
this.caseSensitive = this.antenna.caseSensitive;
|
||||
this.withReplies = this.antenna.withReplies;
|
||||
this.withFile = this.antenna.withFile;
|
||||
@ -126,7 +132,8 @@ export default Vue.extend({
|
||||
notify: this.notify,
|
||||
caseSensitive: this.caseSensitive,
|
||||
users: this.users.trim().split('\n').map(x => x.trim()),
|
||||
keywords: this.keywords.trim().split('\n').map(x => x.trim().split(' '))
|
||||
keywords: this.keywords.trim().split('\n').map(x => x.trim().split(' ')),
|
||||
excludeKeywords: this.excludeKeywords.trim().split('\n').map(x => x.trim().split(' ')),
|
||||
});
|
||||
this.$emit('created');
|
||||
} else {
|
||||
@ -141,7 +148,8 @@ export default Vue.extend({
|
||||
notify: this.notify,
|
||||
caseSensitive: this.caseSensitive,
|
||||
users: this.users.trim().split('\n').map(x => x.trim()),
|
||||
keywords: this.keywords.trim().split('\n').map(x => x.trim().split(' '))
|
||||
keywords: this.keywords.trim().split('\n').map(x => x.trim().split(' ')),
|
||||
excludeKeywords: this.excludeKeywords.trim().split('\n').map(x => x.trim().split(' ')),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ export default Vue.extend({
|
||||
userGroupId: null,
|
||||
users: [],
|
||||
keywords: [],
|
||||
excludeKeywords: [],
|
||||
withReplies: false,
|
||||
caseSensitive: false,
|
||||
withFile: false,
|
||||
|
42
src/client/pages/notifications.vue
Normal file
42
src/client/pages/notifications.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<portal to="icon"><fa :icon="faBell"/></portal>
|
||||
<portal to="title">{{ $t('notifications') }}</portal>
|
||||
<x-notifications @before="before" @after="after" page/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faBell } from '@fortawesome/free-solid-svg-icons';
|
||||
import Progress from '../scripts/loading';
|
||||
import XNotifications from '../components/notifications.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$t('notifications') as string
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
XNotifications
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
faBell
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
before() {
|
||||
Progress.start();
|
||||
},
|
||||
|
||||
after() {
|
||||
Progress.done();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
@ -17,8 +17,8 @@
|
||||
</template>
|
||||
<router-link :to="`./${page.name}/view-source`">{{ $t('_pages.viewSource') }}</router-link>
|
||||
<div class="like">
|
||||
<button @click="unlike()" v-if="page.isLiked" :title="$t('_pages.unlike')"><fa :icon="faHeartS"/></button>
|
||||
<button @click="like()" v-else :title="$t('_pages.like')"><fa :icon="faHeart"/></button>
|
||||
<button class="_button" @click="unlike()" v-if="page.isLiked" :title="$t('_pages.unlike')"><fa :icon="faHeartS"/></button>
|
||||
<button class="_button" @click="like()" v-else :title="$t('_pages.like')"><fa :icon="faHeartR"/></button>
|
||||
<span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -28,6 +28,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faHeart as faHeartS } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faHeart as faHeartR } from '@fortawesome/free-regular-svg-icons';
|
||||
import XPage from '../components/page/page.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
@ -49,6 +51,7 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
page: null,
|
||||
faHeartS, faHeartR
|
||||
};
|
||||
},
|
||||
|
||||
@ -102,7 +105,7 @@ export default Vue.extend({
|
||||
}).then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
iconOnly: true, autoClose: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
256
src/client/pages/preferences/index.vue
Normal file
256
src/client/pages/preferences/index.vue
Normal file
@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div>
|
||||
<portal to="icon"><fa :icon="faCog"/></portal>
|
||||
<portal to="title">{{ $t('clinetSettings') }}</portal>
|
||||
|
||||
<x-theme/>
|
||||
|
||||
<section class="_card">
|
||||
<div class="_title"><fa :icon="faMusic"/> {{ $t('sounds') }}</div>
|
||||
<div class="_content">
|
||||
{{ $t('volume') }}
|
||||
<input type="range" v-model="sfxVolume" min="0" max="1" step="0.1"/>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<mk-select v-model="sfxNote">
|
||||
<template #label>{{ $t('_sfx.note') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxNote)" v-if="sfxNote"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxNoteMy">
|
||||
<template #label>{{ $t('_sfx.noteMy') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxNoteMy)" v-if="sfxNoteMy"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxNotification">
|
||||
<template #label>{{ $t('_sfx.notification') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxNotification)" v-if="sfxNotification"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxChat">
|
||||
<template #label>{{ $t('_sfx.chat') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxChat)" v-if="sfxChat"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxChatBg">
|
||||
<template #label>{{ $t('_sfx.chatBg') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxChatBg)" v-if="sfxChatBg"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
<mk-select v-model="sfxAntenna">
|
||||
<template #label>{{ $t('_sfx.antenna') }}</template>
|
||||
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
|
||||
<template #text><button class="_textButton" @click="listen(sfxAntenna)" v-if="sfxAntenna"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
|
||||
</mk-select>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="_card">
|
||||
<div class="_title"><fa :icon="faCog"/> {{ $t('accessibility') }}</div>
|
||||
<div class="_content">
|
||||
<mk-switch v-model="autoReload">
|
||||
{{ $t('autoReloadWhenDisconnected') }}
|
||||
</mk-switch>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<mk-switch v-model="imageNewTab">{{ $t('openImageInNewTab') }}</mk-switch>
|
||||
<mk-switch v-model="disableAnimatedMfm">{{ $t('disableAnimatedMfm') }}</mk-switch>
|
||||
<mk-switch v-model="reduceAnimation">{{ $t('reduceUiAnimation') }}</mk-switch>
|
||||
<mk-switch v-model="useOsNativeEmojis">
|
||||
{{ $t('useOsNativeEmojis') }}
|
||||
<template #desc><mfm text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></template>
|
||||
</mk-switch>
|
||||
<mk-switch v-model="showFixedPostForm">{{ $t('showFixedPostForm') }}</mk-switch>
|
||||
<mk-switch v-model="useNotificationsPopup">{{ $t('useNotificationsPopup') }}</mk-switch>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<mk-select v-model="lang">
|
||||
<template #label>{{ $t('uiLanguage') }}</template>
|
||||
|
||||
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
|
||||
</mk-select>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<div>{{ $t('fontSize') }}</div>
|
||||
<mk-radio v-model="fontSize" value="small"><span style="font-size: 14px;">Aa</span></mk-radio>
|
||||
<mk-radio v-model="fontSize" :value="null"><span style="font-size: 16px;">Aa</span></mk-radio>
|
||||
<mk-radio v-model="fontSize" value="large"><span style="font-size: 18px;">Aa</span></mk-radio>
|
||||
<mk-radio v-model="fontSize" value="veryLarge"><span style="font-size: 20px;">Aa</span></mk-radio>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<mk-button @click="cacheClear()" primary style="margin: var(--margin) auto;">{{ $t('cacheClear') }}</mk-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faImage, faCog, faMusic, faPlay } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkInput from '../../components/ui/input.vue';
|
||||
import MkButton from '../../components/ui/button.vue';
|
||||
import MkSwitch from '../../components/ui/switch.vue';
|
||||
import MkSelect from '../../components/ui/select.vue';
|
||||
import MkRadio from '../../components/ui/radio.vue';
|
||||
import XTheme from './theme.vue';
|
||||
import i18n from '../../i18n';
|
||||
import { langs } from '../../config';
|
||||
|
||||
const sounds = [
|
||||
null,
|
||||
'syuilo/up',
|
||||
'syuilo/down',
|
||||
'syuilo/pope1',
|
||||
'syuilo/pope2',
|
||||
'syuilo/waon',
|
||||
'syuilo/popo',
|
||||
'syuilo/triple',
|
||||
'syuilo/poi1',
|
||||
'syuilo/poi2',
|
||||
'aisha/1',
|
||||
'aisha/2',
|
||||
'aisha/3',
|
||||
'noizenecio/kick_gaba',
|
||||
];
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$t('settings') as string
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
XTheme,
|
||||
MkInput,
|
||||
MkButton,
|
||||
MkSwitch,
|
||||
MkSelect,
|
||||
MkRadio,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
langs,
|
||||
lang: localStorage.getItem('lang'),
|
||||
fontSize: localStorage.getItem('fontSize'),
|
||||
sounds,
|
||||
faImage, faCog, faMusic, faPlay
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
autoReload: {
|
||||
get() { return this.$store.state.device.autoReload; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'autoReload', value }); }
|
||||
},
|
||||
|
||||
reduceAnimation: {
|
||||
get() { return !this.$store.state.device.animation; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'animation', value: !value }); }
|
||||
},
|
||||
|
||||
disableAnimatedMfm: {
|
||||
get() { return !this.$store.state.device.animatedMfm; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'animatedMfm', value: !value }); }
|
||||
},
|
||||
|
||||
useOsNativeEmojis: {
|
||||
get() { return this.$store.state.device.useOsNativeEmojis; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'useOsNativeEmojis', value }); }
|
||||
},
|
||||
|
||||
imageNewTab: {
|
||||
get() { return this.$store.state.device.imageNewTab; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'imageNewTab', value }); }
|
||||
},
|
||||
|
||||
showFixedPostForm: {
|
||||
get() { return this.$store.state.device.showFixedPostForm; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'showFixedPostForm', value }); }
|
||||
},
|
||||
|
||||
useNotificationsPopup: {
|
||||
get() { return this.$store.state.device.useNotificationsPopup; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'useNotificationsPopup', value }); }
|
||||
},
|
||||
|
||||
sfxVolume: {
|
||||
get() { return this.$store.state.device.sfxVolume; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxVolume', value }); }
|
||||
},
|
||||
|
||||
sfxNote: {
|
||||
get() { return this.$store.state.device.sfxNote; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxNote', value }); }
|
||||
},
|
||||
|
||||
sfxNoteMy: {
|
||||
get() { return this.$store.state.device.sfxNoteMy; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxNoteMy', value }); }
|
||||
},
|
||||
|
||||
sfxNotification: {
|
||||
get() { return this.$store.state.device.sfxNotification; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxNotification', value }); }
|
||||
},
|
||||
|
||||
sfxChat: {
|
||||
get() { return this.$store.state.device.sfxChat; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxChat', value }); }
|
||||
},
|
||||
|
||||
sfxChatBg: {
|
||||
get() { return this.$store.state.device.sfxChatBg; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxChatBg', value }); }
|
||||
},
|
||||
|
||||
sfxAntenna: {
|
||||
get() { return this.$store.state.device.sfxAntenna; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'sfxAntenna', value }); }
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
lang() {
|
||||
localStorage.setItem('lang', this.lang);
|
||||
localStorage.removeItem('locale');
|
||||
location.reload();
|
||||
},
|
||||
|
||||
fontSize() {
|
||||
if (this.fontSize == null) {
|
||||
localStorage.removeItem('fontSize');
|
||||
} else {
|
||||
localStorage.setItem('fontSize', this.fontSize);
|
||||
}
|
||||
location.reload();
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
listen(sound) {
|
||||
const audio = new Audio(`/assets/sounds/${sound}.mp3`);
|
||||
audio.volume = this.$store.state.device.sfxVolume;
|
||||
audio.play();
|
||||
},
|
||||
|
||||
cacheClear() {
|
||||
// Clear cache (service worker)
|
||||
try {
|
||||
navigator.serviceWorker.controller.postMessage('clear');
|
||||
|
||||
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||
for (const registration of registrations) registration.unregister();
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
// Force reload
|
||||
location.reload(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
@ -73,7 +73,6 @@ export default Vue.extend({
|
||||
applyTheme(this.themes.find(x => x.id === this.theme));
|
||||
},
|
||||
|
||||
|
||||
wallpaper() {
|
||||
if (this.wallpaper == null) {
|
||||
localStorage.removeItem('wallpaper');
|
@ -1,145 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<portal to="icon"><fa :icon="faCog"/></portal>
|
||||
<portal to="title">{{ $t('clinetSettings') }}</portal>
|
||||
|
||||
<x-theme/>
|
||||
|
||||
<section class="_card">
|
||||
<div class="_title"><fa :icon="faCog"/> {{ $t('accessibility') }}</div>
|
||||
<div class="_content">
|
||||
<mk-switch v-model="autoReload">
|
||||
{{ $t('autoReloadWhenDisconnected') }}
|
||||
</mk-switch>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<mk-switch v-model="imageNewTab">{{ $t('openImageInNewTab') }}</mk-switch>
|
||||
<mk-switch v-model="disableAnimatedMfm">{{ $t('disableAnimatedMfm') }}</mk-switch>
|
||||
<mk-switch v-model="reduceAnimation">{{ $t('reduceUiAnimation') }}</mk-switch>
|
||||
<mk-switch v-model="useOsNativeEmojis">
|
||||
{{ $t('useOsNativeEmojis') }}
|
||||
<template #desc><mfm text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></template>
|
||||
</mk-switch>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<mk-select v-model="lang">
|
||||
<template #label>{{ $t('uiLanguage') }}</template>
|
||||
|
||||
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
|
||||
</mk-select>
|
||||
</div>
|
||||
<div class="_content">
|
||||
<div>{{ $t('fontSize') }}</div>
|
||||
<mk-radio v-model="fontSize" value="small"><span style="font-size: 14px;">Aa</span></mk-radio>
|
||||
<mk-radio v-model="fontSize" :value="null"><span style="font-size: 16px;">Aa</span></mk-radio>
|
||||
<mk-radio v-model="fontSize" value="large"><span style="font-size: 18px;">Aa</span></mk-radio>
|
||||
<mk-radio v-model="fontSize" value="veryLarge"><span style="font-size: 20px;">Aa</span></mk-radio>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<mk-button @click="cacheClear()" primary style="margin: var(--margin) auto;">{{ $t('cacheClear') }}</mk-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faImage, faCog } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkInput from '../../components/ui/input.vue';
|
||||
import MkButton from '../../components/ui/button.vue';
|
||||
import MkSwitch from '../../components/ui/switch.vue';
|
||||
import MkSelect from '../../components/ui/select.vue';
|
||||
import MkRadio from '../../components/ui/radio.vue';
|
||||
import XTheme from './theme.vue';
|
||||
import i18n from '../../i18n';
|
||||
import { langs } from '../../config';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$t('settings') as string
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
XTheme,
|
||||
MkInput,
|
||||
MkButton,
|
||||
MkSwitch,
|
||||
MkSelect,
|
||||
MkRadio,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
langs,
|
||||
lang: localStorage.getItem('lang'),
|
||||
fontSize: localStorage.getItem('fontSize'),
|
||||
faImage, faCog
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
autoReload: {
|
||||
get() { return this.$store.state.device.autoReload; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'autoReload', value }); }
|
||||
},
|
||||
|
||||
reduceAnimation: {
|
||||
get() { return !this.$store.state.device.animation; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'animation', value: !value }); }
|
||||
},
|
||||
|
||||
disableAnimatedMfm: {
|
||||
get() { return !this.$store.state.device.animatedMfm; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'animatedMfm', value: !value }); }
|
||||
},
|
||||
|
||||
useOsNativeEmojis: {
|
||||
get() { return this.$store.state.device.useOsNativeEmojis; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'useOsNativeEmojis', value }); }
|
||||
},
|
||||
|
||||
imageNewTab: {
|
||||
get() { return this.$store.state.device.imageNewTab; },
|
||||
set(value) { this.$store.commit('device/set', { key: 'imageNewTab', value }); }
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
lang() {
|
||||
localStorage.setItem('lang', this.lang);
|
||||
localStorage.removeItem('locale');
|
||||
location.reload();
|
||||
},
|
||||
|
||||
fontSize() {
|
||||
if (this.fontSize == null) {
|
||||
localStorage.removeItem('fontSize');
|
||||
} else {
|
||||
localStorage.setItem('fontSize', this.fontSize);
|
||||
}
|
||||
location.reload();
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
cacheClear() {
|
||||
// Clear cache (service worker)
|
||||
try {
|
||||
navigator.serviceWorker.controller.postMessage('clear');
|
||||
|
||||
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||
for (const registration of registrations) registration.unregister();
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
// Force reload
|
||||
location.reload(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
@ -27,6 +27,7 @@ export const router = new VueRouter({
|
||||
{ path: '/explore', component: page('explore') },
|
||||
{ path: '/explore/tags/:tag', props: true, component: page('explore') },
|
||||
{ path: '/search', component: page('search') },
|
||||
{ path: '/my/notifications', component: page('notifications') },
|
||||
{ path: '/my/favorites', component: page('favorites') },
|
||||
{ path: '/my/messages', component: page('messages') },
|
||||
{ path: '/my/mentions', component: page('mentions') },
|
||||
@ -45,7 +46,7 @@ export const router = new VueRouter({
|
||||
{ path: '/my/groups', component: page('my-groups/index') },
|
||||
{ path: '/my/groups/:group', component: page('my-groups/group') },
|
||||
{ path: '/my/antennas', component: page('my-antennas/index') },
|
||||
{ path: '/settings', component: page('settings/index') },
|
||||
{ path: '/preferences', component: page('preferences/index') },
|
||||
{ path: '/instance', component: page('instance/index') },
|
||||
{ path: '/instance/emojis', component: page('instance/emojis') },
|
||||
{ path: '/instance/users', component: page('instance/users') },
|
||||
|
@ -31,6 +31,10 @@ export default (opts) => ({
|
||||
watch: {
|
||||
pagination() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
queue() {
|
||||
this.$emit('queue', this.queue.length);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -39,6 +39,15 @@ const defaultDeviceSettings = {
|
||||
animation: true,
|
||||
animatedMfm: true,
|
||||
imageNewTab: false,
|
||||
showFixedPostForm: false,
|
||||
useNotificationsPopup: true,
|
||||
sfxVolume: 0.3,
|
||||
sfxNote: 'syuilo/down',
|
||||
sfxNoteMy: 'syuilo/up',
|
||||
sfxNotification: 'syuilo/pope2',
|
||||
sfxChat: 'syuilo/pope1',
|
||||
sfxChatBg: 'syuilo/waon',
|
||||
sfxAntenna: 'syuilo/triple',
|
||||
userData: {},
|
||||
};
|
||||
|
||||
|
@ -248,6 +248,32 @@ hr {
|
||||
}
|
||||
}
|
||||
|
||||
._inputs {
|
||||
display: flex;
|
||||
margin: 32px 0;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
> * {
|
||||
flex: 1;
|
||||
margin: 0 !important;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-left: 8px !important;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 8px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
._shadow {
|
||||
box-shadow: 0 8px 32px var(--shadow);
|
||||
|
||||
|
@ -84,6 +84,7 @@ export default define({
|
||||
|
||||
.tl {
|
||||
background: var(--bg);
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -52,6 +52,19 @@ export async function checkHitAntenna(antenna: Antenna, note: Note, noteUser: Us
|
||||
if (!matched) return false;
|
||||
}
|
||||
|
||||
if (antenna.excludeKeywords.length > 0) {
|
||||
if (note.text == null) return false;
|
||||
|
||||
const matched = antenna.excludeKeywords.some(keywords =>
|
||||
keywords.every(keyword =>
|
||||
antenna.caseSensitive
|
||||
? note.text!.includes(keyword)
|
||||
: note.text!.toLowerCase().includes(keyword.toLowerCase())
|
||||
));
|
||||
|
||||
if (matched) return false;
|
||||
}
|
||||
|
||||
if (antenna.withFile) {
|
||||
if (note.fileIds.length === 0) return false;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { emojiRegex } from './emoji-regex';
|
||||
import { fetchMeta } from './fetch-meta';
|
||||
import { Emojis } from '../models';
|
||||
|
||||
const legacy10: Record<string, string> = {
|
||||
const legacies: Record<string, string> = {
|
||||
'like': '👍',
|
||||
'love': '❤', // ここに記述する場合は異体字セレクタを入れない
|
||||
'laugh': '😆',
|
||||
@ -13,6 +13,7 @@ const legacy10: Record<string, string> = {
|
||||
'confused': '😥',
|
||||
'rip': '😇',
|
||||
'pudding': '🍮',
|
||||
'star': '⭐',
|
||||
};
|
||||
|
||||
export async function getFallbackReaction(): Promise<string> {
|
||||
@ -20,11 +21,33 @@ export async function getFallbackReaction(): Promise<string> {
|
||||
return meta.useStarForReactionFallback ? '⭐' : '👍';
|
||||
}
|
||||
|
||||
export function convertLegacyReactions(reactions: Record<string, number>) {
|
||||
const _reactions = {} as Record<string, number>;
|
||||
|
||||
for (const reaction of Object.keys(reactions)) {
|
||||
if (Object.keys(legacies).includes(reaction)) {
|
||||
if (_reactions[legacies[reaction]]) {
|
||||
_reactions[legacies[reaction]] += reactions[reaction];
|
||||
} else {
|
||||
_reactions[legacies[reaction]] = reactions[reaction];
|
||||
}
|
||||
} else {
|
||||
if (_reactions[reaction]) {
|
||||
_reactions[reaction] += reactions[reaction];
|
||||
} else {
|
||||
_reactions[reaction] = reactions[reaction];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _reactions;
|
||||
}
|
||||
|
||||
export async function toDbReaction(reaction?: string | null): Promise<string> {
|
||||
if (reaction == null) return await getFallbackReaction();
|
||||
|
||||
// 文字列タイプのリアクションを絵文字に変換
|
||||
if (Object.keys(legacy10).includes(reaction)) return legacy10[reaction];
|
||||
if (Object.keys(legacies).includes(reaction)) return legacies[reaction];
|
||||
|
||||
// Unicode絵文字
|
||||
const match = emojiRegex.exec(reaction);
|
||||
@ -50,6 +73,6 @@ export async function toDbReaction(reaction?: string | null): Promise<string> {
|
||||
}
|
||||
|
||||
export function convertLegacyReaction(reaction: string): string {
|
||||
if (Object.keys(legacy10).includes(reaction)) return legacy10[reaction];
|
||||
if (Object.keys(legacies).includes(reaction)) return legacies[reaction];
|
||||
return reaction;
|
||||
}
|
||||
|
3
src/misc/safe-for-sql.ts
Normal file
3
src/misc/safe-for-sql.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export function safeForSql(text: string): boolean {
|
||||
return !/[\0\x08\x09\x1a\n\r"'\\\%]/g.test(text);
|
||||
}
|
@ -71,6 +71,11 @@ export class Antenna {
|
||||
})
|
||||
public keywords: string[][];
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
})
|
||||
public excludeKeywords: string[][];
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
})
|
||||
|
@ -21,6 +21,7 @@ export class AntennaRepository extends Repository<Antenna> {
|
||||
createdAt: antenna.createdAt.toISOString(),
|
||||
name: antenna.name,
|
||||
keywords: antenna.keywords,
|
||||
excludeKeywords: antenna.excludeKeywords,
|
||||
src: antenna.src,
|
||||
userListId: antenna.userListId,
|
||||
userGroupId: userGroupJoining ? userGroupJoining.userGroupId : null,
|
||||
|
@ -6,7 +6,7 @@ import { Emojis, Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls
|
||||
import { ensure } from '../../prelude/ensure';
|
||||
import { SchemaType } from '../../misc/schema';
|
||||
import { awaitAll } from '../../prelude/await-all';
|
||||
import { convertLegacyReaction } from '../../misc/reaction-lib';
|
||||
import { convertLegacyReaction, convertLegacyReactions } from '../../misc/reaction-lib';
|
||||
|
||||
export type PackedNote = SchemaType<typeof packedNoteSchema>;
|
||||
|
||||
@ -187,7 +187,7 @@ export class NoteRepository extends Repository<Note> {
|
||||
viaMobile: note.viaMobile || undefined,
|
||||
renoteCount: note.renoteCount,
|
||||
repliesCount: note.repliesCount,
|
||||
reactions: note.reactions, // v12 TODO: convert legacy reaction
|
||||
reactions: convertLegacyReactions(note.reactions),
|
||||
tags: note.tags.length > 0 ? note.tags : undefined,
|
||||
emojis: populateEmojis(note.emojis, host, Object.keys(note.reactions)),
|
||||
fileIds: note.fileIds,
|
||||
|
@ -26,6 +26,8 @@ export async function injectFeatured(timeline: Note[], user?: User | null) {
|
||||
.andWhere(`note.visibility = 'public'`)
|
||||
.leftJoinAndSelect('note.user', 'user');
|
||||
|
||||
if (user) query.andWhere('note.userId != :userId', { userId: user.id });
|
||||
|
||||
if (user) generateMuteQuery(query, user);
|
||||
|
||||
const notes = await query
|
||||
|
@ -35,20 +35,17 @@ export const meta = {
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
// Get favoritee
|
||||
const note = await getNote(ps.noteId).catch(e => {
|
||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||
throw e;
|
||||
});
|
||||
|
||||
// if already favorited
|
||||
const exist = await PromoNotes.findOne(note.id);
|
||||
|
||||
if (exist != null) {
|
||||
throw new ApiError(meta.errors.alreadyPromoted);
|
||||
}
|
||||
|
||||
// Create favorite
|
||||
await PromoNotes.save({
|
||||
noteId: note.id,
|
||||
createdAt: new Date(),
|
||||
|
@ -33,6 +33,10 @@ export const meta = {
|
||||
validator: $.arr($.arr($.str))
|
||||
},
|
||||
|
||||
excludeKeywords: {
|
||||
validator: $.arr($.arr($.str))
|
||||
},
|
||||
|
||||
users: {
|
||||
validator: $.arr($.str)
|
||||
},
|
||||
@ -102,6 +106,7 @@ export default define(meta, async (ps, user) => {
|
||||
userListId: userList ? userList.id : null,
|
||||
userGroupJoiningId: userGroupJoining ? userGroupJoining.id : null,
|
||||
keywords: ps.keywords,
|
||||
excludeKeywords: ps.excludeKeywords,
|
||||
users: ps.users,
|
||||
caseSensitive: ps.caseSensitive,
|
||||
withReplies: ps.withReplies,
|
||||
|
@ -36,6 +36,10 @@ export const meta = {
|
||||
validator: $.arr($.arr($.str))
|
||||
},
|
||||
|
||||
excludeKeywords: {
|
||||
validator: $.arr($.arr($.str))
|
||||
},
|
||||
|
||||
users: {
|
||||
validator: $.arr($.str)
|
||||
},
|
||||
@ -118,6 +122,7 @@ export default define(meta, async (ps, user) => {
|
||||
userListId: userList ? userList.id : null,
|
||||
userGroupJoiningId: userGroupJoining ? userGroupJoining.id : null,
|
||||
keywords: ps.keywords,
|
||||
excludeKeywords: ps.excludeKeywords,
|
||||
users: ps.users,
|
||||
caseSensitive: ps.caseSensitive,
|
||||
withReplies: ps.withReplies,
|
||||
|
@ -3,6 +3,7 @@ import define from '../../define';
|
||||
import { fetchMeta } from '../../../../misc/fetch-meta';
|
||||
import { Notes } from '../../../../models';
|
||||
import { Note } from '../../../../models/entities/note';
|
||||
import { safeForSql } from '../../../../misc/safe-for-sql';
|
||||
|
||||
/*
|
||||
トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要
|
||||
@ -113,7 +114,7 @@ export default define(meta, async () => {
|
||||
for (let i = 0; i < range; i++) {
|
||||
countPromises.push(Promise.all(hots.map(tag => Notes.createQueryBuilder('note')
|
||||
.select('count(distinct note.userId)')
|
||||
.where(':tag = ANY(note.tags)', { tag: tag })
|
||||
.where(`'{"${safeForSql(tag) ? tag : 'aichan_kawaii'}"}' <@ note.tags`)
|
||||
.andWhere('note.createdAt < :lt', { lt: new Date(now.getTime() - (interval * i)) })
|
||||
.andWhere('note.createdAt > :gt', { gt: new Date(now.getTime() - (interval * (i + 1))) })
|
||||
.cache(60000) // 1 min
|
||||
@ -127,7 +128,7 @@ export default define(meta, async () => {
|
||||
|
||||
const totalCounts = await Promise.all(hots.map(tag => Notes.createQueryBuilder('note')
|
||||
.select('count(distinct note.userId)')
|
||||
.where(':tag = ANY(note.tags)', { tag: tag })
|
||||
.where(`'{"${safeForSql(tag) ? tag : 'aichan_kawaii'}"}' <@ note.tags`)
|
||||
.andWhere('note.createdAt > :gt', { gt: new Date(now.getTime() - rangeA) })
|
||||
.cache(60000 * 60) // 60 min
|
||||
.getRawOne()
|
||||
|
@ -6,6 +6,7 @@ import { Notes } from '../../../../models';
|
||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { safeForSql } from '../../../../misc/safe-for-sql';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@ -75,7 +76,7 @@ export const meta = {
|
||||
},
|
||||
|
||||
limit: {
|
||||
validator: $.optional.num.range(1, 30),
|
||||
validator: $.optional.num.range(1, 100),
|
||||
default: 10
|
||||
},
|
||||
},
|
||||
@ -99,14 +100,16 @@ export default define(meta, async (ps, me) => {
|
||||
if (me) generateMuteQuery(query, me);
|
||||
|
||||
if (ps.tag) {
|
||||
query.andWhere(':tag = ANY(note.tags)', { tag: ps.tag.toLowerCase() });
|
||||
if (!safeForSql(ps.tag)) return;
|
||||
query.andWhere(`'{"${ps.tag.toLowerCase()}"}' <@ note.tags`);
|
||||
} else {
|
||||
let i = 0;
|
||||
query.andWhere(new Brackets(qb => {
|
||||
for (const tags of ps.query!) {
|
||||
qb.orWhere(new Brackets(qb => {
|
||||
for (const tag of tags) {
|
||||
qb.andWhere(`:tag${i} = ANY(note.tags)`, { [`tag${i}`]: tag.toLowerCase() });
|
||||
if (!safeForSql(tag)) return;
|
||||
qb.andWhere(`'{"${tag.toLowerCase()}"}' <@ note.tags`);
|
||||
i++;
|
||||
}
|
||||
}));
|
||||
|
Reference in New Issue
Block a user