Compare commits

...

6 Commits
2.3.1 ... 2.4.0

Author SHA1 Message Date
3f2a7a561e アイコンのレンダリングを改善 2018-05-06 18:04:37 +09:00
332af15e3c Fix 2018-05-06 17:37:50 +09:00
fe184ce84a Fix 2018-05-06 17:36:47 +09:00
661c7f45ba Merge pull request #1570 from m4sk1n/master
i18n: Improve Polish translation
2018-05-06 16:52:50 +09:00
01c0545409 i18n: Improve Polish translation
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2018-05-06 09:48:53 +02:00
c6492d3d58 誰もフォローしていないときはローカルタイムラインを表示するように 2018-05-06 14:35:28 +09:00
8 changed files with 137 additions and 22 deletions

View File

@ -95,7 +95,7 @@ common/views/components/nav.vue:
donors: "Sponsorzy"
repository: "Repozytorium"
develop: "Autorzy"
feedback: "Opinie"
feedback: "Podziel się opinią"
common/views/components/note-menu.vue:
favorite: "Dodaj do ulubionych"
@ -232,7 +232,7 @@ desktop/views/components/drive.nav-folder.vue:
desktop/views/components/drive.vue:
search: "Szukaj"
load-more: "Załaduj więcej"
empty-drive: "Twój dysk jest posty"
empty-drive: "Twój dysk jest pusty"
empty-drive-description: "Możesz wysłać plik klikając prawym przyciskiem myszy i wybierając \"Wyślij plik\" lub przeciągnąć plik i upuścić w tym oknie."
empty-folder: "Ten katalog jest posty"
unable-to-process: "Nie udało się dokończyć działania."
@ -240,6 +240,7 @@ desktop/views/components/drive.vue:
unhandled-error: "Nieznany błąd"
url-upload: "Wyślij z adresu"
url-of-file: "Adres URL pliku, który chcesz wysłać"
url-upload-requested: "Zaplanowano wysyłanie"
may-take-time: "Może trochę potrwać, zanim wysyłanie zostanie ukończone."
create-folder: "Utwórz katalog"
folder-name: "Nazwa katalogu"
@ -254,6 +255,7 @@ desktop/views/components/messaging-window.vue:
desktop/views/components/notes.note.vue:
reposted-by: "Udostępniono przez {}"
reply: "Odpowiedz"
renote: "Przeredaguj"
add-reaction: "Dodaj reakcję"
detail: "Pokaż szczegóły"
@ -267,11 +269,13 @@ desktop/views/components/post-form.vue:
quote-placeholder: "Zacytuj ten wpis…"
note: "Wyślij"
reply: "Odpowiedz"
posted: "Posted!"
renote: "Przeredaguj"
posted: "Opublikowano!"
replied: "Odpowiedziano!"
reposted: "Udostępniono!"
note-failed: "Nie udało się wysłać"
reply-failed: "Nie udało się odpowiedzieć"
renote-failed: "Nie udało się przeredagować"
posting: "Wysyłanie"
attach-media-from-local: "Załącz zawartość multimedialną z komputera"
attach-media-from-drive: "Załącz zawartość multimedialną z dysku"
@ -289,14 +293,19 @@ desktop/views/components/post-form-window.vue:
desktop/views/components/renote-form.vue:
quote: "Cytuj…"
cancel: "Anuluj"
renote: "Przeredaguj"
reposting: "Udostępnianie…"
success: "Udostępniono!"
failure: "Nie udało się przeredagować"
desktop/views/components/renote-form-window.vue:
title: "Czy na pewno chcesz przeredagować ten wpis?"
desktop/views/components/settings.vue:
profile: "Profil"
notification: "Powiadomienie"
notification: "Powiadomienia"
apps: "Aplikacje"
mute: "Wycisz"
mute: "Wyciszanie"
drive: "Dysk"
security: "Bezpieczeństwo"
password: "Hasło"
@ -392,7 +401,7 @@ desktop/views/pages/user/user.followers-you-know.vue:
no-users: "Brak użytkowników"
desktop/views/pages/user/user.friends.vue:
title: "Najczęściej odpisujący"
title: "Najbardziej aktywni"
loading: "Ładowanie"
no-users: "Brak użytkowników"

69
migration/2.4.0.js Normal file
View File

@ -0,0 +1,69 @@
// for Node.js interpret
const chalk = require('chalk');
const sequential = require('promise-sequential');
const { default: User } = require('../built/models/user');
const { default: DriveFile } = require('../built/models/drive-file');
async function main() {
const promiseGens = [];
const count = await User.count({});
let prev;
for (let i = 0; i < count; i++) {
promiseGens.push(() => {
const promise = new Promise(async (res, rej) => {
const user = await User.findOne(prev ? {
_id: { $gt: prev._id }
} : {}, {
sort: {
_id: 1
}
});
prev = user;
const set = {};
if (user.avatarId != null) {
const file = await DriveFile.findOne({ _id: user.avatarId });
if (file && file.metadata.properties.avgColor) {
set.avatarColor = file.metadata.properties.avgColor;
}
}
if (user.bannerId != null) {
const file = await DriveFile.findOne({ _id: user.bannerId });
if (file && file.metadata.properties.avgColor) {
set.bannerColor = file.metadata.properties.avgColor;
}
}
User.update({
_id: user._id
}, {
$set: set
}).then(() => {
res([i, user]);
}).catch(rej);
});
promise.then(([i, user]) => {
console.log(chalk`{gray ${i}} {green done: {bold ${user._id}} @${user.username}}`);
});
return promise;
});
}
return await sequential(promiseGens);
}
main().then(() => {
console.log('ALL DONE');
}).catch(console.error);

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "2.3.1",
"clientVersion": "1.0.5207",
"version": "2.4.0",
"clientVersion": "1.0.5215",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@ -1,8 +1,6 @@
<template>
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="{ borderRadius: clientSettings.circleIcons ? '100%' : null }">
<img v-if="disablePreview" :src="`${user.avatarUrl}?thumbnail&size=128`" alt=""/>
<img v-else :src="`${user.avatarUrl}?thumbnail&size=128`" alt="" v-user-preview="user.id"/>
</router-link>
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-if="disablePreview"></router-link>
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-else v-user-preview="user.id"></router-link>
</template>
<script lang="ts">
@ -10,6 +8,7 @@ import Vue from 'vue';
export default Vue.extend({
props: {
user: {
type: Object,
required: true
},
target: {
@ -20,6 +19,15 @@ export default Vue.extend({
required: false,
default: false
}
},
computed: {
style(): any {
return {
backgroundColor: this.user.avatarColor ? `rgb(${ this.user.avatarColor.join(',') })` : null,
backgroundImage: `url(${ this.user.avatarUrl }?thumbnail)`,
borderRadius: (this as any).clientSettings.circleIcons ? '100%' : null
};
}
}
});
</script>
@ -27,13 +35,7 @@ export default Vue.extend({
<style lang="stylus" scoped>
.mk-avatar
display inline-block
> img
display inline-block
width 100%
height 100%
margin 0
border-radius inherit
vertical-align bottom
transition border-radius 1s ease
background-size cover
background-position center center
transition border-radius 1s ease
</style>

View File

@ -31,6 +31,12 @@ export default Vue.extend({
};
},
created() {
if ((this as any).os.i.followingCount == 0) {
this.src = 'local';
}
},
mounted() {
(this.$refs.tl as any).$once('loaded', () => {
this.$emit('loaded');

View File

@ -75,6 +75,12 @@ export default Vue.extend({
}
},
created() {
if ((this as any).os.i.followingCount == 0) {
this.src = 'local';
}
},
mounted() {
document.title = 'Misskey';

View File

@ -9,7 +9,7 @@
<div class="body">
<div class="top">
<a class="avatar">
<img :src="`${user.avatarUrl}?thumbnail&size=200`" alt="avatar"/>
<img :src="user.avatarUrl" alt="avatar"/>
</a>
<mk-follow-button v-if="os.isSignedIn && os.i.id != user.id" :user="user"/>
</div>

View File

@ -4,6 +4,7 @@
import $ from 'cafy'; import ID from '../../../../cafy-id';
import User, { isValidName, isValidDescription, isValidLocation, isValidBirthday, pack } from '../../../../models/user';
import event from '../../../../publishers/stream';
import DriveFile from '../../../../models/drive-file';
/**
* Update myself
@ -51,12 +52,34 @@ module.exports = async (params, user, app) => new Promise(async (res, rej) => {
if (autoWatchErr) return rej('invalid autoWatch param');
if (autoWatch != null) user.settings.autoWatch = autoWatch;
if (avatarId) {
const avatar = await DriveFile.findOne({
_id: avatarId
});
if (avatar != null && avatar.metadata.properties.avgColor) {
user.avatarColor = avatar.metadata.properties.avgColor;
}
}
if (bannerId) {
const banner = await DriveFile.findOne({
_id: bannerId
});
if (banner != null && banner.metadata.properties.avgColor) {
user.bannerColor = banner.metadata.properties.avgColor;
}
}
await User.update(user._id, {
$set: {
name: user.name,
description: user.description,
avatarId: user.avatarId,
avatarColor: user.avatarColor,
bannerId: user.bannerId,
bannerColor: user.bannerColor,
profile: user.profile,
isBot: user.isBot,
settings: user.settings