Merge pull request #2482 from syuilo/develop

8.13.0
This commit is contained in:
syuilo 2018-08-25 19:46:50 +09:00 committed by GitHub
commit 2488d40421
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 11 deletions

View file

@ -1,8 +1,8 @@
{ {
"name": "misskey", "name": "misskey",
"author": "syuilo <i@syuilo.com>", "author": "syuilo <i@syuilo.com>",
"version": "8.12.0", "version": "8.13.0",
"clientVersion": "1.0.8981", "clientVersion": "1.0.9001",
"codename": "nighthike", "codename": "nighthike",
"main": "./built/index.js", "main": "./built/index.js",
"private": true, "private": true,
@ -194,7 +194,7 @@
"stylus": "0.54.5", "stylus": "0.54.5",
"stylus-loader": "3.0.2", "stylus-loader": "3.0.2",
"summaly": "2.1.4", "summaly": "2.1.4",
"systeminformation": "3.42.9", "systeminformation": "3.43.0",
"syuilo-password-strength": "0.0.1", "syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0", "textarea-caret": "3.1.0",
"tmp": "0.0.33", "tmp": "0.0.33",

View file

@ -51,8 +51,9 @@
} }
} }
if (settings) { if (settings && settings.device.lang &&
if (settings.device.lang) lang = settings.device.lang; LANGS.includes(settings.device.lang)) {
lang = settings.device.lang;
} }
//#endregion //#endregion

View file

@ -394,7 +394,7 @@ export default Vue.extend({
yAxes: [{ yAxes: [{
ticks: { ticks: {
callback: value => { callback: value => {
return Vue.filter('bytes')(value); return Vue.filter('bytes')(value, 1);
} }
} }
}] }]
@ -403,7 +403,7 @@ export default Vue.extend({
callbacks: { callbacks: {
label: (tooltipItem, data) => { label: (tooltipItem, data) => {
const label = data.datasets[tooltipItem.datasetIndex].label || ''; const label = data.datasets[tooltipItem.datasetIndex].label || '';
return `${label}: ${Vue.filter('bytes')(tooltipItem.yLabel)}`; return `${label}: ${Vue.filter('bytes')(tooltipItem.yLabel, 1)}`;
} }
} }
} }

View file

@ -166,8 +166,8 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs
const avatarId = avatar ? avatar._id : null; const avatarId = avatar ? avatar._id : null;
const bannerId = banner ? banner._id : null; const bannerId = banner ? banner._id : null;
const avatarUrl = avatar && avatar.metadata.url ? avatar.metadata.url : null; const avatarUrl = (avatar && avatar.metadata.thumbnailUrl) ? avatar.metadata.thumbnailUrl : (avatar && avatar.metadata.url) ? avatar.metadata.url : null;
const bannerUrl = banner && banner.metadata.url ? banner.metadata.url : null; const bannerUrl = (banner && banner.metadata.url) ? banner.metadata.url : null;
await User.update({ _id: user._id }, { await User.update({ _id: user._id }, {
$set: { $set: {
@ -255,7 +255,7 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver)
sharedInbox: person.sharedInbox, sharedInbox: person.sharedInbox,
avatarId: avatar ? avatar._id : null, avatarId: avatar ? avatar._id : null,
bannerId: banner ? banner._id : null, bannerId: banner ? banner._id : null,
avatarUrl: avatar && avatar.metadata.url ? avatar.metadata.url : null, avatarUrl: (avatar && avatar.metadata.thumbnailUrl) ? avatar.metadata.thumbnailUrl : (avatar && avatar.metadata.url) ? avatar.metadata.url : null,
bannerUrl: banner && banner.metadata.url ? banner.metadata.url : null, bannerUrl: banner && banner.metadata.url ? banner.metadata.url : null,
description: htmlToMFM(person.summary), description: htmlToMFM(person.summary),
followersCount, followersCount,

View file

@ -84,7 +84,7 @@ export default async (params: any, user: ILocalUser, app: IApp) => new Promise(a
if (avatar == null) return rej('avatar not found'); if (avatar == null) return rej('avatar not found');
updates.avatarUrl = avatar.metadata.url || `${config.drive_url}/${avatar._id}`; updates.avatarUrl = avatar.metadata.thumbnailUrl || avatar.metadata.url || `${config.drive_url}/${avatar._id}`;
if (avatar.metadata.properties.avgColor) { if (avatar.metadata.properties.avgColor) {
updates.avatarColor = avatar.metadata.properties.avgColor; updates.avatarColor = avatar.metadata.properties.avgColor;