Compare commits

...

46 Commits

Author SHA1 Message Date
ccbcc2a738 Merge branch 'master' of https://github.com/syuilo/misskey 2018-05-25 21:21:45 +09:00
07e1882401 2.17.0 2018-05-25 21:21:37 +09:00
e56589d19e Merge pull request #1645 from syuilo/l10n_master
New Crowdin translations
2018-05-25 21:21:13 +09:00
bfb5367d27 New translations ja.yml (English) 2018-05-25 21:20:32 +09:00
712c0ef27d Refactor: Use better english 2018-05-25 21:05:16 +09:00
94b2ddef45 oops 2018-05-25 20:53:27 +09:00
b84a83adf4 New translations ja.yml (Portuguese) 2018-05-25 20:52:27 +09:00
c8514f58c6 New translations ja.yml (Korean) 2018-05-25 20:52:25 +09:00
841ddb036b New translations ja.yml (Polish) 2018-05-25 20:52:23 +09:00
982a37a413 New translations ja.yml (Chinese Simplified) 2018-05-25 20:52:21 +09:00
741af7cce5 New translations ja.yml (Italian) 2018-05-25 20:52:19 +09:00
9954080672 New translations ja.yml (Russian) 2018-05-25 20:52:17 +09:00
f47f4b4a5c New translations ja.yml (English) 2018-05-25 20:52:14 +09:00
1a3fab9cd9 New translations ja.yml (Spanish) 2018-05-25 20:52:11 +09:00
b683bf6f18 New translations ja.yml (German) 2018-05-25 20:52:09 +09:00
976ae1bf44 New translations ja.yml (French) 2018-05-25 20:52:06 +09:00
ffc63383dc i18n 2018-05-25 20:44:06 +09:00
c6ea6de5c2 Fix bug 2018-05-25 20:41:07 +09:00
fe812530d8 New translations ja.yml (English) 2018-05-25 20:31:35 +09:00
75d07175ae New translations ja.yml (Portuguese) 2018-05-25 20:26:11 +09:00
544580bd8b New translations ja.yml (Korean) 2018-05-25 20:26:09 +09:00
d30d307f80 New translations ja.yml (Polish) 2018-05-25 20:26:06 +09:00
5ccdfe258c New translations ja.yml (Chinese Simplified) 2018-05-25 20:26:04 +09:00
8f8b550608 New translations ja.yml (Italian) 2018-05-25 20:26:02 +09:00
7836d0b059 New translations ja.yml (Russian) 2018-05-25 20:25:59 +09:00
4b9cbe9ca7 New translations ja.yml (English) 2018-05-25 20:25:57 +09:00
034b223f8f New translations ja.yml (Spanish) 2018-05-25 20:25:55 +09:00
f87326620b New translations ja.yml (German) 2018-05-25 20:25:53 +09:00
b4a526ed18 New translations ja.yml (French) 2018-05-25 20:25:51 +09:00
410cc171c6 ✌️ 2018-05-25 20:23:36 +09:00
558b897700 リモートサーバーのファイルをデータベースに保存せず、クライアントで直接表示させられるように 2018-05-25 20:19:14 +09:00
e804757d83 Update gitignore 2018-05-25 18:41:59 +09:00
bd434ed02d Refactor and some fixes 2018-05-25 18:41:49 +09:00
df89f5c8b8 Update welcome.vue 2018-05-25 15:06:35 +09:00
3aebd8311f Merge pull request #1644 from syuilo/l10n_master
New Crowdin translations
2018-05-24 22:55:35 +09:00
f025296331 Enable HTTP/2 2018-05-24 22:21:10 +09:00
1a58a962bb New translations ja.yml (Portuguese) 2018-05-24 17:21:50 +09:00
079d6b0de8 New translations ja.yml (English) 2018-05-24 14:21:58 +09:00
321841101b 2.16.8 2018-05-24 09:48:30 +09:00
8071ca0d66 Merge branch 'master' of https://github.com/syuilo/misskey 2018-05-24 09:48:05 +09:00
c1141c5267 Fix bug 2018-05-24 09:48:02 +09:00
f1fdd4524d Update messaging-room.vue 2018-05-24 09:00:16 +09:00
02dd2c7f1a Update messaging-room.vue 2018-05-24 09:00:02 +09:00
fc3a323a21 Fix bug 2018-05-24 06:34:46 +09:00
d92f501b50 2.16.7 2018-05-24 06:22:20 +09:00
be408ba6ea Fix 2018-05-24 06:22:10 +09:00
36 changed files with 1186 additions and 365 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
/build
/built
/data
/.cache-loader
npm-debug.log
*.pem
run.bat

View File

@ -8,7 +8,8 @@ const { default: User } = require('../built/models/user');
const q = {
'metadata._user.host': {
$ne: null
}
},
'metadata.isMetaOnly': false
};
async function main() {
@ -56,8 +57,7 @@ async function main() {
DriveFile.update({ _id: file._id }, {
$set: {
'metadata.deletedAt': new Date(),
'metadata.isExpired': true
'metadata.isMetaOnly': true
}
})
]).then(async () => {

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "Lade weitere Konversationen"
private: "(Dieser Post ist privat)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "Ort"
renote: "Anmerkung"
add-reaction: "Reaktion hinzufügen"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -304,10 +304,10 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "Load more conversations"
private: "(this post is private)"
is-renote: "Renote"
reposted-by: "Renoted by {}"
location: "Location"
renote: "Renote"
add-reaction: "リアクション"
add-reaction: "Add a reaction"
desktop/views/components/note-detail.sub.vue:
private: "(this post is private)"
desktop/views/components/notes.note.vue:
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "Following of {}"
mobile/views/pages/home.vue:
timeline: "Timeline"
home: "Home"
local: "Local"
global: "Global"
mobile/views/pages/messaging.vue:
messaging: "Messaging"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "Behavior"
fetch-on-scroll: "Fetch on scroll"
disable-via-mobile: "Without the \"mobile posts\" flag"
load-raw-images: "Show attached pictures in high-quality"
load-remote-media: "Show media on a remote server"
twitter: "Twitter integration"
twitter-connect: "Connect to your Twitter account"
twitter-reconnect: "Reconnect"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "Abonnements de {}"
mobile/views/pages/home.vue:
timeline: "Fil d'actualité"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "Messagerie"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -353,7 +353,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -795,7 +795,9 @@ mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
@ -855,6 +857,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "Załaduj więcej konwersacji"
private: "(ten wpis jest prywatny)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "Informacje o lokalizacji"
renote: "Przeredaguj"
add-reaction: "Dodaj reakcję"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "Śledzeni przez {}"
mobile/views/pages/home.vue:
timeline: "Oś czasu"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "Wiadomości"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "Zachowanie"
fetch-on-scroll: "Automatycznie ładuj po przeciągnięciu w dół"
disable-via-mobile: "Nie oznaczaj wpisów jako „wysłane z telefonu”"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Połączenie z Twitterem"
twitter-connect: "Połącz z Twitterem"
twitter-reconnect: "Połącz ponownie"

789
locales/pt.yml Normal file
View File

@ -0,0 +1,789 @@
---
meta:
lang: "Português"
divider: ""
common:
misskey: "Misskeyで皆と共有しよう。"
time:
unknown: "なぞのじかん"
future: "未来"
just_now: "たった今"
seconds_ago: "{}秒前"
minutes_ago: "{}分前"
hours_ago: "{}時間前"
days_ago: "{}日前"
weeks_ago: "{}週間前"
months_ago: "{}ヶ月前"
years_ago: "{}年前"
weekday-short:
sunday: "日"
monday: "月"
tuesday: "火"
wednesday: "水"
thursday: "木"
friday: "金"
saturday: "土"
reactions:
like: "いいね"
love: "しゅき"
laugh: "笑"
hmm: "ふぅ~む"
surprise: "わお"
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
pudding: "Pudding"
delete: "削除"
loading: "読み込み中"
ok: "わかった"
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
common/views/components/connect-failed.vue:
title: "サーバーに接続できません"
description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから{再度お試し}ください。"
thanks: "いつもMisskeyをご利用いただきありがとうございます。"
troubleshoot: "トラブルシュート"
common/views/components/connect-failed.troubleshooter.vue:
title: "トラブルシューティング"
network: "ネットワーク接続"
checking-network: "ネットワーク接続を確認中"
internet: "インターネット接続"
checking-internet: "インターネット接続を確認中"
server: "サーバー接続"
checking-server: "サーバー接続を確認中"
finding: "問題を調べています"
no-network: "ネットワークに接続されていません"
no-network-desc: "お使いのPCのネットワーク接続が正常か確認してください。"
no-internet: "インターネットに接続されていません"
no-internet-desc: "ネットワークには接続されていますが、インターネットには接続されていないようです。お使いのPCのインターネット接続が正常か確認してください。"
no-server: "Misskeyのサーバーに接続できません"
no-server-desc: "お使いのPCのインターネット接続は正常ですが、Misskeyのサーバーには接続できませんでした。サーバーがダウンまたはメンテナンスしている可能性があるので、しばらくしてから再度御アクセスください。"
success: "Misskeyのサーバーに接続できました"
success-desc: "正常に接続できるようです。ページを再度読み込みしてください。"
flush: "キャッシュの削除"
set-version: "バージョン指定"
common/views/components/messaging.vue:
search-user: "ユーザーを探す"
you: "あなた"
no-history: "履歴はありません"
common/views/components/messaging-room.vue:
empty: "このユーザーと話したことはありません"
more: "もっと読む"
no-history: "これより過去の履歴はありません"
resize-form: "ドラッグしてフォームの広さを調整"
new-message: "新しいメッセージがあります"
common/views/components/messaging-room.form.vue:
input-message-here: "ここにメッセージを入力"
send: "送信"
attach-from-local: "PCからファイルを添付する"
attach-from-drive: "ドライブからファイルを添付する"
common/views/components/messaging-room.message.vue:
is-read: "既読"
deleted: "このメッセージは削除されました"
common/views/components/nav.vue:
about: "Misskeyについて"
stats: "統計"
status: "ステータス"
wiki: "Wiki"
donors: "ドナー"
repository: "リポジトリ"
develop: "開発者"
feedback: "フィードバック"
common/views/components/note-menu.vue:
favorite: "お気に入り"
pin: "ピン留め"
remote: "投稿元で見る"
common/views/components/poll.vue:
vote-to: "「{}」に投票する"
vote-count: "{}票"
total-users: "{}人が投票"
vote: "投票する"
show-result: "結果を見る"
voted: "投票済み"
common/views/components/poll-editor.vue:
no-only-one-choice: "投票には、選択肢が最低2つ必要です"
choice-n: "選択肢{}"
remove: "この選択肢を削除"
add: "+選択肢を追加"
destroy: "投票を破棄"
common/views/components/reaction-picker.vue:
choose-reaction: "リアクションを選択"
common/views/components/signin.vue:
username: "ユーザー名"
password: "パスワード"
token: "トークン"
signing-in: "やってます..."
signin: "サインイン"
common/views/components/signup.vue:
username: "ユーザー名"
checking: "確認しています..."
available: "利用できます"
unavailable: "既に利用されています"
error: "通信エラー"
invalid-format: "a~z、A~Z、0~9、_が使えます"
too-short: "1文字以上でお願いします"
too-long: "20文字以内でお願いします"
password: "パスワード"
password-placeholder: "8文字以上を推奨します"
weak-password: "弱いパスワード"
normal-password: "まあまあのパスワード"
strong-password: "強いパスワード"
retype: "再入力"
retype-placeholder: "確認のため再入力してください"
password-matched: "確認されました"
password-not-matched: "一致していません"
recaptcha: "認証"
create: "アカウント作成"
some-error: "何らかの原因によりアカウントの作成に失敗しました。再度お試しください。"
common/views/components/special-message.vue:
new-year: "Happy New Year!"
christmas: "Merry Christmas!"
common/views/components/stream-indicator.vue:
connecting: "接続中"
reconnecting: "再接続中"
connected: "接続完了"
common/views/components/twitter-setting.vue:
description: "お使いのTwitterアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでTwitterアカウント情報が表示されるようになったり、Twitterを用いた便利なサインインを利用できるようになります。"
connected-to: "次のTwitterアカウントに接続されています"
detail: "詳細..."
reconnect: "再接続する"
connect: "Twitterと接続する"
disconnect: "切断する"
common/views/components/uploader.vue:
waiting: "待機中"
common/views/widgets/broadcast.vue:
fetching: "確認中"
no-broadcasts: "お知らせはありません"
have-a-nice-day: "良い一日を!"
next: "次"
common/views/widgets/donation.vue:
title: "寄付のお願い"
text: "Misskeyの運営にはドメイン、サーバー等のコストが掛かります。Misskeyは広告を掲載したりしないため、収入を皆様からの寄付に頼っています。もしご興味があれば、{}までご連絡ください。ご協力ありがとうございます。"
common/views/widgets/photo-stream.vue:
title: "フォトストリーム"
no-photos: "写真はありません"
common/views/widgets/server.vue:
title: "サーバー情報"
toggle: "表示を切り替え"
common/views/widgets/visibility-chooser.vue:
public: "公開"
home: "ホーム"
home-desc: "ホームタイムラインにのみ公開"
followers: "フォロワー"
followers-desc: "自分のフォロワーにのみ公開"
specified: "ダイレクト"
specified-desc: "指定したユーザーにのみ公開"
private: "非公開"
desktop/views/components/activity.chart.vue:
total: "Black ... Total"
notes: "Blue ... Notes"
replies: "Red ... Replies"
renotes: "Green ... Renotes"
desktop/views/components/activity.vue:
title: "アクティビティ"
toggle: "表示を切り替え"
desktop/views/components/calendar.vue:
title: "{1}年 {2}月"
prev: "前の月"
next: "次の月"
go: "クリックして時間遡行"
desktop/views/components/choose-file-from-drive-window.vue:
choose-file: "ファイル選択中"
upload: "PCからドライブにファイルをアップロード"
cancel: "キャンセル"
ok: "決定"
choose-prompt: "ファイルを選択"
desktop/views/components/choose-folder-from-drive-window.vue:
cancel: "キャンセル"
ok: "決定"
choose-prompt: "フォルダを選択"
desktop/views/components/crop-window.vue:
skip: "クロップをスキップ"
cancel: "キャンセル"
ok: "決定"
desktop/views/components/drive-window.vue:
used: "使用中"
drive: "ドライブ"
desktop/views/components/drive.file.vue:
avatar: "アイコン"
banner: "バナー"
contextmenu:
rename: "名前を変更"
copy-url: "URLをコピー"
download: "ダウンロード"
else-files: "その他..."
set-as-avatar: "アイコンに設定"
set-as-banner: "バナーに設定"
open-in-app: "アプリで開く"
add-app: "アプリを追加"
rename-file: "ファイル名の変更"
input-new-file-name: "新しいファイル名を入力してください"
copied: "コピー完了"
copied-url-to-clipboard: "URLをクリップボードにコピーしました"
desktop/views/components/drive.folder.vue:
unable-to-process: "操作を完了できません"
circular-reference-detected: "移動先のフォルダーは、移動するフォルダーのサブフォルダーです。"
unhandled-error: "不明なエラー"
contextmenu:
move-to-this-folder: "このフォルダへ移動"
show-in-new-window: "新しいウィンドウで表示"
rename: "名前を変更"
rename-folder: "フォルダ名の変更"
input-new-folder-name: "新しいフォルダ名を入力してください"
desktop/views/components/drive.nav-folder.vue:
drive: "ドライブ"
desktop/views/components/drive.vue:
search: "検索"
load-more: "もっと読み込む"
empty-draghover: "ドロップですか?いいですよ、ボクはカワイイですからね"
empty-drive: "ドライブには何もありません。"
empty-drive-description: "右クリックして「ファイルをアップロード」を選んだり、ファイルをドラッグ&ドロップすることでもアップロードできます。"
empty-folder: "このフォルダーは空です"
unable-to-process: "操作を完了できません"
circular-reference-detected: "移動先のフォルダーは、移動するフォルダーのサブフォルダーです。"
unhandled-error: "不明なエラー"
url-upload: "URLアップロード"
url-of-file: "アップロードしたいファイルのURL"
url-upload-requested: "アップロードをリクエストしました"
may-take-time: "アップロードが完了するまで時間がかかる場合があります。"
create-folder: "フォルダー作成"
folder-name: "フォルダー名"
contextmenu:
create-folder: "フォルダーを作成"
upload: "ファイルをアップロード"
url-upload: "URLからアップロード"
desktop/views/components/follow-button.vue:
unfollow: "フォロー解除"
follow: "フォローする"
desktop/views/components/followers-window.vue:
followers: "{} のフォロワー"
desktop/views/components/followers.vue:
empty: "フォロワーはいないようです。"
desktop/views/components/following-window.vue:
following: "{} のフォロー"
desktop/views/components/following.vue:
empty: "フォロー中のユーザーはいないようです。"
desktop/views/components/friends-maker.vue:
title: "気になるユーザーをフォロー:"
empty: "おすすめのユーザーは見つかりませんでした。"
fetching: "読み込んでいます"
refresh: "もっと見る"
close: "閉じる"
desktop/views/components/game-window.vue:
game: "オセロ"
desktop/views/components/home.vue:
done: "完了"
add-widget: "ウィジェットを追加:"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
activity: "アクティビティ"
rss: "RSSリーダー"
trends: "トレンド"
photostream: "フォトストリーム"
slideshow: "スライドショー"
version: "バージョン"
broadcast: "ブロードキャスト"
notifications: "通知"
users: "おすすめユーザー"
polls: "投票"
post-form: "投稿フォーム"
messaging: "メッセージ"
server: "サーバー情報"
donation: "寄付のお願い"
nav: "ナビゲーション"
tips: "ヒント"
add: "追加"
desktop/views/input-dialog.vue:
cancel: "キャンセル"
ok: "決定"
desktop/views/components/messaging-room-window.vue:
title: "メッセージ:"
desktop/views/components/messaging-window.vue:
title: "メッセージ"
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
desktop/views/components/note-detail.sub.vue:
private: "(この投稿は非公開です)"
desktop/views/components/notes.note.vue:
reposted-by: "{}がRenote"
reply: "返信"
renote: "Renote"
add-reaction: "リアクション"
detail: "詳細"
desktop/views/components/notes.vue:
error: "読み込みに失敗しました。"
retry: "リトライ"
desktop/views/components/notifications.vue:
more: "もっと見る"
empty: "ありません!"
desktop/views/components/post-form.vue:
note-placeholder: "いまどうしてる?"
reply-placeholder: "この投稿への返信..."
quote-placeholder: "この投稿を引用..."
note: "投稿"
reply: "返信"
renote: "Renote"
posted: "投稿しました!"
replied: "返信しました!"
reposted: "Renoteしました"
note-failed: "投稿に失敗しました"
reply-failed: "返信に失敗しました"
renote-failed: "Renoteに失敗しました"
posting: "投稿中"
attach-media-from-local: "PCからメディアを添付"
attach-media-from-drive: "ドライブからメディアを添付"
attach-cancel: "添付取り消し"
insert-a-kao: "v(‘ω’)v"
create-poll: "投票を作成"
text-remain: "残り{}文字"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"
attaches: "添付: {}メディア"
uploading-media: "{}個のメディアをアップロード中"
desktop/views/components/progress-dialog.vue:
waiting: "待機中"
desktop/views/components/renote-form.vue:
quote: "引用する..."
cancel: "キャンセル"
renote: "Renote"
reposting: "しています..."
success: "Renoteしました"
failure: "Renoteに失敗しました"
desktop/views/components/renote-form-window.vue:
title: "この投稿をRenoteしますか"
desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
drive: "ドライブ"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
2fa: "二段階認証"
other: "その他"
license: "ライセンス"
behaviour: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
fetch-on-scroll-desc: "ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。"
auto-popout: "ウィンドウの自動ポップアウト"
auto-popout-desc: "ウィンドウが開かれるとき、ポップアウト(ブラウザ外に切り離す)可能なら自動でポップアウトします。この設定はブラウザに記憶されます。"
advanced: "詳細設定"
api-via-stream: "ストリームを経由したAPIリクエスト"
api-via-stream-desc: "この設定をオンにすると、websocket接続を経由してAPIリクエストが行われます(パフォーマンス向上が期待できます)。オフにすると、ネイティブの fetch APIが利用されます。この設定はこのデバイスのみ有効です。"
display: "デザインと表示"
customize: "ホームをカスタマイズ"
dark-mode: "ダークモード"
circle-icons: "円形のアイコンを使用"
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
show-reply-target: "リプライ先を表示する"
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
show-renoted-my-notes: "Renoteされた自分の投稿をタイムラインに表示する"
show-maps: "マップの自動展開"
show-maps-desc: "位置情報が添付された投稿のマップを自動的に展開します。"
sound: "サウンド"
enable-sounds: "サウンドを有効にする"
enable-sounds-desc: "投稿やメッセージを送受信したときなどにサウンドを再生します。この設定はブラウザに記憶されます。"
volume: "ボリューム"
test: "テスト"
mobile: "モバイル"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
language: "言語"
pick-language: "言語を選択"
recommended: "推奨"
auto: "自動"
specify-language: "言語を指定"
language-desc: "変更はページの再度読み込み後に反映されます。"
cache: "キャッシュ"
clean-cache: "クリーンアップ"
cache-warn: "クリーンアップを行うと、ブラウザに記憶されたアカウント情報のキャッシュ、書きかけの投稿・返信・メッセージ、およびその他のデータ(設定情報含む)が削除されます。クリーンアップを行った後はページを再度読み込みする必要があります。"
cache-cleared: "キャッシュを削除しました"
cache-cleared-desc: "ページを再度読み込みしてください。"
auto-watch: "投稿の自動ウォッチ"
auto-watch-desc: "リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。"
about: "Misskeyについて"
operator: "このサーバーの運営者"
update: "Misskey Update"
version: "バージョン:"
latest-version: "最新のバージョン:"
update-checking: "アップデートを確認中"
do-update: "アップデートを確認"
update-settings: "詳細設定"
prevent-update: "アップデートを延期する(非推奨)"
prevent-update-desc: "この設定をオンにしてもアップデートが反映される場合があります。この設定はこのデバイスのみ有効です。"
no-updates: "利用可能な更新はありません"
no-updates-desc: "お使いのMisskeyは最新です。"
update-available: "新しいバージョンが利用可能です"
update-available-desc: "ページを再度読み込みすると更新が適用されます。"
advanced-settings: "高度な設定"
debug-mode: "デバッグモードを有効にする"
debug-mode-desc: "この設定はブラウザに記憶されます。"
experimental: "実験的機能を有効にする"
experimental-desc: "実験的機能を有効にするとMisskeyの動作が不安定になる可能性があります。この設定はブラウザに記憶されます。"
tools: "ツール"
task-manager: "タスクマネージャ"
third-parties: "サードパーティ"
desktop/views/components/settings.2fa.vue:
intro: "二段階認証を設定すると、サインイン時にパスワードだけでなく、予め登録しておいた物理的なデバイス(例えばあなたのスマートフォンなど)も必要になり、よりセキュリティが向上します。"
detail: "詳細..."
url: "https://www.google.co.jp/intl/ja/landing/2step/"
caution: "登録したデバイスを紛失するなどした場合、Misskeyにサインインできなくなりますのでご注意ください。"
register: "デバイスを登録する"
already-registered: "既に設定は完了しています。"
unregister: "設定を解除"
unregistered: "二段階認証が無効になりました。"
enter-password: "パスワードを入力してください"
authenticator: "まず、Google Authenticatorをお使いのデバイスにインストールします:"
howtoinstall: "インストール方法はこちら"
scan: "次に、表示されているQRコードをスキャンします:"
done: "お使いのデバイスに表示されているトークンを入力して完了します:"
submit: "完了"
success: "設定が完了しました!"
failed: "設定に失敗しました。トークンに誤りがないかご確認ください。"
info: "次回サインインからは、同様にパスワードに加えてデバイスに表示されているトークンを入力します。"
desktop/views/components/settings.api.vue:
intro: "APIを利用するには、上記のトークンを「i」というキーでパラメータに付加してリクエストします。"
caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。"
regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合はトークンを再生成できます。"
regenerate-token: "トークンを再生成"
token: "Token:"
enter-password: "パスワードを入力してください"
desktop/views/components/settings.app.vue:
no-apps: "連携しているアプリケーションはありません"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"
enter-new-password: "新しいパスワードを入力してください"
enter-new-password-again: "もう一度新しいパスワードを入力してください"
not-match: "新しいパスワードが一致しません"
changed: "パスワードを変更しました"
desktop/views/components/settings.profile.vue:
avatar: "アイコン"
choice-avatar: "画像を選択"
name: "名前"
location: "場所"
description: "自己紹介"
birthday: "誕生日"
save: "保存"
is-bot: "このアカウントはBotです"
is-cat: "このアカウントはCatです"
desktop/views/components/sub-note-content.vue:
hidden: "(この投稿は非公開です)"
media: "つのメディア"
poll: "投票"
desktop/views/components/taskmanager.vue:
title: "タスクマネージャ"
desktop/views/components/timeline.vue:
home: "ホーム"
local: "ローカル"
global: "グローバル"
list: "リスト"
desktop/views/components/ui.header.account.vue:
profile: "プロフィール"
drive: "ドライブ"
favorites: "お気に入り"
lists: "リスト"
customize: "カスタマイズ"
settings: "設定"
signout: "サインアウト"
dark: "闇に飲まれる"
desktop/views/components/ui.header.nav.vue:
home: "ホーム"
messaging: "メッセージ"
game: "ゲーム"
desktop/views/components/ui.header.notifications.vue:
title: "通知"
desktop/views/components/ui.header.post.vue:
post: "新規投稿"
desktop/views/components/ui.header.search.vue:
placeholder: "検索"
desktop/views/components/user-lists-window.vue:
create-list: "リストを作成"
desktop/views/components/user-preview.vue:
notes: "投稿"
following: "フォロー"
followers: "フォロワー"
desktop/views/components/users-list.vue:
all: "すべて"
iknow: "知り合い"
load-more: "もっと"
fetching: "読み込んでいます"
desktop/views/components/users-list-item.vue:
followed: "フォローされています"
desktop/views/components/window.vue:
popout: "ポップアウト"
close: "閉じる"
desktop/views/pages/welcome.vue:
signin: "ログイン"
signup: "新規登録"
signin-button: "やってる"
signup-button: "やる"
timeline: "タイムライン"
desktop/views/pages/drive.vue:
title: "Misskey Drive"
desktop/views/pages/favorites.vue:
more: "さらに読み込む"
desktop/views/pages/home-customize.vue:
title: "ホームのカスタマイズ"
desktop/views/pages/note.vue:
prev: "前の投稿"
next: "次の投稿"
desktop/views/pages/selectdrive.vue:
title: "ファイルを選択してください"
ok: "決定"
cancel: "キャンセル"
upload: "PCからドライブにファイルをアップロード"
desktop/views/pages/user-list.users.vue:
users: "ユーザー"
add-user: "ユーザーを追加"
username: "ユーザー名"
desktop/views/pages/user/user.followers-you-know.vue:
title: "知り合いのフォロワー"
loading: "読み込み中"
no-users: "知り合いのフォロワーはいません"
desktop/views/pages/user/user.friends.vue:
title: "よく話すユーザー"
loading: "読み込み中"
no-users: "よく話すユーザーはいません"
desktop/views/pages/user/user.header.vue:
is-suspended: "このユーザーは凍結されています。"
is-remote: "このユーザーはリモートユーザーです。"
view-remote: "正確な情報を見る"
desktop/views/pages/user/user.home.vue:
last-used-at: "最終アクセス"
desktop/views/pages/user/user.photos.vue:
title: "フォト"
loading: "読み込み中"
no-photos: "写真はありません"
desktop/views/pages/user/user.profile.vue:
follows-you: "フォローされています"
stalk: "ストークする"
stalking: "ストーキングしています"
unstalk: "ストーク解除"
mute: "ミュートする"
muted: "ミュートしています"
unmute: "ミュート解除"
desktop/views/pages/user/user.timeline.vue:
default: "投稿"
with-replies: "投稿と返信"
with-media: "メディア"
empty: "このユーザーはまだ何も投稿していないようです。"
desktop/views/widgets/messaging.vue:
title: "メッセージ"
desktop/views/widgets/notifications.vue:
title: "通知"
settings: "通知の設定"
desktop/views/widgets/polls.vue:
title: "投票"
refresh: "他を見る"
nothing: "ありません!"
desktop/views/widgets/post-form.vue:
title: "投稿"
note: "投稿"
placeholder: "いまどうしてる?"
desktop/views/widgets/profile.vue:
update-banner: "クリックでバナー編集"
update-avatar: "クリックでアバター編集"
desktop/views/widgets/trends.vue:
title: "トレンド"
refresh: "他を見る"
nothing: "ありません!"
desktop/views/widgets/users.vue:
title: "おすすめユーザー"
refresh: "他を見る"
no-one: "いません!"
mobile/views/components/drive.vue:
drive: "ドライブ"
used: "使用中"
folder-count: "フォルダ"
count-separator: "、"
file-count: "ファイル"
load-more: "もっと読み込む"
nothing-in-drive: "ドライブには何もありません"
folder-is-empty: "このフォルダは空です"
mobile/views/components/drive-file-chooser.vue:
select-file: "ファイルを選択"
mobile/views/components/drive-folder-chooser.vue:
select-folder: "フォルダーを選択"
mobile/views/components/drive.file-detail.vue:
download: "ダウンロード"
rename: "名前を変更"
move: "移動"
hash: "ハッシュ (md5)"
exif: "EXIF"
mobile/views/components/follow-button.vue:
follow: "フォロー"
unfollow: "フォロー解除"
mobile/views/components/note.vue:
reposted-by: "{}がRenote"
mobile/views/components/note-detail.vue:
reply: "返信"
reaction: "リアクション"
mobile/views/components/notifications.vue:
more: "もっと見る"
empty: "ありません!"
mobile/views/components/post-form.vue:
submit: "投稿"
reply: "返信"
renote: "Renote"
renote-placeholder: "この投稿を引用... (オプション)"
reply-placeholder: "この投稿への返信..."
note-placeholder: "いまどうしてる?"
mobile/views/components/sub-note-content.vue:
media-count: "{}個のメディア"
poll: "投票"
mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
settings: "設定"
about: "Misskeyについて"
mobile/views/components/user-timeline.vue:
no-notes: "このユーザーは投稿していないようです。"
no-notes-with-media: "メディア付き投稿はありません。"
load-more: "もっと"
mobile/views/components/users-list.vue:
all: "すべて"
known: "知り合い"
load-more: "もっと"
mobile/views/pages/drive.vue:
drive: "ドライブ"
mobile/views/pages/followers.vue:
followers-of: "{}のフォロワー"
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
messaging: "メッセージ"
mobile/views/pages/note.vue:
title: "投稿"
prev: "前の投稿"
next: "次の投稿"
mobile/views/pages/notifications.vue:
notifications: "通知"
read-all: "すべての通知を既読にしますか?"
mobile/views/pages/settings/settings.profile.vue:
title: "プロフィール"
name: "名前"
account: "アカウント"
location: "場所"
description: "自己紹介"
birthday: "誕生日"
avatar: "アイコン"
banner: "バナー"
is-cat: "このアカウントはCatです"
save: "保存"
saved: "プロフィールを保存しました"
uploading: "アップロード中"
upload-failed: "アップロードに失敗しました"
mobile/views/pages/search.vue:
search: "検索"
empty: "「{}」に関する投稿は見つかりませんでした。"
mobile/views/pages/selectdrive.vue:
select-file: "ファイルを選択"
mobile/views/pages/settings.vue:
signed-in-as: "{}としてサインイン中"
lang: "言語"
lang-tip: "変更はページの再読み込み後に反映されます。"
recommended: "推奨"
auto: "自動"
specify-language: "言語を指定"
design: "デザインと表示"
dark-mode: "ダークモード"
i-am-under-limited-internet: "私は通信を制限されている"
circle-icons: "円形のアイコンを使用"
timeline: "タイムライン"
show-reply-target: "リプライ先を表示する"
show-my-renotes: "自分の行ったRenoteを表示する"
show-renoted-my-notes: "Renoteされた自分の投稿を表示する"
post-style: "投稿の表示スタイル"
post-style-standard: "標準"
post-style-smart: "スマート"
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"
twitter-disconnect: "切断する"
update: "Misskey Update"
version: "バージョン:"
latest-version: "最新のバージョン:"
update-checking: "アップデートを確認中"
check-for-updates: "アップデートを確認"
no-updates: "利用可能な更新はありません"
no-updates-desc: "お使いのMisskeyは最新です。"
update-available: "新しいバージョンが利用可能です"
update-available-desc: "ページを再度読み込みすると更新が適用されます。"
settings: "設定"
signout: "サインアウト"
mobile/views/pages/user.vue:
follows-you: "フォローされています"
following: "フォロー"
followers: "フォロワー"
notes: "投稿"
overview: "概要"
timeline: "タイムライン"
media: "メディア"
is-suspended: "このユーザーは凍結されています。"
is-remote: "このユーザーはリモートユーザーです。"
view-remote: "正確な情報を見る"
mobile/views/pages/user/home.vue:
recent-notes: "最近の投稿"
images: "画像"
activity: "アクティビティ"
keywords: "キーワード"
domains: "頻出ドメイン"
frequently-replied-users: "よく会話するユーザー"
followers-you-know: "知り合いのフォロワー"
last-used-at: "最終ログイン"
mobile/views/pages/user/home.followers-you-know.vue:
loading: "読み込み中"
no-users: "知り合いのユーザーはいません"
mobile/views/pages/user/home.friends.vue:
loading: "読み込み中"
no-users: "よく会話するユーザーはいません"
mobile/views/pages/user/home.notes.vue:
loading: "読み込み中"
no-notes: "投稿はありません"
mobile/views/pages/user/home.photos.vue:
loading: "読み込み中"
no-photos: "写真はありません"
docs:
edit-this-page-on-github: "間違いや改善点を見つけましたか?"
edit-this-page-on-github-link: "このページをGitHubで編集"
api:
entities:
properties: "プロパティ"
endpoints:
params: "パラメータ"
res: "レスポンス"
props:
name: "名前"
type: "型"
optional: "オプション"
description: "説明"
yes: "はい"
no: "いいえ"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -304,7 +304,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/note-detail.vue:
more: "会話をもっと読み込む"
private: "(この投稿は非公開です)"
is-renote: "がRenote"
reposted-by: "{}がRenote"
location: "位置情報"
renote: "Renote"
add-reaction: "リアクション"
@ -668,7 +668,9 @@ mobile/views/pages/followers.vue:
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
home: "ホーム"
local: "ローカル"
global: "グローバル"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
@ -720,6 +722,8 @@ mobile/views/pages/settings.vue:
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
disable-via-mobile: "「モバイルからの投稿」フラグを付けない"
load-raw-images: "添付された画像を高画質で表示する"
load-remote-media: "リモートサーバーのメディアを表示する"
twitter: "Twitter連携"
twitter-connect: "Twitterアカウントに接続する"
twitter-reconnect: "再接続する"

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "2.16.6",
"clientVersion": "1.0.5686",
"version": "2.17.0",
"clientVersion": "1.0.5731",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@ -337,7 +337,7 @@ root(isDark)
padding 0 16px
//font-weight bold
line-height 32px
color rgba(#000, 0.3)
color rgba(isDark ? #fff : #000, 0.3)
background isDark ? #191b22 : #fff
> footer

View File

@ -2,16 +2,16 @@
<div class="mk-note-detail" :title="title">
<button
class="read-more"
v-if="p.reply && p.reply.replyId && context.length == 0"
v-if="p.reply && p.reply.replyId && conversation.length == 0"
title="%i18n:@more%"
@click="fetchContext"
:disabled="contextFetching"
@click="fetchConversation"
:disabled="conversationFetching"
>
<template v-if="!contextFetching">%fa:ellipsis-v%</template>
<template v-if="contextFetching">%fa:spinner .pulse%</template>
<template v-if="!conversationFetching">%fa:ellipsis-v%</template>
<template v-if="conversationFetching">%fa:spinner .pulse%</template>
</button>
<div class="context">
<x-sub v-for="note in context" :key="note.id" :note="note"/>
<div class="conversation">
<x-sub v-for="note in conversation" :key="note.id" :note="note"/>
</div>
<div class="reply-to" v-if="p.reply">
<x-sub :note="p.reply"/>
@ -21,7 +21,10 @@
<mk-avatar class="avatar" :user="note.user"/>
%fa:retweet%
<router-link class="name" :href="note.user | userPage">{{ note.user | userName }}</router-link>
%i18n:@is-renote%
<span>{{ '%i18n:@reposted-by%'.substr(0, '%i18n:@reposted-by%'.indexOf('{')) }}</span>
<a class="name" :href="note.user | userPage" v-user-preview="note.userId">{{ note.user | userName }}</a>
<span>{{ '%i18n:@reposted-by%'.substr('%i18n:@reposted-by%'.indexOf('}') + 1) }}</span>
<mk-time :time="note.createdAt"/>
</p>
</div>
<article>
@ -104,8 +107,8 @@ export default Vue.extend({
data() {
return {
context: [],
contextFetching: false,
conversation: [],
conversationFetching: false,
replies: []
};
},
@ -173,15 +176,15 @@ export default Vue.extend({
},
methods: {
fetchContext() {
this.contextFetching = true;
fetchConversation() {
this.conversationFetching = true;
// Fetch context
(this as any).api('notes/context', {
// Fetch conversation
(this as any).api('notes/conversation', {
noteId: this.p.replyId
}).then(context => {
this.contextFetching = false;
this.context = context.reverse();
}).then(conversation => {
this.conversationFetching = false;
this.conversation = conversation.reverse();
});
},
reply() {
@ -246,7 +249,7 @@ root(isDark)
&:disabled
color isDark ? #21242b : #ccc
> .context
> .conversation
> *
border-bottom 1px solid isDark ? #1c2023 : #eef0f2

View File

@ -95,7 +95,7 @@ export default Vue.extend({
},
created() {
if (this.$store.state.device.autoPopout && this.popoutUrl) {
if ((this as any).os.store.state.device.autoPopout && this.popoutUrl) {
this.popout();
this.preventMount = true;
} else {

View File

@ -34,6 +34,7 @@ export default Vue.extend({
},
beforeDestroy() {
document.documentElement.style.removeProperty('background');
document.documentElement.style.removeProperty('background-color'); // for safari's bug
this.unwatchDarkmode();
},
methods: {

View File

@ -50,6 +50,10 @@ export default Vue.extend({
this.$modal.show('signin');
},
dark() {
this.$store.commit('device/set', {
key: 'darkmode',
value: !this.$store.state.device.darkmode
});
}
}
});

View File

@ -102,9 +102,11 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
//#region Dark/Light
Vue.mixin({
data() {
_unwatchDarkmode_: null
return {
_unwatchDarkmode_: null
};
},
created() {
mounted() {
const apply = v => {
if (this.$el.setAttribute == null) return;
if (v) {
@ -114,7 +116,7 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
}
};
this.$nextTick(() => apply(os.store.state.device.darkmode));
apply(os.store.state.device.darkmode);
this._unwatchDarkmode_ = os.store.watch(s => {
return s.device.darkmode;

View File

@ -16,13 +16,18 @@ export default Vue.extend({
}
},
computed: {
lightmode(): boolean {
return this.$store.state.device.lightmode;
},
style(): any {
let url = `url(${this.image.url}?thumbnail)`;
if (this.$store.state.device.loadRemoteMedia || this.$store.state.device.lightmode) {
url = null;
} else if (this.raw || this.$store.state.device.loadRawImages) {
url = `url(${this.image.url})`;
}
return {
'background-color': this.image.properties.avgColor && this.image.properties.avgColor.length == 3 ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
'background-image': this.lightmode ? null : this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
'background-image': url
};
}
}

View File

@ -2,15 +2,15 @@
<div class="mk-note-detail">
<button
class="more"
v-if="p.reply && p.reply.replyId && context.length == 0"
@click="fetchContext"
:disabled="fetchingContext"
v-if="p.reply && p.reply.replyId && conversation.length == 0"
@click="fetchConversation"
:disabled="conversationFetching"
>
<template v-if="!contextFetching">%fa:ellipsis-v%</template>
<template v-if="contextFetching">%fa:spinner .pulse%</template>
<template v-if="!conversationFetching">%fa:ellipsis-v%</template>
<template v-if="conversationFetching">%fa:spinner .pulse%</template>
</button>
<div class="context">
<x-sub v-for="note in context" :key="note.id" :note="note"/>
<div class="conversation">
<x-sub v-for="note in conversation" :key="note.id" :note="note"/>
</div>
<div class="reply-to" v-if="p.reply">
<x-sub :note="p.reply"/>
@ -99,8 +99,8 @@ export default Vue.extend({
data() {
return {
context: [],
contextFetching: false,
conversation: [],
conversationFetching: false,
replies: []
};
},
@ -166,14 +166,14 @@ export default Vue.extend({
methods: {
fetchContext() {
this.contextFetching = true;
this.conversationFetching = true;
// Fetch context
(this as any).api('notes/context', {
// Fetch conversation
(this as any).api('notes/conversation', {
noteId: this.p.replyId
}).then(context => {
this.contextFetching = false;
this.context = context.reverse();
}).then(conversation => {
this.conversationFetching = false;
this.conversation = conversation.reverse();
});
},
reply() {
@ -245,7 +245,7 @@ root(isDark)
&:disabled
color #ccc
> .context
> .conversation
> *
border-bottom 1px solid isDark ? #1c2023 : #eef0f2

View File

@ -2,9 +2,9 @@
<mk-ui>
<span slot="header" @click="showNav = true">
<span>
<span v-if="src == 'home'">%fa:home%ホーム</span>
<span v-if="src == 'local'">%fa:R comments%ローカル</span>
<span v-if="src == 'global'">%fa:globe%グローバル</span>
<span v-if="src == 'home'">%fa:home%%i18n:@home%</span>
<span v-if="src == 'local'">%fa:R comments%%i18n:@local%</span>
<span v-if="src == 'global'">%fa:globe%%i18n:@global%</span>
<span v-if="src.startsWith('list')">%fa:list%{{ list.title }}</span>
</span>
<span style="margin-left:8px">
@ -22,9 +22,9 @@
<div class="bg" @click="showNav = false"></div>
<div class="body">
<div>
<span :data-active="src == 'home'" @click="src = 'home'">%fa:home% ホーム</span>
<span :data-active="src == 'local'" @click="src = 'local'">%fa:R comments% ローカル</span>
<span :data-active="src == 'global'" @click="src = 'global'">%fa:globe% グローバル</span>
<span :data-active="src == 'home'" @click="src = 'home'">%fa:home% %i18n:@home%</span>
<span :data-active="src == 'local'" @click="src = 'local'">%fa:R comments% %i18n:@local%</span>
<span :data-active="src == 'global'" @click="src = 'global'">%fa:globe% %i18n:@global%</span>
<template v-if="lists">
<span v-for="l in lists" :data-active="src == 'list:' + l.id" @click="src = 'list:' + l.id; list = l" :key="l.id">%fa:list% {{ l.title }}</span>
</template>

View File

@ -37,6 +37,7 @@ export default Vue.extend({
},
beforeDestroy() {
document.documentElement.style.removeProperty('background');
document.documentElement.style.removeProperty('background-color'); // for safari's bug
this.unwatchDarkmode();
},
methods: {

View File

@ -59,6 +59,14 @@
<md-switch v-model="clientSettings.disableViaMobile" @change="onChangeDisableViaMobile">%i18n:@disable-via-mobile%</md-switch>
</div>
<div>
<md-switch v-model="loadRawImages">%i18n:@load-raw-images%</md-switch>
</div>
<div>
<md-switch v-model="clientSettings.loadRemoteMedia" @change="onChangeLoadRemoteMedia">%i18n:@load-remote-media%</md-switch>
</div>
<div>
<md-switch v-model="lightmode">%i18n:@i-am-under-limited-internet%</md-switch>
</div>
@ -166,6 +174,11 @@ export default Vue.extend({
set(value) { this.$store.commit('device/set', { key: 'lightmode', value }); }
},
loadRawImages: {
get() { return this.$store.state.device.loadRawImages; },
set(value) { this.$store.commit('device/set', { key: 'loadRawImages', value }); }
},
lang: {
get() { return this.$store.state.device.lang; },
set(value) { this.$store.commit('device/set', { key: 'lang', value }); }
@ -195,6 +208,13 @@ export default Vue.extend({
});
},
onChangeLoadRemoteMedia(v) {
this.$store.dispatch('settings/set', {
key: 'loadRemoteMedia',
value: v
});
},
onChangeCircleIcons(v) {
this.$store.dispatch('settings/set', {
key: 'circleIcons',

View File

@ -13,7 +13,9 @@ const defaultSettings = {
gradientWindowHeader: false,
showReplyTarget: true,
showMyRenotes: true,
showRenotedMyNotes: true
showRenotedMyNotes: true,
loadRemoteMedia: true,
disableViaMobile: false
};
const defaultDeviceSettings = {
@ -26,6 +28,7 @@ const defaultDeviceSettings = {
preventUpdate: false,
debug: false,
lightmode: false,
loadRawImages: false,
postStyle: 'standard'
};

View File

@ -41,6 +41,8 @@ export type Source = {
secret_key: string;
};
preventCacheRemoteFiles: boolean;
/**
* ゴーストアカウントのID
*/

View File

@ -32,7 +32,7 @@ export type IMetadata = {
uri?: string;
url?: string;
deletedAt?: Date;
isExpired?: boolean;
isMetaOnly?: boolean;
};
export type IDriveFile = {
@ -155,7 +155,8 @@ export const pack = (
_target = Object.assign(_target, _file.metadata);
_target.src = _file.metadata.url;
_target.url = `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
_target.url = _file.metadata.isMetaOnly ? _file.metadata.url : `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
_target.isRemote = _file.metadata.isMetaOnly;
if (_target.properties == null) _target.properties = {};

View File

@ -482,7 +482,7 @@ const endpoints: Endpoint[] = [
name: 'notes/replies'
},
{
name: 'notes/context'
name: 'notes/conversation'
},
{
name: 'notes/create',

View File

@ -1,6 +1,7 @@
/**
* Module dependencies
*/
import * as fs from 'fs';
import $ from 'cafy'; import ID from '../../../../../cafy-id';
import { validateFileName, pack } from '../../../../../models/drive-file';
import create from '../../../../../services/drive/add-file';
@ -32,15 +33,23 @@ module.exports = async (file, params, user): Promise<any> => {
const [folderId = null, folderIdErr] = $.type(ID).optional().nullable().get(params.folderId);
if (folderIdErr) throw 'invalid folderId param';
function cleanup() {
fs.unlink(file.path, () => {});
}
try {
// Create file
const driveFile = await create(user, file.path, name, null, folderId);
cleanup();
// Serialize
return pack(driveFile);
} catch (e) {
console.error(e);
cleanup();
throw e;
}
};

View File

@ -5,11 +5,7 @@ import $ from 'cafy'; import ID from '../../../../cafy-id';
import Note, { pack } from '../../../../models/note';
/**
* Show a context of a note
*
* @param {any} params
* @param {any} user
* @return {Promise<any>}
* Show conversation of a note
*/
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'noteId' parameter
@ -33,7 +29,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
return rej('note not found');
}
const context = [];
const conversation = [];
let i = 0;
async function get(id) {
@ -41,10 +37,10 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
const p = await Note.findOne({ _id: id });
if (i > offset) {
context.push(p);
conversation.push(p);
}
if (context.length == limit) {
if (conversation.length == limit) {
return;
}
@ -58,6 +54,5 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
}
// Serialize
res(await Promise.all(context.map(async note =>
await pack(note, user))));
res(await Promise.all(conversation.map(note => pack(note, user))));
});

View File

@ -33,11 +33,12 @@ export default async function(ctx: Koa.Context) {
if (file.metadata.deletedAt) {
ctx.status = 410;
if (file.metadata.isExpired) {
await send(ctx, '/cache-expired.png', { root: assets });
} else {
await send(ctx, '/tombstone.png', { root: assets });
}
await send(ctx, '/tombstone.png', { root: assets });
return;
}
if (file.metadata.isMetaOnly) {
ctx.status = 204;
return;
}

View File

@ -4,8 +4,7 @@
import * as fs from 'fs';
import * as http from 'http';
import * as https from 'https';
//import * as http2 from 'http2';
import * as http2 from 'http2';
import * as zlib from 'zlib';
import * as Koa from 'koa';
import * as Router from 'koa-router';
@ -68,8 +67,7 @@ function createServer() {
certs[k] = fs.readFileSync(config.https[k]);
});
certs['allowHTTP1'] = true;
//return http2.createSecureServer(certs, app.callback());
return https.createServer(certs, app.callback());
return http2.createSecureServer(certs, app.callback());
} else {
return http.createServer(app.callback());
}

View File

@ -1,6 +1,5 @@
import { Buffer } from 'buffer';
import * as fs from 'fs';
import * as tmp from 'tmp';
import * as stream from 'stream';
import * as mongodb from 'mongodb';
@ -14,8 +13,7 @@ import DriveFile, { IMetadata, getDriveFileBucket, IDriveFile, DriveFileChunk }
import DriveFolder from '../../models/drive-folder';
import { pack } from '../../models/drive-file';
import event, { publishDriveStream } from '../../publishers/stream';
import getAcct from '../../acct/render';
import { IUser, isLocalUser, isRemoteUser } from '../../models/user';
import { isLocalUser, IRemoteUser } from '../../models/user';
import DriveFileThumbnail, { getDriveFileThumbnailBucket, DriveFileThumbnailChunk } from '../../models/drive-file-thumbnail';
import genThumbnail from '../../drive/gen-thumbnail';
@ -25,13 +23,6 @@ const gm = _gm.subClass({
const log = debug('misskey:drive:add-file');
const tmpFile = (): Promise<[string, any]> => new Promise((resolve, reject) => {
tmp.file((e, path, fd, cleanup) => {
if (e) return reject(e);
resolve([path, cleanup]);
});
});
const writeChunks = (name: string, readable: stream.Readable, type: string, metadata: any) =>
getDriveFileBucket()
.then(bucket => new Promise((resolve, reject) => {
@ -55,64 +46,115 @@ const writeThumbnailChunks = (name: string, readable: stream.Readable, originalI
readable.pipe(writeStream);
}));
const addFile = async (
user: IUser,
async function deleteOldFile(user: IRemoteUser) {
const oldFile = await DriveFile.findOne({
_id: {
$nin: [user.avatarId, user.bannerId]
}
}, {
sort: {
_id: 1
}
});
if (oldFile) {
// チャンクをすべて削除
DriveFileChunk.remove({
files_id: oldFile._id
});
DriveFile.update({ _id: oldFile._id }, {
$set: {
'metadata.deletedAt': new Date(),
'metadata.isExpired': true
}
});
//#region サムネイルもあれば削除
const thumbnail = await DriveFileThumbnail.findOne({
'metadata.originalId': oldFile._id
});
if (thumbnail) {
DriveFileThumbnailChunk.remove({
files_id: thumbnail._id
});
DriveFileThumbnail.remove({ _id: thumbnail._id });
}
//#endregion
}
}
/**
* Add file to drive
*
* @param user User who wish to add file
* @param path File path
* @param name Name
* @param comment Comment
* @param folderId Folder ID
* @param force If set to true, forcibly upload the file even if there is a file with the same hash.
* @return Created drive file
*/
export default async function(
user: any,
path: string,
name: string = null,
comment: string = null,
folderId: mongodb.ObjectID = null,
force: boolean = false,
metaOnly: boolean = false,
url: string = null,
uri: string = null
): Promise<IDriveFile> => {
log(`registering ${name} (user: ${getAcct(user)}, path: ${path})`);
// Calculate hash, get content type and get file size
const [hash, [mime, ext], size] = await Promise.all([
// hash
((): Promise<string> => new Promise((res, rej) => {
const readable = fs.createReadStream(path);
const hash = crypto.createHash('md5');
const chunks = [];
readable
.on('error', rej)
.pipe(hash)
.on('error', rej)
.on('data', (chunk) => chunks.push(chunk))
.on('end', () => {
const buffer = Buffer.concat(chunks);
res(buffer.toString('hex'));
});
}))(),
// mime
((): Promise<[string, string | null]> => new Promise((res, rej) => {
const readable = fs.createReadStream(path);
readable
.on('error', rej)
.once('data', (buffer: Buffer) => {
readable.destroy();
const type = fileType(buffer);
if (type) {
return res([type.mime, type.ext]);
} else {
// 種類が同定できなかったら application/octet-stream にする
return res(['application/octet-stream', null]);
}
});
}))(),
// size
((): Promise<number> => new Promise((res, rej) => {
fs.stat(path, (err, stats) => {
if (err) return rej(err);
res(stats.size);
): Promise<IDriveFile> {
// Calc md5 hash
const calcHash = new Promise<string>((res, rej) => {
const readable = fs.createReadStream(path);
const hash = crypto.createHash('md5');
const chunks = [];
readable
.on('error', rej)
.pipe(hash)
.on('error', rej)
.on('data', chunk => chunks.push(chunk))
.on('end', () => {
const buffer = Buffer.concat(chunks);
res(buffer.toString('hex'));
});
}))()
]);
});
// Detect content type
const detectMime = new Promise<[string, string]>((res, rej) => {
const readable = fs.createReadStream(path);
readable
.on('error', rej)
.once('data', (buffer: Buffer) => {
readable.destroy();
const type = fileType(buffer);
if (type) {
res([type.mime, type.ext]);
} else {
// 種類が同定できなかったら application/octet-stream にする
res(['application/octet-stream', null]);
}
});
});
// Get file size
const getFileSize = new Promise<number>((res, rej) => {
fs.stat(path, (err, stats) => {
if (err) return rej(err);
res(stats.size);
});
});
const [hash, [mime, ext], size] = await Promise.all([calcHash, detectMime, getFileSize]);
log(`hash: ${hash}, mime: ${mime}, ext: ${ext}, size: ${size}`);
// detect name
const detectedName: string = name || (ext ? `untitled.${ext}` : 'untitled');
const detectedName = name || (ext ? `untitled.${ext}` : 'untitled');
if (!force) {
// Check if there is a file with the same hash
@ -125,26 +167,72 @@ const addFile = async (
if (much !== null) {
log('file with same hash is found');
return much;
} else {
log('file with same hash is not found');
}
}
const [wh, averageColor, folder] = await Promise.all([
// Width and height (when image)
(async () => {
// 画像かどうか
if (!/^image\/.*$/.test(mime)) {
return null;
//#region Check drive usage
if (!metaOnly) {
const usage = await DriveFile
.aggregate([{
$match: {
'metadata.userId': user._id,
'metadata.deletedAt': { $exists: false }
}
}, {
$project: {
length: true
}
}, {
$group: {
_id: null,
usage: { $sum: '$length' }
}
}])
.then((aggregates: any[]) => {
if (aggregates.length > 0) {
return aggregates[0].usage;
}
return 0;
});
log(`drive usage is ${usage}`);
// If usage limit exceeded
if (usage + size > user.driveCapacity) {
if (isLocalUser(user)) {
throw 'no-free-space';
} else {
// (アバターまたはバナーを含まず)最も古いファイルを削除する
deleteOldFile(user);
}
}
}
//#endregion
const imageType = mime.split('/')[1];
const fetchFolder = async () => {
if (!folderId) {
return null;
}
// 画像でもPNGかJPEGかGIFでないならスキップ
if (imageType != 'png' && imageType != 'jpeg' && imageType != 'gif') {
return null;
}
const driveFolder = await DriveFolder.findOne({
_id: folderId,
userId: user._id
});
if (driveFolder == null) throw 'folder-not-found';
return driveFolder;
};
const properties = {};
let propPromises = [];
const isImage = ['image/jpeg', 'image/gif', 'image/png'].includes(mime);
if (isImage) {
// Calc width and height
const calcWh = async () => {
log('calculate image width and height...');
// Calculate width and height
@ -153,22 +241,12 @@ const addFile = async (
log(`image width and height is calculated: ${size.width}, ${size.height}`);
return [size.width, size.height];
})(),
// average color (when image)
(async () => {
// 画像かどうか
if (!/^image\/.*$/.test(mime)) {
return null;
}
const imageType = mime.split('/')[1];
// 画像でもPNGかJPEGでないならスキップ
if (imageType != 'png' && imageType != 'jpeg') {
return null;
}
properties['width'] = size.width;
properties['height'] = size.height;
};
// Calc average color
const calcAvg = async () => {
log('calculate average color...');
const info = await prominence(gm(fs.createReadStream(path), name)).identify();
@ -185,111 +263,15 @@ const addFile = async (
log(`average color is calculated: ${r}, ${g}, ${b}`);
return isTransparent ? [r, g, b, 255] : [r, g, b];
})(),
// folder
(async () => {
if (!folderId) {
return null;
}
const driveFolder = await DriveFolder.findOne({
_id: folderId,
userId: user._id
});
if (!driveFolder) {
throw 'folder-not-found';
}
return driveFolder;
})(),
// usage checker
(async () => {
// Calculate drive usage
const usage = await DriveFile
.aggregate([{
$match: {
'metadata.userId': user._id,
'metadata.deletedAt': { $exists: false }
}
}, {
$project: {
length: true
}
}, {
$group: {
_id: null,
usage: { $sum: '$length' }
}
}])
.then((aggregates: any[]) => {
if (aggregates.length > 0) {
return aggregates[0].usage;
}
return 0;
});
const value = isTransparent ? [r, g, b, 255] : [r, g, b];
log(`drive usage is ${usage}`);
properties['avgColor'] = value;
};
// If usage limit exceeded
if (usage + size > user.driveCapacity) {
if (isLocalUser(user)) {
throw 'no-free-space';
} else {
//#region (アバターまたはバナーを含まず)最も古いファイルを削除する
const oldFile = await DriveFile.findOne({
_id: {
$nin: [user.avatarId, user.bannerId]
}
}, {
sort: {
_id: 1
}
});
if (oldFile) {
// チャンクをすべて削除
DriveFileChunk.remove({
files_id: oldFile._id
});
DriveFile.update({ _id: oldFile._id }, {
$set: {
'metadata.deletedAt': new Date(),
'metadata.isExpired': true
}
});
//#region サムネイルもあれば削除
const thumbnail = await DriveFileThumbnail.findOne({
'metadata.originalId': oldFile._id
});
if (thumbnail) {
DriveFileThumbnailChunk.remove({
files_id: thumbnail._id
});
DriveFileThumbnail.remove({ _id: thumbnail._id });
}
//#endregion
}
//#endregion
}
}
})()
]);
const readable = fs.createReadStream(path);
const properties = {};
if (wh) {
properties['width'] = wh[0];
properties['height'] = wh[1];
propPromises = [calcWh(), calcAvg()];
}
if (averageColor) {
properties['avgColor'] = averageColor;
}
const [folder] = await Promise.all([fetchFolder(), propPromises]);
const metadata = {
userId: user._id,
@ -298,7 +280,8 @@ const addFile = async (
},
folderId: folder !== null ? folder._id : null,
comment: comment,
properties: properties
properties: properties,
isMetaOnly: metaOnly
} as IMetadata;
if (url !== null) {
@ -309,74 +292,35 @@ const addFile = async (
metadata.uri = uri;
}
const file = await (writeChunks(detectedName, readable, mime, metadata) as Promise<IDriveFile>);
const driveFile = metaOnly
? await DriveFile.insert({
length: 0,
uploadDate: new Date(),
md5: hash,
filename: detectedName,
metadata: metadata,
contentType: mime
})
: await (writeChunks(detectedName, fs.createReadStream(path), mime, metadata) as Promise<IDriveFile>);
try {
const thumb = await genThumbnail(file);
if (thumb) {
await writeThumbnailChunks(detectedName, thumb, file._id);
log(`drive file has been created ${driveFile._id}`);
pack(driveFile).then(packedFile => {
// Publish drive_file_created event
event(user._id, 'drive_file_created', packedFile);
publishDriveStream(user._id, 'file_created', packedFile);
});
if (!metaOnly) {
try {
const thumb = await genThumbnail(driveFile);
if (thumb) {
await writeThumbnailChunks(detectedName, thumb, driveFile._id);
}
} catch (e) {
// noop
}
} catch (e) {
// noop
}
return file;
};
/**
* Add file to drive
*
* @param user User who wish to add file
* @param file File path or readableStream
* @param comment Comment
* @param type File type
* @param folderId Folder ID
* @param force If set to true, forcibly upload the file even if there is a file with the same hash.
* @return Object that represents added file
*/
export default (user: any, file: string | stream.Readable, ...args) => new Promise<any>((resolve, reject) => {
const isStream = typeof file === 'object' && typeof file.read === 'function';
// Get file path
new Promise<[string, any]>((res, rej) => {
if (typeof file === 'string') {
res([file, null]);
} else if (isStream) {
tmpFile()
.then(([path, cleanup]) => {
const readable: stream.Readable = file;
const writable = fs.createWriteStream(path);
readable
.on('error', rej)
.on('end', () => {
res([path, cleanup]);
})
.pipe(writable)
.on('error', rej);
})
.catch(rej);
} else {
rej(new Error('un-compatible file.'));
}
})
.then(([path, cleanup]) => new Promise<IDriveFile>((res, rej) => {
addFile(user, path, ...args)
.then(file => {
res(file);
if (cleanup) cleanup();
})
.catch(rej);
}))
.then(file => {
log(`drive file has been created ${file._id}`);
resolve(file);
pack(file).then(packedFile => {
// Publish drive_file_created event
event(user._id, 'drive_file_created', packedFile);
publishDriveStream(user._id, 'file_created', packedFile);
});
})
.catch(reject);
});
return driveFile;
}

View File

@ -1,14 +1,17 @@
import * as fs from 'fs';
import * as URL from 'url';
import { IDriveFile, validateFileName } from '../../models/drive-file';
import create from './add-file';
import * as debug from 'debug';
import * as tmp from 'tmp';
import * as fs from 'fs';
import * as request from 'request';
import { IDriveFile, validateFileName } from '../../models/drive-file';
import create from './add-file';
import config from '../../config';
const log = debug('misskey:drive:upload-from-url');
export default async (url, user, folderId = null, uri = null): Promise<IDriveFile> => {
export default async (url: string, user, folderId = null, uri: string = null): Promise<IDriveFile> => {
log(`REQUESTED: ${url}`);
let name = URL.parse(url).pathname.split('/').pop();
@ -43,7 +46,7 @@ export default async (url, user, folderId = null, uri = null): Promise<IDriveFil
let error;
try {
driveFile = await create(user, path, name, null, folderId, false, url, uri);
driveFile = await create(user, path, name, null, folderId, false, config.preventCacheRemoteFiles, url, uri);
log(`created: ${driveFile._id}`);
} catch (e) {
error = e;

View File

@ -233,15 +233,14 @@ module.exports = {
}, {
loader: 'replace',
query: {
search: i18nPattern.toString(),
replace: 'i18nReplacement',
i18n: true
}
}, {
loader: 'replace',
query: {
search: faPattern.toString(),
replace: 'faReplacement'
qs: [{
search: i18nPattern.toString(),
replace: 'i18nReplacement',
i18n: true
}, {
search: faPattern.toString(),
replace: 'faReplacement'
}]
}
}]
}]