From cc7e374f692ba77c76d01b5eaac377795ea105bc Mon Sep 17 00:00:00 2001
From: rinsuki <428rinsuki+git@gmail.com>
Date: Tue, 17 Apr 2018 17:14:25 +0900
Subject: [PATCH 001/292] add feedback link
---
locales/en.yml | 1 +
locales/ja.yml | 1 +
src/client/app/desktop/views/components/ui.header.account.vue | 3 +++
3 files changed, 5 insertions(+)
diff --git a/locales/en.yml b/locales/en.yml
index 446ef371be..cfd075f7d8 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -369,6 +369,7 @@ desktop/views/components/ui.header.account.vue:
mentions: "Mentions"
customize: "Customize"
settings: "Settings"
+ feedback: "Feedback"
signout: "Sign out"
desktop/views/components/ui.header.nav.vue:
diff --git a/locales/ja.yml b/locales/ja.yml
index b5479b5cef..470a393b89 100644
--- a/locales/ja.yml
+++ b/locales/ja.yml
@@ -369,6 +369,7 @@ desktop/views/components/ui.header.account.vue:
mentions: "あなた宛て"
customize: "カスタマイズ"
settings: "設定"
+ feedback: "フィードバック"
signout: "サインアウト"
desktop/views/components/ui.header.nav.vue:
diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue
index 558aaa6dc8..28e13f1485 100644
--- a/src/client/app/desktop/views/components/ui.header.account.vue
+++ b/src/client/app/desktop/views/components/ui.header.account.vue
@@ -24,6 +24,9 @@
%fa:cog%%i18n:@settings%%fa:angle-right%
+
+ %fa:comment%%i18n:@feedback%%fa:external-link-alt%
+
-
From d9fe884e871be0168b66eb98b25c77315d3f5c58 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 19:32:18 +0900
Subject: [PATCH 002/292] :art:
---
.../app/desktop/views/components/timeline.vue | 32 ++++++++++++++-----
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index e0215ad1a2..c1afbb6bee 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -74,20 +74,36 @@ export default Vue.extend({
border-radius 6px
> header
- padding 8px 16px
- border-bottom solid 1px #eee
+ padding 0 8px
+ z-index 1
+ box-shadow 0 1px rgba(0, 0, 0, 0.08)
> span
- margin-right 16px
- line-height 27px
- font-size 14px
- color #555
+ display inline-block
+ padding 0 10px
+ line-height 42px
+ font-size 12px
+ user-select none
+
+ &[data-is-active]
+ color $theme-color
+ cursor default
+
+ &:before
+ content ""
+ display block
+ position absolute
+ bottom 0
+ left -8px
+ width calc(100% + 16px)
+ height 2px
+ background $theme-color
&:not([data-is-active])
- color $theme-color
+ color #6f7477
cursor pointer
&:hover
- text-decoration underline
+ color #525a5f
From 2c769c16432e22ed7804744e1da25305657e534e Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 19:33:43 +0900
Subject: [PATCH 003/292] :art:
---
src/client/app/desktop/views/components/timeline.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index c1afbb6bee..f64b7eba97 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -88,6 +88,7 @@ export default Vue.extend({
&[data-is-active]
color $theme-color
cursor default
+ font-weight bold
&:before
content ""
From 0a1455ac9f4b2af082b9f089501929b8dfeb9358 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 19:40:02 +0900
Subject: [PATCH 004/292] =?UTF-8?q?=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?=
=?UTF-8?q?=E6=95=B4=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
locales/en.yml | 3 +--
locales/fr.yml | 2 +-
locales/ja.yml | 3 +--
src/client/app/common/views/components/nav.vue | 10 ++--------
.../app/desktop/views/components/ui.header.account.vue | 6 ------
5 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/locales/en.yml b/locales/en.yml
index cfd075f7d8..b0f77838a4 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -95,6 +95,7 @@ common/views/components/nav.vue:
donors: "Donators"
repository: "Repository"
develop: "Developers"
+ feedback: "Feedback"
common/views/components/note-menu.vue:
pin: "Pin to profile page"
@@ -366,10 +367,8 @@ desktop/views/components/settings.profile.vue:
desktop/views/components/ui.header.account.vue:
profile: "Your profile"
drive: "Drive"
- mentions: "Mentions"
customize: "Customize"
settings: "Settings"
- feedback: "Feedback"
signout: "Sign out"
desktop/views/components/ui.header.nav.vue:
diff --git a/locales/fr.yml b/locales/fr.yml
index 583104b4f0..681bb6ba18 100644
--- a/locales/fr.yml
+++ b/locales/fr.yml
@@ -95,6 +95,7 @@ common/views/components/nav.vue:
donors: "Donateurs"
repository: "Repo"
develop: "Développeurs"
+ feedback: "フィードバック"
common/views/components/note-menu.vue:
pin: "Épingler sur votre profile"
@@ -366,7 +367,6 @@ desktop/views/components/settings.profile.vue:
desktop/views/components/ui.header.account.vue:
profile: "Votre profil"
drive: "Drive"
- mentions: "Mentions"
customize: "Modifications"
settings: "Réglages"
signout: "Déconnexion"
diff --git a/locales/ja.yml b/locales/ja.yml
index 470a393b89..c8e02f7455 100644
--- a/locales/ja.yml
+++ b/locales/ja.yml
@@ -95,6 +95,7 @@ common/views/components/nav.vue:
donors: "ドナー"
repository: "リポジトリ"
develop: "開発者"
+ feedback: "フィードバック"
common/views/components/note-menu.vue:
pin: "ピン留め"
@@ -366,10 +367,8 @@ desktop/views/components/settings.profile.vue:
desktop/views/components/ui.header.account.vue:
profile: "プロフィール"
drive: "ドライブ"
- mentions: "あなた宛て"
customize: "カスタマイズ"
settings: "設定"
- feedback: "フィードバック"
signout: "サインアウト"
desktop/views/components/ui.header.nav.vue:
diff --git a/src/client/app/common/views/components/nav.vue b/src/client/app/common/views/components/nav.vue
index 2295957928..cd1f99288a 100644
--- a/src/client/app/common/views/components/nav.vue
+++ b/src/client/app/common/views/components/nav.vue
@@ -2,16 +2,10 @@
%i18n:@about%
・
- %i18n:@stats%
- ・
- %i18n:@status%
- ・
- %i18n:@wiki%
- ・
- %i18n:@donors%
- ・
%i18n:@repository%
・
+ %i18n:@feedback%
+ ・
%i18n:@develop%
・
Follow us on %fa:B twitter%
diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue
index 28e13f1485..2bf8678b8d 100644
--- a/src/client/app/desktop/views/components/ui.header.account.vue
+++ b/src/client/app/desktop/views/components/ui.header.account.vue
@@ -13,9 +13,6 @@
-
%fa:cloud%%i18n:@drive%%fa:angle-right%
- -
- %fa:at%%i18n:@mentions%%fa:angle-right%
-
-
From 70d5d4459d787f32926fb3011839b8848d0549df Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 19:40:44 +0900
Subject: [PATCH 005/292] :v:
---
locales/fr.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/locales/fr.yml b/locales/fr.yml
index 681bb6ba18..137816ee9b 100644
--- a/locales/fr.yml
+++ b/locales/fr.yml
@@ -446,7 +446,7 @@ desktop/views/widgets/trends.vue:
nothing: "Rien"
desktop/views/widgets/users.vue:
- title: "Utilisateurs recommandés"
+ title: "Utilisateurs"
refresh: "Afficher d'autres"
no-one: "Personne"
From e69554f8101b138284749ec1e335eaf35ff77c6c Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 19:43:49 +0900
Subject: [PATCH 006/292] Delete publicKey of remote user
---
src/models/user.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/models/user.ts b/src/models/user.ts
index 741306fd27..9638d15932 100644
--- a/src/models/user.ts
+++ b/src/models/user.ts
@@ -359,6 +359,8 @@ export const pack = (
if (!opts.detail) {
delete _user.twoFactorEnabled;
}
+ } else {
+ delete _user.publicKey;
}
_user.avatarUrl = _user.avatarId != null
From 0f67a544bd878e92cebde3f45cbaf39c4160946b Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 19:55:58 +0900
Subject: [PATCH 007/292] #1414
---
src/models/drive-file.ts | 6 +++---
src/services/drive/add-file.ts | 33 ++++++++++++++++++++++++++++++---
2 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/src/models/drive-file.ts b/src/models/drive-file.ts
index fc9c150724..0d0a6523de 100644
--- a/src/models/drive-file.ts
+++ b/src/models/drive-file.ts
@@ -8,11 +8,11 @@ import MessagingMessage, { deleteMessagingMessage } from './messaging-message';
import User from './user';
const DriveFile = monkDb.get('driveFiles.files');
-
DriveFile.createIndex('metadata.uri', { sparse: true, unique: true });
-
export default DriveFile;
+export const DriveFileChunk = monkDb.get('driveFiles.chunks');
+
const getGridFSBucket = async (): Promise => {
const db = await nativeDbConn();
const bucket = new mongo.GridFSBucket(db, {
@@ -93,7 +93,7 @@ export async function deleteDriveFile(driveFile: string | mongo.ObjectID | IDriv
}
// このDriveFileのチャンクをすべて削除
- await monkDb.get('driveFiles.chunks').remove({
+ await DriveFileChunk.remove({
files_id: d._id
});
diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts
index 30aae24ba6..279cdf0bc7 100644
--- a/src/services/drive/add-file.ts
+++ b/src/services/drive/add-file.ts
@@ -10,12 +10,12 @@ import * as debug from 'debug';
import fileType = require('file-type');
import prominence = require('prominence');
-import DriveFile, { IMetadata, getGridFSBucket, IDriveFile } from '../../models/drive-file';
+import DriveFile, { IMetadata, getGridFSBucket, IDriveFile, DriveFileChunk } from '../../models/drive-file';
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 } from '../../models/user';
+import { IUser, isLocalUser } from '../../models/user';
const gm = _gm.subClass({
imageMagick: true
@@ -207,7 +207,34 @@ const addFile = async (
// If usage limit exceeded
if (usage + size > user.driveCapacity) {
- throw 'no-free-space';
+ 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()
+ }
+ });
+ }
+ //#endregion
+ }
}
})()
]);
From 1b8acb7e01dc70e61f4072dcefc062a6649e9145 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 20:04:19 +0900
Subject: [PATCH 008/292] tombstone
---
src/models/drive-file.ts | 1 +
src/server/file/assets/tombstone.png | Bin 0 -> 6387 bytes
src/server/file/send-drive-file.ts | 6 ++++++
3 files changed, 7 insertions(+)
create mode 100644 src/server/file/assets/tombstone.png
diff --git a/src/models/drive-file.ts b/src/models/drive-file.ts
index 0d0a6523de..a8878d1197 100644
--- a/src/models/drive-file.ts
+++ b/src/models/drive-file.ts
@@ -29,6 +29,7 @@ export type IMetadata = {
folderId: mongo.ObjectID;
comment: string;
uri: string;
+ deletedAt?: Date;
};
export type IDriveFile = {
diff --git a/src/server/file/assets/tombstone.png b/src/server/file/assets/tombstone.png
new file mode 100644
index 0000000000000000000000000000000000000000..86224e318246d987b32aaa206bfdde8fbf83b740
GIT binary patch
literal 6387
zcmeAS@N?(olHy`uVBq!ia0y~yU}6Aa4iHr><-C@Gfq}6&$lZxy-8q?;3=9k`>5jgR
z3=A9lx&I`xGB7Z37I;J!GcfQS24TkI`72Tw7$iD8T^vIy;@;j(Oj=|m!ge8YI(L!n
zx@EHq4c|8|T|0|gMbR_@9v&zD>fH+a&&V)BK<`{T-~UPK%P;>d`ne
SXPF0EyB5v+djG;^^JjJa*&mz48<(9qU%RTL!<$!h+47AGS59aT
z`e#;~DDw7)$+6ABdp^yqE2y`y{a^8A<5H()$4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>wA~XEW5YRf+K2-odzK
z?$KKe2fshH-{Th5$A9#OTHIyFTdC*r{26wgOL7#Lkt^-+IP%S=#SLQ9PHzp|`i)1H
zcY)7$h)7e#&vnNiRF~eoY+Pc}V01TKa85qhs(^KGSDEs@Ok245v25z`NF7eS!_&^Z
zvFna46S;7xX6Lr3~9w5yKdK4Z2Y0xxa{gJ9tL}Sntl*>+(IV(^oN2#A^BFpTCPeujQX^o;=_B%PsbKYkW68)|nP+
zva_=K%%cB&Oj0K`uJ<0DC2I9Ou{gi-%~dvox(lH-$NwuR-?ciIbn_o?!egCZ?===o
zyjpa(f_b-)mA3ga?dJA}6?SvmoAqSB#=V=JP&Vi2qJ%qfybCUZl}?>nb+>M_nCp$V
zlii+eezxot^NG)~#~(je4?G^J!_Ag=i{aM!MZf!)q9S#!vwe&gzO-}u(@@?820!z6
zolA-|D9UBNktx=_xTD@;QfpCe;F_f~gQu9gvfuv{7#^FxQAuL=r$cW{x?2;E*vp*G
z*}1K9rI~$+)+4po54Jzfo8xsoat$ZjdhSbe(+sV9#Q#6cNISJPcB9*R>;Dq(Pn)-#
zy|Y?s`|ZEeJnxi>X`k!YznK4H;~~AxFZL~ND9hXb*D&;@$lPB0mjyBpZws7hzMSyu
zUD)#Z&HW4S>!$rWmvq$N$MUs|dyj+sNq#Lbm~}q5`}g;E`>g`mcVend?t@(F>FVdQ
I&MBb@0M)UnaR2}S
literal 0
HcmV?d00001
diff --git a/src/server/file/send-drive-file.ts b/src/server/file/send-drive-file.ts
index e6ee19ff1d..ef458265a8 100644
--- a/src/server/file/send-drive-file.ts
+++ b/src/server/file/send-drive-file.ts
@@ -22,6 +22,12 @@ export default async function(ctx: Koa.Context) {
return;
}
+ if (file.metadata.deletedAt) {
+ ctx.status = 410;
+ await send(ctx, `${__dirname}/assets/tombstone.png`);
+ return;
+ }
+
const bucket = await getGridFSBucket();
const readable = bucket.openDownloadStream(fileId);
From 88cad94297b02df3bf20d203b72dfbf7939c6e05 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 20:05:32 +0900
Subject: [PATCH 009/292] v4983
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 2fcd68b1cb..b2947a4f68 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "misskey",
"author": "syuilo ",
- "version": "0.0.4970",
+ "version": "0.0.4983",
"codename": "nighthike",
"license": "MIT",
"description": "A miniblog-based SNS",
From ac0146f9494e00a70ccc7324f0854bb499f29106 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 20:17:00 +0900
Subject: [PATCH 010/292] :art:
---
src/client/app/desktop/views/components/timeline.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue
index f64b7eba97..cadff8071c 100644
--- a/src/client/app/desktop/views/components/timeline.vue
+++ b/src/client/app/desktop/views/components/timeline.vue
@@ -75,7 +75,7 @@ export default Vue.extend({
> header
padding 0 8px
- z-index 1
+ z-index 10
box-shadow 0 1px rgba(0, 0, 0, 0.08)
> span
From ff5ab7d12f34ab9eef592be6abc88459e6199453 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 22:17:55 +0900
Subject: [PATCH 011/292] Fix bug
---
src/server/activitypub.ts | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts
index e27e2552f3..73ed43406d 100644
--- a/src/server/activitypub.ts
+++ b/src/server/activitypub.ts
@@ -1,3 +1,4 @@
+import * as mongo from 'mongodb';
import * as Router from 'koa-router';
const json = require('koa-json-body');
const httpSignature = require('http-signature');
@@ -49,7 +50,7 @@ router.get('/notes/:note', async (ctx, next) => {
}
const note = await Note.findOne({
- _id: ctx.params.note
+ _id: new mongo.ObjectID(ctx.params.note)
});
if (note === null) {
@@ -62,7 +63,7 @@ router.get('/notes/:note', async (ctx, next) => {
// outbot
router.get('/users/:user/outbox', async ctx => {
- const userId = ctx.params.user;
+ const userId = new mongo.ObjectID(ctx.params.user);
const user = await User.findOne({ _id: userId });
@@ -84,7 +85,7 @@ router.get('/users/:user/outbox', async ctx => {
// publickey
router.get('/users/:user/publickey', async ctx => {
- const userId = ctx.params.user;
+ const userId = new mongo.ObjectID(ctx.params.user);
const user = await User.findOne({ _id: userId });
@@ -102,7 +103,7 @@ router.get('/users/:user/publickey', async ctx => {
// user
router.get('/users/:user', async ctx => {
- const userId = ctx.params.user;
+ const userId = new mongo.ObjectID(ctx.params.user);
const user = await User.findOne({ _id: userId });
From d892e66072a622c40054933fbad19d6cb88aecc3 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 22:20:25 +0900
Subject: [PATCH 012/292] Fix bug
---
src/remote/activitypub/models/note.ts | 4 +++-
src/remote/activitypub/models/person.ts | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts
index ab6dd99a77..b2b5077c5e 100644
--- a/src/remote/activitypub/models/note.ts
+++ b/src/remote/activitypub/models/note.ts
@@ -1,3 +1,4 @@
+import * as mongo from 'mongodb';
import { JSDOM } from 'jsdom';
import * as debug from 'debug';
@@ -22,7 +23,8 @@ export async function fetchNote(value: string | IObject, resolver?: Resolver): P
// URIがこのサーバーを指しているならデータベースからフェッチ
if (uri.startsWith(config.url + '/')) {
- return await Note.findOne({ _id: uri.split('/').pop() });
+ const id = new mongo.ObjectID(uri.split('/').pop());
+ return await Note.findOne({ _id: id });
}
//#region このサーバーに既に登録されていたらそれを返す
diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts
index b755b2603a..dd9a80ae23 100644
--- a/src/remote/activitypub/models/person.ts
+++ b/src/remote/activitypub/models/person.ts
@@ -1,3 +1,4 @@
+import * as mongo from 'mongodb';
import { JSDOM } from 'jsdom';
import { toUnicode } from 'punycode';
import * as debug from 'debug';
@@ -21,7 +22,8 @@ export async function fetchPerson(value: string | IObject, resolver?: Resolver):
// URIがこのサーバーを指しているならデータベースからフェッチ
if (uri.startsWith(config.url + '/')) {
- return await User.findOne({ _id: uri.split('/').pop() });
+ const id = new mongo.ObjectID(uri.split('/').pop());
+ return await User.findOne({ _id: id });
}
//#region このサーバーに既に登録されていたらそれを返す
From 7c5b9ba1d1257edd1104da5d92befbb599ff0491 Mon Sep 17 00:00:00 2001
From: syuilo
Date: Tue, 17 Apr 2018 22:25:51 +0900
Subject: [PATCH 013/292] =?UTF-8?q?=E8=89=AF=E3=81=84=E6=84=9F=E3=81=98?=
=?UTF-8?q?=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
locales/en.yml | 4 ++--
locales/fr.yml | 4 ++--
locales/ja.yml | 4 ++--
src/client/app/desktop/views/pages/user/user.header.vue | 2 +-
src/client/app/mobile/views/pages/user.vue | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/locales/en.yml b/locales/en.yml
index b0f77838a4..9388aedbf8 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -406,7 +406,7 @@ desktop/views/pages/user/user.friends.vue:
no-users: "No users"
desktop/views/pages/user/user.header.vue:
- is-remote: "This user is not a user of Misskey, so the information is not accurate."
+ is-remote: "This user is a remote user, so the information is not accurate. "
view-remote: "See accurate information"
desktop/views/pages/user/user.home.vue:
@@ -591,7 +591,7 @@ mobile/views/pages/user.vue:
overview: "Overview"
timeline: "Timeline"
media: "Media"
- is-remote: "This user is not a user of Misskey, so the information might not be accurate."
+ is-remote: "This user is a remote user, so the information is not accurate. "
view-remote: "See accurate information"
mobile/views/pages/user/home.vue:
diff --git a/locales/fr.yml b/locales/fr.yml
index 137816ee9b..cd756194ab 100644
--- a/locales/fr.yml
+++ b/locales/fr.yml
@@ -406,7 +406,7 @@ desktop/views/pages/user/user.friends.vue:
no-users: "Pas d'utilisateurs"
desktop/views/pages/user/user.header.vue:
- is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées"
+ is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
view-remote: "Voir les informations détaillées"
desktop/views/pages/user/user.home.vue:
@@ -591,7 +591,7 @@ mobile/views/pages/user.vue:
overview: "Aperçu"
timeline: "Fil d'actualité"
media: "Media"
- is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées"
+ is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
view-remote: "Voir les informations détaillées"
mobile/views/pages/user/home.vue:
diff --git a/locales/ja.yml b/locales/ja.yml
index c8e02f7455..96b4a1d0ea 100644
--- a/locales/ja.yml
+++ b/locales/ja.yml
@@ -406,7 +406,7 @@ desktop/views/pages/user/user.friends.vue:
no-users: "よく話すユーザーはいません"
desktop/views/pages/user/user.header.vue:
- is-remote: "このユーザーはMisskeyのユーザーではないため情報が正確ではありません。"
+ is-remote: "このユーザーはリモートユーザーのため情報が正確ではありません。"
view-remote: "正確な情報を見る"
desktop/views/pages/user/user.home.vue:
@@ -591,7 +591,7 @@ mobile/views/pages/user.vue:
overview: "概要"
timeline: "タイムライン"
media: "メディア"
- is-remote: "このユーザーはMisskeyのユーザーではないため情報が正確ではありません。"
+ is-remote: "このユーザーはリモートユーザーのため情報が正確ではありません。"
view-remote: "正確な情報を見る"
mobile/views/pages/user/home.vue:
diff --git a/src/client/app/desktop/views/pages/user/user.header.vue b/src/client/app/desktop/views/pages/user/user.header.vue
index 7a0672d3d7..d9ad615164 100644
--- a/src/client/app/desktop/views/pages/user/user.header.vue
+++ b/src/client/app/desktop/views/pages/user/user.header.vue
@@ -1,6 +1,6 @@