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
|
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)
|
12.13.0 (2020/02/18)
|
||||||
-------------------
|
-------------------
|
||||||
### ✨Improvements
|
### ✨Improvements
|
||||||
|
@ -26,14 +26,86 @@ uploading: "Upload läuft"
|
|||||||
save: "Speichern"
|
save: "Speichern"
|
||||||
users: "Benutzer"
|
users: "Benutzer"
|
||||||
addUser: "Benutzer hinzufügen"
|
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"
|
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"
|
selectUser: "Benutzer wählen"
|
||||||
instances: "Instanz"
|
instances: "Instanz"
|
||||||
mutedUsers: "Stummgestellte Benutzer"
|
mutedUsers: "Stummgestellte Benutzer"
|
||||||
blockedUsers: "Blockierte Benutzer"
|
blockedUsers: "Blockierte Benutzer"
|
||||||
noUsers: "Keine Benutzer"
|
noUsers: "Keine Benutzer"
|
||||||
|
remove: "Löschen"
|
||||||
|
nsfw: "Dieser Inhalt ist NSFW"
|
||||||
|
userList: "Listen"
|
||||||
|
_sfx:
|
||||||
|
notification: "Benachrichtigungen"
|
||||||
_widgets:
|
_widgets:
|
||||||
notifications: "Benachrichtigungen"
|
notifications: "Benachrichtigungen"
|
||||||
timeline: "Zeitleiste"
|
timeline: "Zeitleiste"
|
||||||
|
_cw:
|
||||||
|
show: "Zeige mehr"
|
||||||
|
_visibility:
|
||||||
|
followers: "Folgende"
|
||||||
_profile:
|
_profile:
|
||||||
username: "Benutzername"
|
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"
|
banner: "Banner"
|
||||||
nsfw: "NSFW"
|
nsfw: "NSFW"
|
||||||
disconnectedFromServer: "Connection to the server was inturrupted"
|
disconnectedFromServer: "Connection to the server was inturrupted"
|
||||||
|
reload: "Refresh"
|
||||||
|
doNothing: "Ignore"
|
||||||
reloadConfirm: "Would you like to retry?"
|
reloadConfirm: "Would you like to retry?"
|
||||||
watch: "Watch"
|
watch: "Watch"
|
||||||
unwatch: "Undo Watch"
|
unwatch: "Undo Watch"
|
||||||
@ -412,6 +414,29 @@ dayOverDayChanges: "Daily"
|
|||||||
accessibility: "Accessibility"
|
accessibility: "Accessibility"
|
||||||
clinetSettings: "Client Settings"
|
clinetSettings: "Client Settings"
|
||||||
accountSettings: "Account 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:
|
_ago:
|
||||||
unknown: "Unknown"
|
unknown: "Unknown"
|
||||||
future: "Future"
|
future: "Future"
|
||||||
@ -513,6 +538,7 @@ _widgets:
|
|||||||
clock: "Clock"
|
clock: "Clock"
|
||||||
rss: "RSS reader"
|
rss: "RSS reader"
|
||||||
activity: "Activity"
|
activity: "Activity"
|
||||||
|
photos: "Photos"
|
||||||
_cw:
|
_cw:
|
||||||
hide: "Hide"
|
hide: "Hide"
|
||||||
show: "Load more"
|
show: "Load more"
|
||||||
|
@ -239,6 +239,8 @@ avatar: "Avatar"
|
|||||||
banner: "Banner"
|
banner: "Banner"
|
||||||
nsfw: "Marcado como sensible"
|
nsfw: "Marcado como sensible"
|
||||||
disconnectedFromServer: "Desconectado del servidor"
|
disconnectedFromServer: "Desconectado del servidor"
|
||||||
|
reload: "Recargar"
|
||||||
|
doNothing: "No hacer nada"
|
||||||
reloadConfirm: "¿Desea recargar?"
|
reloadConfirm: "¿Desea recargar?"
|
||||||
watch: "Ver"
|
watch: "Ver"
|
||||||
unwatch: "Dejar de ver"
|
unwatch: "Dejar de ver"
|
||||||
@ -412,6 +414,29 @@ dayOverDayChanges: "Dif diaria"
|
|||||||
accessibility: "Accesibilidad"
|
accessibility: "Accesibilidad"
|
||||||
clinetSettings: "Ajustes del cliente"
|
clinetSettings: "Ajustes del cliente"
|
||||||
accountSettings: "Ajustes de cuenta"
|
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:
|
_ago:
|
||||||
unknown: "Desconocido"
|
unknown: "Desconocido"
|
||||||
future: "Futuro"
|
future: "Futuro"
|
||||||
@ -513,6 +538,7 @@ _widgets:
|
|||||||
clock: "Reloj"
|
clock: "Reloj"
|
||||||
rss: "Lector RSS"
|
rss: "Lector RSS"
|
||||||
activity: "Actividad"
|
activity: "Actividad"
|
||||||
|
photos: "Fotos"
|
||||||
_cw:
|
_cw:
|
||||||
hide: "Ocultar"
|
hide: "Ocultar"
|
||||||
show: "Ver más"
|
show: "Ver más"
|
||||||
|
@ -239,6 +239,8 @@ avatar: "Avatar"
|
|||||||
banner: "Bannière"
|
banner: "Bannière"
|
||||||
nsfw: "Contenu sensible"
|
nsfw: "Contenu sensible"
|
||||||
disconnectedFromServer: "Déconnecté du serveur"
|
disconnectedFromServer: "Déconnecté du serveur"
|
||||||
|
reload: "Rafraîchir"
|
||||||
|
doNothing: "Ignorer"
|
||||||
reloadConfirm: "Voulez-vous recharger?"
|
reloadConfirm: "Voulez-vous recharger?"
|
||||||
watch: "Surveiller"
|
watch: "Surveiller"
|
||||||
unwatch: "Ne plus surveiller"
|
unwatch: "Ne plus surveiller"
|
||||||
@ -412,6 +414,29 @@ dayOverDayChanges: "Diff quotidien"
|
|||||||
accessibility: "Accessibilité"
|
accessibility: "Accessibilité"
|
||||||
clinetSettings: "Paramètres du client"
|
clinetSettings: "Paramètres du client"
|
||||||
accountSettings: "Paramètres du compte"
|
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:
|
_ago:
|
||||||
unknown: "Inconnu"
|
unknown: "Inconnu"
|
||||||
future: "Futur"
|
future: "Futur"
|
||||||
@ -431,6 +456,16 @@ _time:
|
|||||||
_tutorial:
|
_tutorial:
|
||||||
title: "Comment utiliser Misskey"
|
title: "Comment utiliser Misskey"
|
||||||
step1_1: "Bienvenue,"
|
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:
|
_2fa:
|
||||||
alreadyRegistered: "Cette étape à déjà été complétée"
|
alreadyRegistered: "Cette étape à déjà été complétée"
|
||||||
registerDevice: "S’inscrire l'appareil"
|
registerDevice: "S’inscrire l'appareil"
|
||||||
@ -493,6 +528,7 @@ _widgets:
|
|||||||
clock: "Horloge"
|
clock: "Horloge"
|
||||||
rss: "Lecteur de flux RSS"
|
rss: "Lecteur de flux RSS"
|
||||||
activity: "Activités"
|
activity: "Activités"
|
||||||
|
photos: "Photos"
|
||||||
_cw:
|
_cw:
|
||||||
hide: "Masquer"
|
hide: "Masquer"
|
||||||
show: "Voir plus"
|
show: "Voir plus"
|
||||||
|
@ -239,6 +239,8 @@ avatar: "アイコン"
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
nsfw: "閲覧注意"
|
nsfw: "閲覧注意"
|
||||||
disconnectedFromServer: "サーバーから切断されました"
|
disconnectedFromServer: "サーバーから切断されました"
|
||||||
|
reload: "リロード"
|
||||||
|
doNothing: "なにもしない"
|
||||||
reloadConfirm: "リロードしますか?"
|
reloadConfirm: "リロードしますか?"
|
||||||
watch: "ウォッチ"
|
watch: "ウォッチ"
|
||||||
unwatch: "ウォッチ解除"
|
unwatch: "ウォッチ解除"
|
||||||
@ -284,6 +286,7 @@ manageAntennas: "アンテナの管理"
|
|||||||
name: "名前"
|
name: "名前"
|
||||||
antennaSource: "受信ソース"
|
antennaSource: "受信ソース"
|
||||||
antennaKeywords: "受信キーワード"
|
antennaKeywords: "受信キーワード"
|
||||||
|
antennaExcludeKeywords: "除外キーワード"
|
||||||
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
||||||
notifyAntenna: "新しいノートを通知する"
|
notifyAntenna: "新しいノートを通知する"
|
||||||
withFileAntenna: "ファイルが添付されたノートのみ"
|
withFileAntenna: "ファイルが添付されたノートのみ"
|
||||||
@ -417,6 +420,25 @@ promote: "プロモート"
|
|||||||
numberOfDays: "日数"
|
numberOfDays: "日数"
|
||||||
hideThisNote: "このノートを非表示"
|
hideThisNote: "このノートを非表示"
|
||||||
showFeaturedNotesInTimeline: "タイムラインにおすすめのノートを表示する"
|
showFeaturedNotesInTimeline: "タイムラインにおすすめのノートを表示する"
|
||||||
|
objectStorage: "オブジェクトストレージ"
|
||||||
|
useObjectStorage: "オブジェクトストレージを使用"
|
||||||
|
serverLogs: "サーバーログ"
|
||||||
|
deleteAll: "全て削除"
|
||||||
|
showFixedPostForm: "タイムライン上部に投稿フォームを表示する"
|
||||||
|
newNoteRecived: "新しいノートがあります"
|
||||||
|
useNotificationsPopup: "通知一覧をポップアップで表示"
|
||||||
|
sounds: "サウンド"
|
||||||
|
listen: "聴く"
|
||||||
|
none: "なし"
|
||||||
|
volume: "音量"
|
||||||
|
|
||||||
|
_sfx:
|
||||||
|
note: "ノート"
|
||||||
|
noteMy: "ノート(自分)"
|
||||||
|
notification: "通知"
|
||||||
|
chat: "チャット"
|
||||||
|
chatBg: "チャット(バックグラウンド)"
|
||||||
|
antenna: "アンテナ受信"
|
||||||
|
|
||||||
_ago:
|
_ago:
|
||||||
unknown: "謎"
|
unknown: "謎"
|
||||||
|
@ -109,6 +109,8 @@ aboutMisskey: "Misskeyってなんや?"
|
|||||||
notFoundDescription: "指定されたURLに該当するページはあらへんやった。"
|
notFoundDescription: "指定されたURLに該当するページはあらへんやった。"
|
||||||
close: "さいなら"
|
close: "さいなら"
|
||||||
joinedGroups: "参加しとるグループ"
|
joinedGroups: "参加しとるグループ"
|
||||||
|
_sfx:
|
||||||
|
notification: "通知"
|
||||||
_ago:
|
_ago:
|
||||||
unknown: "謎"
|
unknown: "謎"
|
||||||
future: "未来"
|
future: "未来"
|
||||||
|
@ -23,7 +23,12 @@ login: "ಪ್ರವೇಶ"
|
|||||||
loggingIn: "ಪ್ರವೇಶಿಸುತ್ತಾ..."
|
loggingIn: "ಪ್ರವೇಶಿಸುತ್ತಾ..."
|
||||||
logout: "ಆಚೆಗೆ"
|
logout: "ಆಚೆಗೆ"
|
||||||
signup: "ನೋಂದಣಿ"
|
signup: "ನೋಂದಣಿ"
|
||||||
|
uploading: "ಅಪ್ಲೋಡಾಗುತ್ತಿದೆ"
|
||||||
|
save: "ಉಳಿಸಿ"
|
||||||
|
users: "ಬಳಕೆದಾರ"
|
||||||
instances: "ನಿದರ್ಶನ"
|
instances: "ನಿದರ್ಶನ"
|
||||||
|
_sfx:
|
||||||
|
notification: "ಅಧಿಸೂಚನೆಗಳು"
|
||||||
_widgets:
|
_widgets:
|
||||||
notifications: "ಅಧಿಸೂಚನೆಗಳು"
|
notifications: "ಅಧಿಸೂಚನೆಗಳು"
|
||||||
timeline: "ಸಮಯಸಾಲು"
|
timeline: "ಸಮಯಸಾಲು"
|
||||||
|
@ -239,6 +239,8 @@ avatar: "아바타"
|
|||||||
banner: "배너"
|
banner: "배너"
|
||||||
nsfw: "열람주의"
|
nsfw: "열람주의"
|
||||||
disconnectedFromServer: "서버와의 연결이 끊어졌습니다"
|
disconnectedFromServer: "서버와의 연결이 끊어졌습니다"
|
||||||
|
reload: "새로고침"
|
||||||
|
doNothing: "무시하기"
|
||||||
reloadConfirm: "새로고침 하시겠습니까?"
|
reloadConfirm: "새로고침 하시겠습니까?"
|
||||||
watch: "지켜보기"
|
watch: "지켜보기"
|
||||||
unwatch: "지켜보기 해제"
|
unwatch: "지켜보기 해제"
|
||||||
@ -412,6 +414,29 @@ dayOverDayChanges: "어제보다"
|
|||||||
accessibility: "접근성"
|
accessibility: "접근성"
|
||||||
clinetSettings: "클라이언트 설정"
|
clinetSettings: "클라이언트 설정"
|
||||||
accountSettings: "계정 설정"
|
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:
|
_ago:
|
||||||
unknown: "알 수 없음"
|
unknown: "알 수 없음"
|
||||||
future: "미래"
|
future: "미래"
|
||||||
@ -513,6 +538,7 @@ _widgets:
|
|||||||
clock: "시계"
|
clock: "시계"
|
||||||
rss: "RSS 리더"
|
rss: "RSS 리더"
|
||||||
activity: "활동"
|
activity: "활동"
|
||||||
|
photos: "사진"
|
||||||
_cw:
|
_cw:
|
||||||
hide: "숨기기"
|
hide: "숨기기"
|
||||||
show: "더 보기"
|
show: "더 보기"
|
||||||
|
@ -315,8 +315,10 @@ moderator: "版主"
|
|||||||
nUsersMentioned: "{n} 被提到"
|
nUsersMentioned: "{n} 被提到"
|
||||||
securityKey: "安全密钥"
|
securityKey: "安全密钥"
|
||||||
securityKeyName: "密钥名称"
|
securityKeyName: "密钥名称"
|
||||||
|
registerSecurityKey: "注册安全密钥"
|
||||||
lastUsed: "最后使用:"
|
lastUsed: "最后使用:"
|
||||||
unregister: "删除账户"
|
unregister: "删除账户"
|
||||||
|
passwordLessLogin: "无密码登录"
|
||||||
resetPassword: "重置密码"
|
resetPassword: "重置密码"
|
||||||
newPasswordIs: "新的密码是「{password}」"
|
newPasswordIs: "新的密码是「{password}」"
|
||||||
post: "投稿"
|
post: "投稿"
|
||||||
@ -327,10 +329,12 @@ autoNoteWatchDescription: "让您能够收到关于「反应」和回复其他
|
|||||||
reduceUiAnimation: "减少UI动画"
|
reduceUiAnimation: "减少UI动画"
|
||||||
share: "分享"
|
share: "分享"
|
||||||
notFound: "未找到"
|
notFound: "未找到"
|
||||||
|
notFoundDescription: "没有与指定URL对应的页面。"
|
||||||
uploadFolder: "默认上传文件夹"
|
uploadFolder: "默认上传文件夹"
|
||||||
cacheClear: "清空缓存"
|
cacheClear: "清空缓存"
|
||||||
markAsReadAllNotifications: "将所有通知标为已读"
|
markAsReadAllNotifications: "将所有通知标为已读"
|
||||||
markAsReadAllUnreadNotes: "将所有帖子标记为已读"
|
markAsReadAllUnreadNotes: "将所有帖子标记为已读"
|
||||||
|
markAsReadAllTalkMessages: "将所有聊天标记为已读"
|
||||||
help: "帮助"
|
help: "帮助"
|
||||||
inputMessageHere: "在此键入信息"
|
inputMessageHere: "在此键入信息"
|
||||||
close: "关闭"
|
close: "关闭"
|
||||||
@ -343,6 +347,8 @@ invites: "邀请"
|
|||||||
groupName: "群组名"
|
groupName: "群组名"
|
||||||
members: "成员"
|
members: "成员"
|
||||||
transfer: "转让"
|
transfer: "转让"
|
||||||
|
messagingWithUser: "与用户聊天"
|
||||||
|
messagingWithGroup: "与群组聊天"
|
||||||
title: "标题"
|
title: "标题"
|
||||||
text: "文本"
|
text: "文本"
|
||||||
enable: "启用"
|
enable: "启用"
|
||||||
@ -353,6 +359,7 @@ inviteToGroup: "群组邀请"
|
|||||||
maxNoteTextLength: "帖子的字数限制"
|
maxNoteTextLength: "帖子的字数限制"
|
||||||
quoteAttached: "已引用"
|
quoteAttached: "已引用"
|
||||||
quoteQuestion: "是否将其作为引用附上?"
|
quoteQuestion: "是否将其作为引用附上?"
|
||||||
|
noMessagesYet: "现在没有新的聊天"
|
||||||
newMessageExists: "新信息"
|
newMessageExists: "新信息"
|
||||||
onlyOneFileCanBeAttached: "只能添加一个附件"
|
onlyOneFileCanBeAttached: "只能添加一个附件"
|
||||||
signinRequired: "请先登录"
|
signinRequired: "请先登录"
|
||||||
@ -368,6 +375,8 @@ normalPassword: "密码强度:中等"
|
|||||||
strongPassword: "密码强度:强"
|
strongPassword: "密码强度:强"
|
||||||
passwordMatched: "密码一致"
|
passwordMatched: "密码一致"
|
||||||
passwordNotMatched: "密码不一致"
|
passwordNotMatched: "密码不一致"
|
||||||
|
signinWith: "以{x}登录"
|
||||||
|
tapSecurityKey: "点击安全密钥"
|
||||||
or: "或者"
|
or: "或者"
|
||||||
uiLanguage: "显示语言"
|
uiLanguage: "显示语言"
|
||||||
groupInvited: "群组招待"
|
groupInvited: "群组招待"
|
||||||
@ -380,6 +389,7 @@ disableAnimatedMfm: "禁用MFM动画"
|
|||||||
doing: "正在进行"
|
doing: "正在进行"
|
||||||
category: "类别"
|
category: "类别"
|
||||||
tags: "标签"
|
tags: "标签"
|
||||||
|
docSource: "文件来源"
|
||||||
createAccount: "注册账户"
|
createAccount: "注册账户"
|
||||||
existingAcount: "现有的帐户"
|
existingAcount: "现有的帐户"
|
||||||
regenerate: "重新生成"
|
regenerate: "重新生成"
|
||||||
@ -395,6 +405,21 @@ dayOverDayChanges: "与前一日相比"
|
|||||||
accessibility: "辅助功能"
|
accessibility: "辅助功能"
|
||||||
clinetSettings: "客户端设置"
|
clinetSettings: "客户端设置"
|
||||||
accountSettings: "账户设置"
|
accountSettings: "账户设置"
|
||||||
|
numberOfDays: "天数"
|
||||||
|
hideThisNote: "隐藏这条帖子"
|
||||||
|
showFeaturedNotesInTimeline: "在时间轴上显示热门推荐"
|
||||||
|
objectStorage: "对象存储"
|
||||||
|
useObjectStorage: "使用对象存储"
|
||||||
|
serverLogs: "服务器日志"
|
||||||
|
deleteAll: "删除全部"
|
||||||
|
showFixedPostForm: "在时间线顶部显示帖子表单"
|
||||||
|
newNoteRecived: "有新的帖子"
|
||||||
|
useNotificationsPopup: "在弹出窗口中显示通知列表"
|
||||||
|
none: "空"
|
||||||
|
_sfx:
|
||||||
|
note: "帖子"
|
||||||
|
notification: "通知"
|
||||||
|
chat: "聊天"
|
||||||
_ago:
|
_ago:
|
||||||
unknown: "未知"
|
unknown: "未知"
|
||||||
future: "未来"
|
future: "未来"
|
||||||
@ -414,6 +439,16 @@ _time:
|
|||||||
_tutorial:
|
_tutorial:
|
||||||
title: "Misskey的使用方法"
|
title: "Misskey的使用方法"
|
||||||
step1_1: "欢迎!"
|
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带来的乐趣吧🚀"
|
step7_3: "接下来,享受Misskey带来的乐趣吧🚀"
|
||||||
_2fa:
|
_2fa:
|
||||||
alreadyRegistered: "此设备已被注册"
|
alreadyRegistered: "此设备已被注册"
|
||||||
@ -447,6 +482,7 @@ _auth:
|
|||||||
permissionAsk: "这个应用程序需要以下权限"
|
permissionAsk: "这个应用程序需要以下权限"
|
||||||
_antennaSources:
|
_antennaSources:
|
||||||
all: "所有帖子"
|
all: "所有帖子"
|
||||||
|
homeTimeline: "已关注用户的帖子"
|
||||||
_weekday:
|
_weekday:
|
||||||
sunday: "星期日"
|
sunday: "星期日"
|
||||||
monday: "星期一"
|
monday: "星期一"
|
||||||
@ -464,6 +500,7 @@ _widgets:
|
|||||||
clock: "时钟"
|
clock: "时钟"
|
||||||
rss: "RSS阅读器"
|
rss: "RSS阅读器"
|
||||||
activity: "活动"
|
activity: "活动"
|
||||||
|
photos: "照片"
|
||||||
_cw:
|
_cw:
|
||||||
hide: "隐藏"
|
hide: "隐藏"
|
||||||
show: "查看更多"
|
show: "查看更多"
|
||||||
@ -534,6 +571,7 @@ _charts:
|
|||||||
notesIncDec: "帖子:增加/减少"
|
notesIncDec: "帖子:增加/减少"
|
||||||
notesTotal: "帖子总数"
|
notesTotal: "帖子总数"
|
||||||
_instanceCharts:
|
_instanceCharts:
|
||||||
|
requests: "请求"
|
||||||
users: "用户数量:增加/减少"
|
users: "用户数量:增加/减少"
|
||||||
usersTotal: "用户总数"
|
usersTotal: "用户总数"
|
||||||
notes: "帖子:增加/减少"
|
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",
|
"name": "misskey",
|
||||||
"author": "syuilo <syuilotan@yahoo.co.jp>",
|
"author": "syuilo <syuilotan@yahoo.co.jp>",
|
||||||
"version": "12.13.0",
|
"version": "12.19.0",
|
||||||
"codename": "indigo",
|
"codename": "indigo",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -50,21 +50,27 @@
|
|||||||
<router-link class="item index" active-class="active" to="/" exact v-else>
|
<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>
|
<fa :icon="faHome" fixed-width/><span class="text">{{ $store.getters.isSignedIn ? $t('timeline') : $t('home') }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
<button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.getters.isSignedIn">
|
<template v-if="$store.getters.isSignedIn">
|
||||||
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
<button class="item _button notifications" @click="notificationsOpen = !notificationsOpen" ref="notificationButton" v-if="$store.state.device.useNotificationsPopup">
|
||||||
<i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i>
|
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
||||||
</button>
|
<i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i>
|
||||||
<router-link class="item" active-class="active" to="/my/messaging" v-if="$store.getters.isSignedIn">
|
</button>
|
||||||
<fa :icon="faComments" fixed-width/><span class="text">{{ $t('messaging') }}</span>
|
<router-link class="item notifications" active-class="active" to="/my/notifications" ref="notificationButton" v-else>
|
||||||
<i v-if="$store.state.i.hasUnreadMessagingMessage"><fa :icon="faCircle"/></i>
|
<fa :icon="faBell" fixed-width/><span class="text">{{ $t('notifications') }}</span>
|
||||||
</router-link>
|
<i v-if="$store.state.i.hasUnreadNotification"><fa :icon="faCircle"/></i>
|
||||||
<router-link class="item" active-class="active" to="/my/drive" v-if="$store.getters.isSignedIn">
|
</router-link>
|
||||||
<fa :icon="faCloud" fixed-width/><span class="text">{{ $t('drive') }}</span>
|
<router-link class="item" active-class="active" to="/my/messaging">
|
||||||
</router-link>
|
<fa :icon="faComments" fixed-width/><span class="text">{{ $t('messaging') }}</span>
|
||||||
<router-link class="item" active-class="active" to="/my/follow-requests" v-if="$store.getters.isSignedIn && $store.state.i.isLocked">
|
<i v-if="$store.state.i.hasUnreadMessagingMessage"><fa :icon="faCircle"/></i>
|
||||||
<fa :icon="faUserClock" fixed-width/><span class="text">{{ $t('followRequests') }}</span>
|
</router-link>
|
||||||
<i v-if="$store.state.i.hasPendingReceivedFollowRequest"><fa :icon="faCircle"/></i>
|
<router-link class="item" active-class="active" to="/my/drive">
|
||||||
</router-link>
|
<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>
|
<div class="divider"></div>
|
||||||
<router-link class="item" active-class="active" to="/featured">
|
<router-link class="item" active-class="active" to="/featured">
|
||||||
<fa :icon="faFireAlt" fixed-width/><span class="text">{{ $t('featured') }}</span>
|
<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>
|
<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>
|
<i v-if="$store.getters.isSignedIn && ($store.state.i.hasUnreadMentions || $store.state.i.hasUnreadSpecifiedNotes)"><fa :icon="faCircle"/></i>
|
||||||
</button>
|
</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>
|
<fa :icon="faCog" fixed-width/><span class="text">{{ $t('settings') }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</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 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-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-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>
|
<button v-if="$store.getters.isSignedIn" class="button post _buttonPrimary" @click="post()"><fa :icon="faPencilAlt"/></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -152,6 +159,8 @@
|
|||||||
<transition name="zoom-in-top">
|
<transition name="zoom-in-top">
|
||||||
<x-notifications v-if="notificationsOpen" class="notifications" ref="notifications"/>
|
<x-notifications v-if="notificationsOpen" class="notifications" ref="notifications"/>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
|
<stream-indicator v-if="$store.getters.isSignedIn"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -194,7 +203,6 @@ export default Vue.extend({
|
|||||||
widgetsEditMode: false,
|
widgetsEditMode: false,
|
||||||
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
||||||
canBack: false,
|
canBack: false,
|
||||||
disconnectedDialog: null as Promise<void> | null,
|
|
||||||
wallpaper: localStorage.getItem('wallpaper') != 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
|
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() {
|
mounted() {
|
||||||
@ -571,13 +555,17 @@ export default Vue.extend({
|
|||||||
|
|
||||||
onNotification(notification) {
|
onNotification(notification) {
|
||||||
// TODO: ユーザーが画面を見てないと思われるとき(ブラウザやタブがアクティブじゃないなど)は送信しない
|
// TODO: ユーザーが画面を見てないと思われるとき(ブラウザやタブがアクティブじゃないなど)は送信しない
|
||||||
this.$root.stream.send('readNotification', {
|
if (true) {
|
||||||
id: notification.id
|
this.$root.stream.send('readNotification', {
|
||||||
});
|
id: notification.id
|
||||||
|
});
|
||||||
|
|
||||||
this.$root.new(MkToast, {
|
this.$root.new(MkToast, {
|
||||||
notification
|
notification
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$root.sound('notification');
|
||||||
},
|
},
|
||||||
|
|
||||||
onMousedown(e) {
|
onMousedown(e) {
|
||||||
@ -638,30 +626,6 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<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-enter-active,
|
||||||
.nav-leave-active {
|
.nav-leave-active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -1218,15 +1182,17 @@ export default Vue.extend({
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding: 8px 8px 0 8px;
|
||||||
z-index: 10001;
|
z-index: 10001;
|
||||||
width: 350px;
|
width: 350px;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
|
box-sizing: border-box;
|
||||||
background: var(--vocsgcxy);
|
background: var(--vocsgcxy);
|
||||||
-webkit-backdrop-filter: blur(12px);
|
-webkit-backdrop-filter: blur(12px);
|
||||||
backdrop-filter: blur(12px);
|
backdrop-filter: blur(12px);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15);
|
box-shadow: 0 3px 12px rgba(27, 31, 35, 0.15);
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
width: 320px;
|
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 MkButton from './ui/button.vue';
|
||||||
import MkInput from './ui/input.vue';
|
import MkInput from './ui/input.vue';
|
||||||
import MkSelect from './ui/select.vue';
|
import MkSelect from './ui/select.vue';
|
||||||
|
import MkSignin from './signin.vue';
|
||||||
import parseAcct from '../../misc/acct/parse';
|
import parseAcct from '../../misc/acct/parse';
|
||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
|
|
||||||
@ -65,6 +66,7 @@ export default Vue.extend({
|
|||||||
MkButton,
|
MkButton,
|
||||||
MkInput,
|
MkInput,
|
||||||
MkSelect,
|
MkSelect,
|
||||||
|
MkSignin,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
@ -105,16 +105,6 @@ export default Vue.extend({
|
|||||||
text: this.$t('delete'),
|
text: this.$t('delete'),
|
||||||
icon: faTrashAlt,
|
icon: faTrashAlt,
|
||||||
action: this.deleteFile
|
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,
|
source: ev.currentTarget || ev.target,
|
||||||
});
|
});
|
||||||
|
@ -11,6 +11,7 @@ import url from './url.vue';
|
|||||||
import loading from './loading.vue';
|
import loading from './loading.vue';
|
||||||
import SequentialEntrance from './sequential-entrance.vue';
|
import SequentialEntrance from './sequential-entrance.vue';
|
||||||
import error from './error.vue';
|
import error from './error.vue';
|
||||||
|
import streamIndicator from './stream-indicator.vue';
|
||||||
|
|
||||||
Vue.component('mfm', mfm);
|
Vue.component('mfm', mfm);
|
||||||
Vue.component('mk-acct', acct);
|
Vue.component('mk-acct', acct);
|
||||||
@ -23,3 +24,4 @@ Vue.component('mk-url', url);
|
|||||||
Vue.component('mk-loading', loading);
|
Vue.component('mk-loading', loading);
|
||||||
Vue.component('mk-error', error);
|
Vue.component('mk-error', error);
|
||||||
Vue.component('sequential-entrance', SequentialEntrance);
|
Vue.component('sequential-entrance', SequentialEntrance);
|
||||||
|
Vue.component('stream-indicator', streamIndicator);
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<template v-for="media in mediaList.filter(media => !previewable(media))">
|
<template v-for="media in mediaList.filter(media => !previewable(media))">
|
||||||
<x-banner :media="media" :key="media.id"/>
|
<x-banner :media="media" :key="media.id"/>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container">
|
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container" ref="gridOuter">
|
||||||
<div :data-count="mediaList.filter(media => previewable(media)).length" ref="grid">
|
<div :data-count="mediaList.filter(media => previewable(media)).length" :style="gridInnerStyle">
|
||||||
<template v-for="media in mediaList">
|
<template v-for="media in mediaList">
|
||||||
<x-video :video="media" :key="media.id" v-if="media.type.startsWith('video')"/>
|
<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"/>
|
<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: {
|
raw: {
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
// specify the parent element
|
||||||
|
parentElement: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
gridInnerStyle: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//#region for Safari bug
|
this.size();
|
||||||
if (this.$refs.grid) {
|
window.addEventListener('resize', this.size);
|
||||||
this.$refs.grid.style.height = this.$refs.grid.clientHeight ? `${this.$refs.grid.clientHeight}px`
|
},
|
||||||
: '287px';
|
beforeDestroy() {
|
||||||
}
|
window.removeEventListener('resize', this.size);
|
||||||
//#endregion
|
},
|
||||||
|
activated() {
|
||||||
|
this.size();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
previewable(file) {
|
previewable(file) {
|
||||||
return file.type.startsWith('video') || file.type.startsWith('image');
|
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>
|
<template>
|
||||||
<div class="mk-notification" :class="notification.type">
|
<div class="mk-notification" :class="notification.type" v-size="[{ max: 500 }, { max: 600 }]">
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<mk-avatar class="avatar" :user="notification.user"/>
|
<mk-avatar class="avatar" :user="notification.user"/>
|
||||||
<div class="icon" :class="notification.type">
|
<div class="icon" :class="notification.type">
|
||||||
@ -113,12 +113,17 @@ export default Vue.extend({
|
|||||||
.mk-notification {
|
.mk-notification {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 16px;
|
padding: 24px 32px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@media (max-width: 500px) {
|
&.max-width_600px {
|
||||||
|
padding: 16px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.max-width_500px {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-notifications">
|
<div class="mk-notifications" :class="{ page }">
|
||||||
<div class="contents">
|
<x-list class="notifications" :items="items" v-slot="{ item: notification }">
|
||||||
<x-list class="notifications" :items="items" v-slot="{ item: notification, i }">
|
<x-note v-if="['reply', 'quote', 'mention'].includes(notification.type)" :note="notification.note" :key="notification.id"/>
|
||||||
<x-notification :notification="notification" :with-time="true" :full="true" class="notification" :key="notification.id"/>
|
<x-notification v-else :notification="notification" :with-time="true" :full="true" class="notification" :class="{ _panel: page }" :key="notification.id"/>
|
||||||
</x-list>
|
</x-list>
|
||||||
|
|
||||||
<button class="more _button" v-if="more" @click="fetchMore" :disabled="moreFetching">
|
<button class="more _button" v-if="more" @click="fetchMore" :disabled="moreFetching">
|
||||||
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
|
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
|
||||||
<template v-if="moreFetching"><fa :icon="faSpinner" pulse fixed-width/></template>
|
<template v-if="moreFetching"><fa :icon="faSpinner" pulse fixed-width/></template>
|
||||||
</button>
|
</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()"/>
|
<mk-error v-if="error" @retry="init()"/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -24,6 +23,7 @@ import i18n from '../i18n';
|
|||||||
import paging from '../scripts/paging';
|
import paging from '../scripts/paging';
|
||||||
import XNotification from './notification.vue';
|
import XNotification from './notification.vue';
|
||||||
import XList from './date-separated-list.vue';
|
import XList from './date-separated-list.vue';
|
||||||
|
import XNote from './note.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
||||||
@ -31,6 +31,7 @@ export default Vue.extend({
|
|||||||
components: {
|
components: {
|
||||||
XNotification,
|
XNotification,
|
||||||
XList,
|
XList,
|
||||||
|
XNote,
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [
|
mixins: [
|
||||||
@ -42,7 +43,7 @@ export default Vue.extend({
|
|||||||
type: String,
|
type: String,
|
||||||
required: false
|
required: false
|
||||||
},
|
},
|
||||||
wide: {
|
page: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
@ -93,11 +94,15 @@ export default Vue.extend({
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.mk-notifications {
|
.mk-notifications {
|
||||||
> .contents {
|
&.page {
|
||||||
overflow: auto;
|
> .notifications {
|
||||||
height: 100%;
|
> ::v-deep * {
|
||||||
padding: 8px 8px 0 8px;
|
margin-bottom: var(--margin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(.page) {
|
||||||
> .notifications {
|
> .notifications {
|
||||||
> ::v-deep * {
|
> ::v-deep * {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
@ -109,28 +114,28 @@ export default Vue.extend({
|
|||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .more {
|
> .more {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
|
||||||
> [data-icon] {
|
> [data-icon] {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .empty {
|
> .empty {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
> .placeholder {
|
> .placeholder {
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -112,8 +112,7 @@ export default Vue.extend({
|
|||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: var(--pollChoiceText);
|
border: solid 1px var(--divider);
|
||||||
border: solid 1px var(--pollChoiceBorder);
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
@drop.stop="onDrop"
|
@drop.stop="onDrop"
|
||||||
>
|
>
|
||||||
<header>
|
<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>
|
<div>
|
||||||
<span class="text-count" :class="{ over: trimmedLength(text) > max }">{{ max - trimmedLength(text) }}</span>
|
<span class="text-count" :class="{ over: trimmedLength(text) > max }">{{ max - trimmedLength(text) }}</span>
|
||||||
<button class="_button visibility" @click="setVisibility" ref="visibilityButton">
|
<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>
|
<button class="submit _buttonPrimary" :disabled="!canPost" @click="post">{{ submitText }}<fa :icon="reply ? faReply : renote ? faQuoteRight : faPaperPlane"/></button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</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="reply" :note="reply"/>
|
||||||
<x-note-preview class="preview" v-if="renote" :note="renote"/>
|
<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>
|
<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,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
fixed: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -582,7 +587,6 @@ export default Vue.extend({
|
|||||||
.gafaadew {
|
.gafaadew {
|
||||||
background: var(--panel);
|
background: var(--panel);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
box-shadow: 0 0 2px rgba(#000, 0.1);
|
|
||||||
|
|
||||||
> header {
|
> header {
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
@ -651,6 +655,10 @@ export default Vue.extend({
|
|||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
&.fixed {
|
||||||
|
max-width: unset;
|
||||||
|
}
|
||||||
|
|
||||||
> .preview {
|
> .preview {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<x-window ref="window" @closed="() => { $emit('closed'); destroyDom(); }">
|
<x-window ref="window" @closed="() => { $emit('closed'); destroyDom(); }">
|
||||||
<template #header>{{ $t('login') }}</template>
|
<template #header>{{ $t('login') }}</template>
|
||||||
<x-signin :auto-set="autoSet" @login="onLogin"/>
|
<mk-signin :auto-set="autoSet" @login="onLogin"/>
|
||||||
</x-window>
|
</x-window>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -9,13 +9,13 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
import XWindow from './window.vue';
|
import XWindow from './window.vue';
|
||||||
import XSignin from './signin.vue';
|
import MkSignin from './signin.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
XSignin,
|
MkSignin,
|
||||||
XWindow,
|
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>
|
<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>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@ -21,6 +21,11 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
antenna: {
|
antenna: {
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
sound: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -46,6 +51,10 @@ export default Vue.extend({
|
|||||||
|
|
||||||
const prepend = note => {
|
const prepend = note => {
|
||||||
(this.$refs.tl as any).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 = () => {
|
const onUserAdded = () => {
|
||||||
|
@ -56,7 +56,7 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
filled(): boolean {
|
filled(): boolean {
|
||||||
return this.v != '' && this.v != null;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -100,6 +100,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
> .input {
|
> .input {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '';
|
content: '';
|
||||||
|
@ -51,6 +51,7 @@ export default Vue.extend({
|
|||||||
target: self ? null : '_blank',
|
target: self ? null : '_blank',
|
||||||
showTimer: null,
|
showTimer: null,
|
||||||
hideTimer: null,
|
hideTimer: null,
|
||||||
|
checkTimer: null,
|
||||||
preview: null,
|
preview: null,
|
||||||
faExternalLinkSquareAlt
|
faExternalLinkSquareAlt
|
||||||
};
|
};
|
||||||
@ -78,9 +79,14 @@ export default Vue.extend({
|
|||||||
}).$mount();
|
}).$mount();
|
||||||
|
|
||||||
document.body.appendChild(this.preview.$el);
|
document.body.appendChild(this.preview.$el);
|
||||||
|
|
||||||
|
this.checkTimer = setInterval(() => {
|
||||||
|
if (!document.body.contains(this.$el)) this.closePreview();
|
||||||
|
}, 1000);
|
||||||
},
|
},
|
||||||
closePreview() {
|
closePreview() {
|
||||||
if (this.preview) {
|
if (this.preview) {
|
||||||
|
clearInterval(this.checkTimer);
|
||||||
this.preview.destroyDom();
|
this.preview.destroyDom();
|
||||||
this.preview = null;
|
this.preview = null;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<template #header><mk-user-name :user="user"/></template>
|
<template #header><mk-user-name :user="user"/></template>
|
||||||
<div class="vrcsvlkm">
|
<div class="vrcsvlkm">
|
||||||
<mk-button @click="resetPassword()" primary>{{ $t('resetPassword') }}</mk-button>
|
<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="toggleSilence()" v-model="silenced">{{ $t('silence') }}</mk-switch>
|
||||||
<mk-switch @change="toggleSuspend()" v-model="suspended">{{ $t('suspend') }}</mk-switch>
|
<mk-switch @change="toggleSuspend()" v-model="suspended">{{ $t('suspend') }}</mk-switch>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,6 +53,7 @@ export default Vue.extend({
|
|||||||
return {
|
return {
|
||||||
u: null,
|
u: null,
|
||||||
show: false,
|
show: false,
|
||||||
|
closed: false,
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
};
|
};
|
||||||
@ -68,6 +69,7 @@ export default Vue.extend({
|
|||||||
{ userId: this.user };
|
{ userId: this.user };
|
||||||
|
|
||||||
this.$root.api('users/show', query).then(user => {
|
this.$root.api('users/show', query).then(user => {
|
||||||
|
if (this.closed) return;
|
||||||
this.u = user;
|
this.u = user;
|
||||||
this.show = true;
|
this.show = true;
|
||||||
});
|
});
|
||||||
@ -83,6 +85,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
|
this.closed = true;
|
||||||
this.show = false;
|
this.show = false;
|
||||||
if (this.$refs.content) (this.$refs.content as any).style.pointerEvents = 'none';
|
if (this.$refs.content) (this.$refs.content as any).style.pointerEvents = 'none';
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,11 @@ export default {
|
|||||||
self.tag = null;
|
self.tag = null;
|
||||||
self.showTimer = null;
|
self.showTimer = null;
|
||||||
self.hideTimer = null;
|
self.hideTimer = null;
|
||||||
|
self.checkTimer = null;
|
||||||
|
|
||||||
self.close = () => {
|
self.close = () => {
|
||||||
if (self.tag) {
|
if (self.tag) {
|
||||||
|
clearInterval(self.checkTimer);
|
||||||
self.tag.close();
|
self.tag.close();
|
||||||
self.tag = null;
|
self.tag = null;
|
||||||
}
|
}
|
||||||
@ -38,6 +40,14 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
document.body.appendChild(self.tag.$el);
|
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', () => {
|
el.addEventListener('mouseover', () => {
|
||||||
@ -60,8 +70,6 @@ export default {
|
|||||||
|
|
||||||
unbind(el, binding, vn) {
|
unbind(el, binding, vn) {
|
||||||
const self = el._userPreviewDirective_;
|
const self = el._userPreviewDirective_;
|
||||||
clearTimeout(self.showTimer);
|
clearInterval(self.checkTimer);
|
||||||
clearTimeout(self.hideTimer);
|
|
||||||
self.close();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -189,6 +189,14 @@ os.init(async () => {
|
|||||||
if (cb) vm.$once('closed', cb);
|
if (cb) vm.$once('closed', cb);
|
||||||
(vm as any).focus();
|
(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,
|
router: router,
|
||||||
render: createEl => createEl(App)
|
render: createEl => createEl(App)
|
||||||
@ -198,4 +206,96 @@ os.init(async () => {
|
|||||||
|
|
||||||
// マウント
|
// マウント
|
||||||
app.$mount('#app');
|
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 { EventEmitter } from 'eventemitter3';
|
||||||
|
|
||||||
import initStore from './store';
|
import initStore from './store';
|
||||||
import { apiUrl, version, locale } from './config';
|
import { apiUrl, version } from './config';
|
||||||
import Progress from './scripts/loading';
|
import Progress from './scripts/loading';
|
||||||
|
|
||||||
import Stream from './scripts/stream';
|
import Stream from './scripts/stream';
|
||||||
@ -142,94 +142,6 @@ export default class MiOS extends EventEmitter {
|
|||||||
@autobind
|
@autobind
|
||||||
private initStream() {
|
private initStream() {
|
||||||
this.stream = new Stream(this);
|
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 Vue from 'vue';
|
||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
import XForm from './auth.form.vue';
|
import XForm from './auth.form.vue';
|
||||||
|
import MkSignin from '../components/signin.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n,
|
i18n,
|
||||||
components: {
|
components: {
|
||||||
XForm
|
XForm,
|
||||||
|
MkSignin,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -14,9 +14,12 @@
|
|||||||
</button>
|
</button>
|
||||||
</portal>
|
</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-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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,6 +30,7 @@ import { faComments } from '@fortawesome/free-regular-svg-icons';
|
|||||||
import Progress from '../scripts/loading';
|
import Progress from '../scripts/loading';
|
||||||
import XTimeline from '../components/timeline.vue';
|
import XTimeline from '../components/timeline.vue';
|
||||||
import XTutorial from './index.home.tutorial.vue';
|
import XTutorial from './index.home.tutorial.vue';
|
||||||
|
import XPostForm from '../components/post-form.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
metaInfo() {
|
metaInfo() {
|
||||||
@ -38,6 +42,7 @@ export default Vue.extend({
|
|||||||
components: {
|
components: {
|
||||||
XTimeline,
|
XTimeline,
|
||||||
XTutorial,
|
XTutorial,
|
||||||
|
XPostForm,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -53,6 +58,8 @@ export default Vue.extend({
|
|||||||
list: null,
|
list: null,
|
||||||
antenna: null,
|
antenna: null,
|
||||||
menuOpened: false,
|
menuOpened: false,
|
||||||
|
queue: 0,
|
||||||
|
width: 0,
|
||||||
faAngleDown, faAngleUp, faHome, faShareAlt, faGlobe, faComments, faListUl, faSatellite, faCircle
|
faAngleDown, faAngleUp, faHome, faShareAlt, faGlobe, faComments, faListUl, faSatellite, faCircle
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -63,6 +70,10 @@ export default Vue.extend({
|
|||||||
't': this.focus
|
't': this.focus
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
meta() {
|
||||||
|
return this.$store.state.instance.meta;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
@ -91,6 +102,10 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.width = this.$el.offsetWidth;
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
before() {
|
before() {
|
||||||
Progress.start();
|
Progress.start();
|
||||||
@ -100,7 +115,17 @@ export default Vue.extend({
|
|||||||
Progress.done();
|
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) {
|
async choose(ev) {
|
||||||
|
if (this.meta == null) return;
|
||||||
this.menuOpened = true;
|
this.menuOpened = true;
|
||||||
const [antennas, lists] = await Promise.all([
|
const [antennas, lists] = await Promise.all([
|
||||||
this.$root.api('antennas/list'),
|
this.$root.api('antennas/list'),
|
||||||
@ -128,15 +153,15 @@ export default Vue.extend({
|
|||||||
text: this.$t('_timelines.home'),
|
text: this.$t('_timelines.home'),
|
||||||
icon: faHome,
|
icon: faHome,
|
||||||
action: () => { this.setSrc('home') }
|
action: () => { this.setSrc('home') }
|
||||||
}, {
|
}, this.meta.disableLocalTimeline && !this.$store.state.i.isModerator && !this.$store.state.i.isAdmin ? undefined : {
|
||||||
text: this.$t('_timelines.local'),
|
text: this.$t('_timelines.local'),
|
||||||
icon: faComments,
|
icon: faComments,
|
||||||
action: () => { this.setSrc('local') }
|
action: () => { this.setSrc('local') }
|
||||||
}, {
|
}, this.meta.disableLocalTimeline && !this.$store.state.i.isModerator && !this.$store.state.i.isAdmin ? undefined : {
|
||||||
text: this.$t('_timelines.social'),
|
text: this.$t('_timelines.social'),
|
||||||
icon: faShareAlt,
|
icon: faShareAlt,
|
||||||
action: () => { this.setSrc('social') }
|
action: () => { this.setSrc('social') }
|
||||||
}, {
|
}, this.meta.disableGlobalTimeline && !this.$store.state.i.isModerator && !this.$store.state.i.isAdmin ? undefined : {
|
||||||
text: this.$t('_timelines.global'),
|
text: this.$t('_timelines.global'),
|
||||||
icon: faGlobe,
|
icon: faGlobe,
|
||||||
action: () => { this.setSrc('global') }
|
action: () => { this.setSrc('global') }
|
||||||
@ -169,9 +194,26 @@ export default Vue.extend({
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.mk-home {
|
.mk-home {
|
||||||
|
> .new {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1000;
|
||||||
|
|
||||||
|
> button {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .tutorial {
|
> .tutorial {
|
||||||
margin-bottom: var(--margin);
|
margin-bottom: var(--margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> .post-form {
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: var(--margin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
._kjvfvyph_ {
|
._kjvfvyph_ {
|
||||||
|
@ -5,6 +5,38 @@
|
|||||||
|
|
||||||
<mk-instance-stats style="margin-bottom: var(--margin);"/>
|
<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">
|
<section class="_card chart">
|
||||||
<div class="_title"><fa :icon="faMicrochip"/> {{ $t('cpuAndMemory') }}</div>
|
<div class="_title"><fa :icon="faMicrochip"/> {{ $t('cpuAndMemory') }}</div>
|
||||||
<div class="_content" style="margin-top: -8px; margin-bottom: -12px;">
|
<div class="_content" style="margin-top: -8px; margin-bottom: -12px;">
|
||||||
@ -67,9 +99,13 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
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 Chart from 'chart.js';
|
||||||
|
import VueJsonPretty from 'vue-json-pretty';
|
||||||
import MkInstanceStats from '../../components/instance-stats.vue';
|
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 { version, url } from '../../config';
|
||||||
import i18n from '../../i18n';
|
import i18n from '../../i18n';
|
||||||
|
|
||||||
@ -92,6 +128,10 @@ export default Vue.extend({
|
|||||||
|
|
||||||
components: {
|
components: {
|
||||||
MkInstanceStats,
|
MkInstanceStats,
|
||||||
|
MkButton,
|
||||||
|
MkSelect,
|
||||||
|
MkInput,
|
||||||
|
VueJsonPretty
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -104,7 +144,10 @@ export default Vue.extend({
|
|||||||
memUsage: 0,
|
memUsage: 0,
|
||||||
chartCpuMem: null,
|
chartCpuMem: null,
|
||||||
chartNet: 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() {
|
mounted() {
|
||||||
|
this.fetchLogs();
|
||||||
|
|
||||||
Chart.defaults.global.defaultFontColor = getComputedStyle(document.documentElement).getPropertyValue('--fg');
|
Chart.defaults.global.defaultFontColor = getComputedStyle(document.documentElement).getPropertyValue('--fg');
|
||||||
|
|
||||||
this.chartCpuMem = new Chart(this.$refs.cpumem, {
|
this.chartCpuMem = new Chart(this.$refs.cpumem, {
|
||||||
@ -330,6 +386,25 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
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) {
|
onStats(stats) {
|
||||||
const cpu = (stats.cpu * 100).toFixed(0);
|
const cpu = (stats.cpu * 100).toFixed(0);
|
||||||
const memActive = (stats.mem.active / this.serverInfo.mem.total * 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 {
|
> .chart {
|
||||||
> ._content {
|
> ._content {
|
||||||
> .table {
|
> .table {
|
||||||
|
@ -61,10 +61,10 @@
|
|||||||
<div class="_content">
|
<div class="_content">
|
||||||
<mk-switch v-model="enableServiceWorker">{{ $t('enableServiceworker') }}<template #desc>{{ $t('serviceworkerInfo') }}</template></mk-switch>
|
<mk-switch v-model="enableServiceWorker">{{ $t('enableServiceworker') }}<template #desc>{{ $t('serviceworkerInfo') }}</template></mk-switch>
|
||||||
<template v-if="enableServiceWorker">
|
<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="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-input v-model="swPrivateKey" :disabled="!enableServiceWorker"><template #icon><fa :icon="faKey"/></template>Private key</mk-input>
|
||||||
</mk-horizon-group>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="_footer">
|
<div class="_footer">
|
||||||
@ -97,6 +97,33 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</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">
|
<section class="_card">
|
||||||
<div class="_title"><fa :icon="faGhost"/> {{ $t('proxyAccount') }}</div>
|
<div class="_title"><fa :icon="faGhost"/> {{ $t('proxyAccount') }}</div>
|
||||||
<div class="_content">
|
<div class="_content">
|
||||||
@ -213,6 +240,16 @@ export default Vue.extend({
|
|||||||
enableServiceWorker: false,
|
enableServiceWorker: false,
|
||||||
swPublicKey: null,
|
swPublicKey: null,
|
||||||
swPrivateKey: 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,
|
enableTwitterIntegration: false,
|
||||||
twitterConsumerKey: null,
|
twitterConsumerKey: null,
|
||||||
twitterConsumerSecret: null,
|
twitterConsumerSecret: null,
|
||||||
@ -257,6 +294,16 @@ export default Vue.extend({
|
|||||||
this.enableServiceWorker = this.meta.enableServiceWorker;
|
this.enableServiceWorker = this.meta.enableServiceWorker;
|
||||||
this.swPublicKey = this.meta.swPublickey;
|
this.swPublicKey = this.meta.swPublickey;
|
||||||
this.swPrivateKey = this.meta.swPrivateKey;
|
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.enableTwitterIntegration = this.meta.enableTwitterIntegration;
|
||||||
this.twitterConsumerKey = this.meta.twitterConsumerKey;
|
this.twitterConsumerKey = this.meta.twitterConsumerKey;
|
||||||
this.twitterConsumerSecret = this.meta.twitterConsumerSecret;
|
this.twitterConsumerSecret = this.meta.twitterConsumerSecret;
|
||||||
@ -341,6 +388,16 @@ export default Vue.extend({
|
|||||||
enableServiceWorker: this.enableServiceWorker,
|
enableServiceWorker: this.enableServiceWorker,
|
||||||
swPublicKey: this.swPublicKey,
|
swPublicKey: this.swPublicKey,
|
||||||
swPrivateKey: this.swPrivateKey,
|
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,
|
enableTwitterIntegration: this.enableTwitterIntegration,
|
||||||
twitterConsumerKey: this.twitterConsumerKey,
|
twitterConsumerKey: this.twitterConsumerKey,
|
||||||
twitterConsumerSecret: this.twitterConsumerSecret,
|
twitterConsumerSecret: this.twitterConsumerSecret,
|
||||||
|
@ -184,12 +184,7 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onMessage(message) {
|
onMessage(message) {
|
||||||
// サウンドを再生する
|
this.$root.sound('chat');
|
||||||
if (this.$store.state.device.enableSounds) {
|
|
||||||
const sound = new Audio(`${url}/assets/message.mp3`);
|
|
||||||
sound.volume = this.$store.state.device.soundVolume;
|
|
||||||
sound.play();
|
|
||||||
}
|
|
||||||
|
|
||||||
const isBottom = this.isBottom();
|
const isBottom = this.isBottom();
|
||||||
|
|
||||||
|
@ -30,6 +30,10 @@
|
|||||||
<span>{{ $t('antennaKeywords') }}</span>
|
<span>{{ $t('antennaKeywords') }}</span>
|
||||||
<template #desc>{{ $t('antennaKeywordsDescription') }}</template>
|
<template #desc>{{ $t('antennaKeywordsDescription') }}</template>
|
||||||
</mk-textarea>
|
</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="caseSensitive">{{ $t('caseSensitive') }}</mk-switch>
|
||||||
<mk-switch v-model="withFile">{{ $t('withFileAntenna') }}</mk-switch>
|
<mk-switch v-model="withFile">{{ $t('withFileAntenna') }}</mk-switch>
|
||||||
<mk-switch v-model="notify">{{ $t('notifyAntenna') }}</mk-switch>
|
<mk-switch v-model="notify">{{ $t('notifyAntenna') }}</mk-switch>
|
||||||
@ -75,6 +79,7 @@ export default Vue.extend({
|
|||||||
userGroupId: null,
|
userGroupId: null,
|
||||||
users: '',
|
users: '',
|
||||||
keywords: '',
|
keywords: '',
|
||||||
|
excludeKeywords: '',
|
||||||
caseSensitive: false,
|
caseSensitive: false,
|
||||||
withReplies: false,
|
withReplies: false,
|
||||||
withFile: false,
|
withFile: false,
|
||||||
@ -107,6 +112,7 @@ export default Vue.extend({
|
|||||||
this.userGroupId = this.antenna.userGroupId;
|
this.userGroupId = this.antenna.userGroupId;
|
||||||
this.users = this.antenna.users.join('\n');
|
this.users = this.antenna.users.join('\n');
|
||||||
this.keywords = this.antenna.keywords.map(x => x.join(' ')).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.caseSensitive = this.antenna.caseSensitive;
|
||||||
this.withReplies = this.antenna.withReplies;
|
this.withReplies = this.antenna.withReplies;
|
||||||
this.withFile = this.antenna.withFile;
|
this.withFile = this.antenna.withFile;
|
||||||
@ -126,7 +132,8 @@ export default Vue.extend({
|
|||||||
notify: this.notify,
|
notify: this.notify,
|
||||||
caseSensitive: this.caseSensitive,
|
caseSensitive: this.caseSensitive,
|
||||||
users: this.users.trim().split('\n').map(x => x.trim()),
|
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');
|
this.$emit('created');
|
||||||
} else {
|
} else {
|
||||||
@ -141,7 +148,8 @@ export default Vue.extend({
|
|||||||
notify: this.notify,
|
notify: this.notify,
|
||||||
caseSensitive: this.caseSensitive,
|
caseSensitive: this.caseSensitive,
|
||||||
users: this.users.trim().split('\n').map(x => x.trim()),
|
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,
|
userGroupId: null,
|
||||||
users: [],
|
users: [],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
|
excludeKeywords: [],
|
||||||
withReplies: false,
|
withReplies: false,
|
||||||
caseSensitive: false,
|
caseSensitive: false,
|
||||||
withFile: 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>
|
</template>
|
||||||
<router-link :to="`./${page.name}/view-source`">{{ $t('_pages.viewSource') }}</router-link>
|
<router-link :to="`./${page.name}/view-source`">{{ $t('_pages.viewSource') }}</router-link>
|
||||||
<div class="like">
|
<div class="like">
|
||||||
<button @click="unlike()" v-if="page.isLiked" :title="$t('_pages.unlike')"><fa :icon="faHeartS"/></button>
|
<button class="_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="like()" v-else :title="$t('_pages.like')"><fa :icon="faHeartR"/></button>
|
||||||
<span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span>
|
<span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
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';
|
import XPage from '../components/page/page.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
@ -49,6 +51,7 @@ export default Vue.extend({
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
page: null,
|
page: null,
|
||||||
|
faHeartS, faHeartR
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -102,7 +105,7 @@ export default Vue.extend({
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$root.dialog({
|
this.$root.dialog({
|
||||||
type: 'success',
|
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));
|
applyTheme(this.themes.find(x => x.id === this.theme));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
wallpaper() {
|
wallpaper() {
|
||||||
if (this.wallpaper == null) {
|
if (this.wallpaper == null) {
|
||||||
localStorage.removeItem('wallpaper');
|
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', component: page('explore') },
|
||||||
{ path: '/explore/tags/:tag', props: true, component: page('explore') },
|
{ path: '/explore/tags/:tag', props: true, component: page('explore') },
|
||||||
{ path: '/search', component: page('search') },
|
{ path: '/search', component: page('search') },
|
||||||
|
{ path: '/my/notifications', component: page('notifications') },
|
||||||
{ path: '/my/favorites', component: page('favorites') },
|
{ path: '/my/favorites', component: page('favorites') },
|
||||||
{ path: '/my/messages', component: page('messages') },
|
{ path: '/my/messages', component: page('messages') },
|
||||||
{ path: '/my/mentions', component: page('mentions') },
|
{ 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', component: page('my-groups/index') },
|
||||||
{ path: '/my/groups/:group', component: page('my-groups/group') },
|
{ path: '/my/groups/:group', component: page('my-groups/group') },
|
||||||
{ path: '/my/antennas', component: page('my-antennas/index') },
|
{ 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', component: page('instance/index') },
|
||||||
{ path: '/instance/emojis', component: page('instance/emojis') },
|
{ path: '/instance/emojis', component: page('instance/emojis') },
|
||||||
{ path: '/instance/users', component: page('instance/users') },
|
{ path: '/instance/users', component: page('instance/users') },
|
||||||
|
@ -31,6 +31,10 @@ export default (opts) => ({
|
|||||||
watch: {
|
watch: {
|
||||||
pagination() {
|
pagination() {
|
||||||
this.init();
|
this.init();
|
||||||
|
},
|
||||||
|
|
||||||
|
queue() {
|
||||||
|
this.$emit('queue', this.queue.length);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -39,6 +39,15 @@ const defaultDeviceSettings = {
|
|||||||
animation: true,
|
animation: true,
|
||||||
animatedMfm: true,
|
animatedMfm: true,
|
||||||
imageNewTab: false,
|
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: {},
|
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 {
|
._shadow {
|
||||||
box-shadow: 0 8px 32px var(--shadow);
|
box-shadow: 0 8px 32px var(--shadow);
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ export default define({
|
|||||||
|
|
||||||
.tl {
|
.tl {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
|
padding: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -52,6 +52,19 @@ export async function checkHitAntenna(antenna: Antenna, note: Note, noteUser: Us
|
|||||||
if (!matched) return false;
|
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 (antenna.withFile) {
|
||||||
if (note.fileIds.length === 0) return false;
|
if (note.fileIds.length === 0) return false;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import { emojiRegex } from './emoji-regex';
|
|||||||
import { fetchMeta } from './fetch-meta';
|
import { fetchMeta } from './fetch-meta';
|
||||||
import { Emojis } from '../models';
|
import { Emojis } from '../models';
|
||||||
|
|
||||||
const legacy10: Record<string, string> = {
|
const legacies: Record<string, string> = {
|
||||||
'like': '👍',
|
'like': '👍',
|
||||||
'love': '❤', // ここに記述する場合は異体字セレクタを入れない
|
'love': '❤', // ここに記述する場合は異体字セレクタを入れない
|
||||||
'laugh': '😆',
|
'laugh': '😆',
|
||||||
@ -13,6 +13,7 @@ const legacy10: Record<string, string> = {
|
|||||||
'confused': '😥',
|
'confused': '😥',
|
||||||
'rip': '😇',
|
'rip': '😇',
|
||||||
'pudding': '🍮',
|
'pudding': '🍮',
|
||||||
|
'star': '⭐',
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function getFallbackReaction(): Promise<string> {
|
export async function getFallbackReaction(): Promise<string> {
|
||||||
@ -20,11 +21,33 @@ export async function getFallbackReaction(): Promise<string> {
|
|||||||
return meta.useStarForReactionFallback ? '⭐' : '👍';
|
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> {
|
export async function toDbReaction(reaction?: string | null): Promise<string> {
|
||||||
if (reaction == null) return await getFallbackReaction();
|
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絵文字
|
// Unicode絵文字
|
||||||
const match = emojiRegex.exec(reaction);
|
const match = emojiRegex.exec(reaction);
|
||||||
@ -50,6 +73,6 @@ export async function toDbReaction(reaction?: string | null): Promise<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function convertLegacyReaction(reaction: string): 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;
|
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[][];
|
public keywords: string[][];
|
||||||
|
|
||||||
|
@Column('jsonb', {
|
||||||
|
default: []
|
||||||
|
})
|
||||||
|
public excludeKeywords: string[][];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column('boolean', {
|
||||||
default: false
|
default: false
|
||||||
})
|
})
|
||||||
|
@ -21,6 +21,7 @@ export class AntennaRepository extends Repository<Antenna> {
|
|||||||
createdAt: antenna.createdAt.toISOString(),
|
createdAt: antenna.createdAt.toISOString(),
|
||||||
name: antenna.name,
|
name: antenna.name,
|
||||||
keywords: antenna.keywords,
|
keywords: antenna.keywords,
|
||||||
|
excludeKeywords: antenna.excludeKeywords,
|
||||||
src: antenna.src,
|
src: antenna.src,
|
||||||
userListId: antenna.userListId,
|
userListId: antenna.userListId,
|
||||||
userGroupId: userGroupJoining ? userGroupJoining.userGroupId : null,
|
userGroupId: userGroupJoining ? userGroupJoining.userGroupId : null,
|
||||||
|
@ -6,7 +6,7 @@ import { Emojis, Users, PollVotes, DriveFiles, NoteReactions, Followings, Polls
|
|||||||
import { ensure } from '../../prelude/ensure';
|
import { ensure } from '../../prelude/ensure';
|
||||||
import { SchemaType } from '../../misc/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
import { awaitAll } from '../../prelude/await-all';
|
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>;
|
export type PackedNote = SchemaType<typeof packedNoteSchema>;
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ export class NoteRepository extends Repository<Note> {
|
|||||||
viaMobile: note.viaMobile || undefined,
|
viaMobile: note.viaMobile || undefined,
|
||||||
renoteCount: note.renoteCount,
|
renoteCount: note.renoteCount,
|
||||||
repliesCount: note.repliesCount,
|
repliesCount: note.repliesCount,
|
||||||
reactions: note.reactions, // v12 TODO: convert legacy reaction
|
reactions: convertLegacyReactions(note.reactions),
|
||||||
tags: note.tags.length > 0 ? note.tags : undefined,
|
tags: note.tags.length > 0 ? note.tags : undefined,
|
||||||
emojis: populateEmojis(note.emojis, host, Object.keys(note.reactions)),
|
emojis: populateEmojis(note.emojis, host, Object.keys(note.reactions)),
|
||||||
fileIds: note.fileIds,
|
fileIds: note.fileIds,
|
||||||
|
@ -26,6 +26,8 @@ export async function injectFeatured(timeline: Note[], user?: User | null) {
|
|||||||
.andWhere(`note.visibility = 'public'`)
|
.andWhere(`note.visibility = 'public'`)
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
|
if (user) query.andWhere('note.userId != :userId', { userId: user.id });
|
||||||
|
|
||||||
if (user) generateMuteQuery(query, user);
|
if (user) generateMuteQuery(query, user);
|
||||||
|
|
||||||
const notes = await query
|
const notes = await query
|
||||||
|
@ -35,20 +35,17 @@ export const meta = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
// Get favoritee
|
|
||||||
const note = await getNote(ps.noteId).catch(e => {
|
const note = await getNote(ps.noteId).catch(e => {
|
||||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||||
throw e;
|
throw e;
|
||||||
});
|
});
|
||||||
|
|
||||||
// if already favorited
|
|
||||||
const exist = await PromoNotes.findOne(note.id);
|
const exist = await PromoNotes.findOne(note.id);
|
||||||
|
|
||||||
if (exist != null) {
|
if (exist != null) {
|
||||||
throw new ApiError(meta.errors.alreadyPromoted);
|
throw new ApiError(meta.errors.alreadyPromoted);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create favorite
|
|
||||||
await PromoNotes.save({
|
await PromoNotes.save({
|
||||||
noteId: note.id,
|
noteId: note.id,
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
@ -33,6 +33,10 @@ export const meta = {
|
|||||||
validator: $.arr($.arr($.str))
|
validator: $.arr($.arr($.str))
|
||||||
},
|
},
|
||||||
|
|
||||||
|
excludeKeywords: {
|
||||||
|
validator: $.arr($.arr($.str))
|
||||||
|
},
|
||||||
|
|
||||||
users: {
|
users: {
|
||||||
validator: $.arr($.str)
|
validator: $.arr($.str)
|
||||||
},
|
},
|
||||||
@ -102,6 +106,7 @@ export default define(meta, async (ps, user) => {
|
|||||||
userListId: userList ? userList.id : null,
|
userListId: userList ? userList.id : null,
|
||||||
userGroupJoiningId: userGroupJoining ? userGroupJoining.id : null,
|
userGroupJoiningId: userGroupJoining ? userGroupJoining.id : null,
|
||||||
keywords: ps.keywords,
|
keywords: ps.keywords,
|
||||||
|
excludeKeywords: ps.excludeKeywords,
|
||||||
users: ps.users,
|
users: ps.users,
|
||||||
caseSensitive: ps.caseSensitive,
|
caseSensitive: ps.caseSensitive,
|
||||||
withReplies: ps.withReplies,
|
withReplies: ps.withReplies,
|
||||||
|
@ -36,6 +36,10 @@ export const meta = {
|
|||||||
validator: $.arr($.arr($.str))
|
validator: $.arr($.arr($.str))
|
||||||
},
|
},
|
||||||
|
|
||||||
|
excludeKeywords: {
|
||||||
|
validator: $.arr($.arr($.str))
|
||||||
|
},
|
||||||
|
|
||||||
users: {
|
users: {
|
||||||
validator: $.arr($.str)
|
validator: $.arr($.str)
|
||||||
},
|
},
|
||||||
@ -118,6 +122,7 @@ export default define(meta, async (ps, user) => {
|
|||||||
userListId: userList ? userList.id : null,
|
userListId: userList ? userList.id : null,
|
||||||
userGroupJoiningId: userGroupJoining ? userGroupJoining.id : null,
|
userGroupJoiningId: userGroupJoining ? userGroupJoining.id : null,
|
||||||
keywords: ps.keywords,
|
keywords: ps.keywords,
|
||||||
|
excludeKeywords: ps.excludeKeywords,
|
||||||
users: ps.users,
|
users: ps.users,
|
||||||
caseSensitive: ps.caseSensitive,
|
caseSensitive: ps.caseSensitive,
|
||||||
withReplies: ps.withReplies,
|
withReplies: ps.withReplies,
|
||||||
|
@ -3,6 +3,7 @@ import define from '../../define';
|
|||||||
import { fetchMeta } from '../../../../misc/fetch-meta';
|
import { fetchMeta } from '../../../../misc/fetch-meta';
|
||||||
import { Notes } from '../../../../models';
|
import { Notes } from '../../../../models';
|
||||||
import { Note } from '../../../../models/entities/note';
|
import { Note } from '../../../../models/entities/note';
|
||||||
|
import { safeForSql } from '../../../../misc/safe-for-sql';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要
|
トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要
|
||||||
@ -113,7 +114,7 @@ export default define(meta, async () => {
|
|||||||
for (let i = 0; i < range; i++) {
|
for (let i = 0; i < range; i++) {
|
||||||
countPromises.push(Promise.all(hots.map(tag => Notes.createQueryBuilder('note')
|
countPromises.push(Promise.all(hots.map(tag => Notes.createQueryBuilder('note')
|
||||||
.select('count(distinct note.userId)')
|
.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 < :lt', { lt: new Date(now.getTime() - (interval * i)) })
|
||||||
.andWhere('note.createdAt > :gt', { gt: new Date(now.getTime() - (interval * (i + 1))) })
|
.andWhere('note.createdAt > :gt', { gt: new Date(now.getTime() - (interval * (i + 1))) })
|
||||||
.cache(60000) // 1 min
|
.cache(60000) // 1 min
|
||||||
@ -127,7 +128,7 @@ export default define(meta, async () => {
|
|||||||
|
|
||||||
const totalCounts = await Promise.all(hots.map(tag => Notes.createQueryBuilder('note')
|
const totalCounts = await Promise.all(hots.map(tag => Notes.createQueryBuilder('note')
|
||||||
.select('count(distinct note.userId)')
|
.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) })
|
.andWhere('note.createdAt > :gt', { gt: new Date(now.getTime() - rangeA) })
|
||||||
.cache(60000 * 60) // 60 min
|
.cache(60000 * 60) // 60 min
|
||||||
.getRawOne()
|
.getRawOne()
|
||||||
|
@ -6,6 +6,7 @@ import { Notes } from '../../../../models';
|
|||||||
import { generateMuteQuery } from '../../common/generate-mute-query';
|
import { generateMuteQuery } from '../../common/generate-mute-query';
|
||||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||||
import { Brackets } from 'typeorm';
|
import { Brackets } from 'typeorm';
|
||||||
|
import { safeForSql } from '../../../../misc/safe-for-sql';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
desc: {
|
desc: {
|
||||||
@ -75,7 +76,7 @@ export const meta = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
validator: $.optional.num.range(1, 30),
|
validator: $.optional.num.range(1, 100),
|
||||||
default: 10
|
default: 10
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -99,14 +100,16 @@ export default define(meta, async (ps, me) => {
|
|||||||
if (me) generateMuteQuery(query, me);
|
if (me) generateMuteQuery(query, me);
|
||||||
|
|
||||||
if (ps.tag) {
|
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 {
|
} else {
|
||||||
let i = 0;
|
let i = 0;
|
||||||
query.andWhere(new Brackets(qb => {
|
query.andWhere(new Brackets(qb => {
|
||||||
for (const tags of ps.query!) {
|
for (const tags of ps.query!) {
|
||||||
qb.orWhere(new Brackets(qb => {
|
qb.orWhere(new Brackets(qb => {
|
||||||
for (const tag of tags) {
|
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++;
|
i++;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
Reference in New Issue
Block a user