Compare commits

...

18 Commits

Author SHA1 Message Date
1c0cb1ae71 2.16.3 2018-05-23 15:27:31 +09:00
0ba5dc3900 Only show local posts in the timeline of top page 2018-05-23 15:25:15 +09:00
872717feeb Merge pull request #1638 from syuilo/l10n_master
New Crowdin translations
2018-05-23 14:07:36 +09:00
85b51f06a4 New translations ja.yml (English) 2018-05-23 14:01:15 +09:00
94df60d054 Merge pull request #1637 from syuilo/l10n_master
New Crowdin translations
2018-05-23 13:51:19 +09:00
7395284480 New translations ja.yml (English) 2018-05-23 13:50:54 +09:00
b537fa5467 Merge pull request #1636 from syuilo/l10n_master
New Crowdin translations
2018-05-22 23:55:42 +09:00
dca58c20d2 New translations ja.yml (Chinese Simplified) 2018-05-22 23:54:36 +09:00
0a3030f7d0 New translations ja.yml (English) 2018-05-22 19:35:05 +09:00
81cc6f3104 2.16.2 2018-05-22 18:20:49 +09:00
cc0b9c6933 oops 2018-05-22 18:19:02 +09:00
5671f1c6a4 2.16.1 2018-05-22 11:47:23 +09:00
89dee86f39 Fix bug and remove unnecessary query 2018-05-22 11:45:49 +09:00
b414068ada Refactor 2018-05-22 11:39:48 +09:00
3be7952e9f Improve avatar rendering 2018-05-22 11:34:40 +09:00
137b5da4aa Fix bug 2018-05-22 11:31:06 +09:00
2ee1639acb Merge pull request #1631 from syuilo/l10n_master
New Crowdin translations
2018-05-22 07:13:58 +09:00
a05b184595 New translations ja.yml (Polish) 2018-05-22 06:00:58 +09:00
13 changed files with 47 additions and 27 deletions

View File

@ -121,7 +121,7 @@ common/views/components/signup.vue:
unavailable: "Unavailable"
error: "Network error"
invalid-format: "Only use letters, numbers and -."
too-short: "Please enter at least 1 character"
too-short: "Please enter at least 1 character!"
too-long: "Please enter up to 20 characters."
password: "Password"
password-placeholder: "We recommend more than 8 characters."
@ -168,11 +168,11 @@ common/views/widgets/server.vue:
common/views/widgets/visibility-chooser.vue:
public: "Public"
home: "Home"
home-desc: "ホームタイムラインにのみ公開"
home-desc: "Post to the home timeline only"
followers: "Followers"
followers-desc: "自分のフォロワーにのみ公開"
followers-desc: "Post to followers only"
specified: "Direct"
specified-desc: "指定したユーザーにのみ公開"
specified-desc: "Post to specified users only"
private: "Private"
desktop/views/components/activity.chart.vue:
total: "Black ... Total"
@ -188,7 +188,7 @@ desktop/views/components/calendar.vue:
next: "Next month"
go: "Click to naviguate"
desktop/views/components/choose-file-from-drive-window.vue:
choose-file: "ファイル選択中"
choose-file: "Choosing files"
upload: "Upload files from your PC"
cancel: "Cancel"
ok: "OK"
@ -264,7 +264,7 @@ desktop/views/components/following-window.vue:
desktop/views/components/following.vue:
empty: "You dont follow anyone."
desktop/views/components/friends-maker.vue:
title: "気になるユーザーをフォロー:"
title: "Recommended users:"
empty: "Similar users werent found."
fetching: "Loading…"
refresh: "More"
@ -418,7 +418,7 @@ desktop/views/components/settings.vue:
do-update: "Check for update"
update-settings: "Advanced settings"
prevent-update: "アップデートを延期する(非推奨)"
prevent-update-desc: "この設定をオンにしてもアップデートが反映される場合があります。この設定はこのデバイスのみ有効です。"
prevent-update-desc: "You may reflect updates even if you select this setting. This setting is valid only this device."
no-updates: "No updates available"
no-updates-desc: "Your Misskey is up to date."
update-available: "New version is available!"

View File

@ -166,14 +166,14 @@ common/views/widgets/server.vue:
title: "Informacje o serwerze"
toggle: "Przełącz widok"
common/views/widgets/visibility-chooser.vue:
public: "公開"
home: "ホーム"
home-desc: "ホームタイムラインにのみ公開"
followers: "フォロワー"
followers-desc: "自分のフォロワーにのみ公開"
specified: "ダイレクト"
specified-desc: "指定したユーザーにのみ公開"
private: "非公開"
public: "Publiczny"
home: "Lokalny"
home-desc: "Widoczny tylko na tej instancji"
followers: "Dla śledzących"
followers-desc: "Widoczny tylko dla osób, które Cię śledzą"
specified: "Bezpośredni"
specified-desc: "Tylko dla określonych użytkowników"
private: "Prywatny"
desktop/views/components/activity.chart.vue:
total: "Czarny … Łącznie"
notes: "Niebieski … Wpisy"

View File

@ -1,6 +1,6 @@
---
meta:
lang: "日本語"
lang: "中文(简体)"
divider: ""
common:
misskey: "Misskeyで皆と共有しよう。"

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "2.16.0",
"clientVersion": "1.0.5650",
"version": "2.16.3",
"clientVersion": "1.0.5668",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@ -26,7 +26,11 @@ export default Vue.extend({
},
style(): any {
return {
backgroundColor: this.user.avatarColor && this.user.avatarColor.length == 3 ? `rgb(${ this.user.avatarColor.join(',') })` : null,
backgroundColor: this.lightmode
? `rgb(${ this.user.avatarColor.slice(0, 3).join(',') })`
: this.user.avatarColor && this.user.avatarColor.length == 3
? `rgb(${ this.user.avatarColor.join(',') })`
: null,
backgroundImage: this.lightmode ? null : `url(${ this.user.avatarUrl }?thumbnail)`,
borderRadius: (this as any).clientSettings.circleIcons ? '100%' : null
};

View File

@ -37,6 +37,7 @@ export default Vue.extend({
fetch(cb?) {
this.fetching = true;
(this as any).api('notes', {
local: true,
reply: false,
renote: false,
media: false,

View File

@ -70,7 +70,7 @@ init((launch) => {
routes: [
{ path: '/', name: 'index', component: MkIndex },
{ path: '/signup', name: 'signup', component: MkSignup },
{ path: '/i/settings', component: MkSettings },
{ path: '/i/settings', name: 'settings', component: MkSettings },
{ path: '/i/notifications', name: 'notifications', component: MkNotifications },
{ path: '/i/widgets', name: 'widgets', component: MkWidgets },
{ path: '/i/messaging', name: 'messaging', component: MkMessaging },

View File

@ -28,7 +28,7 @@
<li><a @click="search">%fa:search%%i18n:@search%%fa:angle-right%</a></li>
</ul>
<ul>
<li><router-link to="/i/settings">%fa:cog%%i18n:@settings%%fa:angle-right%</router-link></li>
<li><router-link to="/i/settings" :data-active="$route.name == 'settings'">%fa:cog%%i18n:@settings%%fa:angle-right%</router-link></li>
<li @click="dark"><p><template v-if="_darkmode_">%fa:moon%</template><template v-else>%fa:R moon%</template><span>ダークモード</span></p></li>
</ul>
</div>

View File

@ -1,6 +1,7 @@
import * as mongo from 'mongodb';
import { default as Notification, INotification } from '../../../models/notification';
import publishUserStream from '../../../publishers/stream';
import Mute from '../../../models/mute';
/**
* Mark as read notification(s)
@ -26,6 +27,11 @@ export default (
? [new mongo.ObjectID(message)]
: [(message as INotification)._id];
const mute = await Mute.find({
muterId: userId
});
const mutedUserIds = mute.map(m => m.muteeId);
// Update documents
await Notification.update({
_id: { $in: ids },
@ -42,6 +48,9 @@ export default (
const count = await Notification
.count({
notifieeId: userId,
notifierId: {
$nin: mutedUserIds
},
isRead: false
}, {
limit: 1

View File

@ -96,8 +96,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
});
// Serialize
res(await Promise.all(notifications.map(async notification =>
await pack(notification))));
res(await Promise.all(notifications.map(notification => pack(notification))));
// Mark as read all
if (notifications.length > 0 && markAsRead) {

View File

@ -8,6 +8,10 @@ import Note, { pack } from '../../../models/note';
* Get all notes
*/
module.exports = (params) => new Promise(async (res, rej) => {
// Get 'local' parameter
const [local, localErr] = $.bool.optional().get(params.local);
if (localErr) return rej('invalid local param');
// Get 'reply' parameter
const [reply, replyErr] = $.bool.optional().get(params.reply);
if (replyErr) return rej('invalid reply param');
@ -61,6 +65,10 @@ module.exports = (params) => new Promise(async (res, rej) => {
};
}
if (local) {
query._user.host = null;
}
if (reply != undefined) {
query.replyId = reply ? { $exists: true, $ne: null } : null;
}

View File

@ -9,8 +9,7 @@ import Mute from '../../../../models/mute';
*/
module.exports = (params, user) => new Promise(async (res, rej) => {
const mute = await Mute.find({
muterId: user._id,
deletedAt: { $exists: false }
muterId: user._id
});
const mutedUserIds = mute.map(m => m.muteeId);

View File

@ -49,8 +49,8 @@ const router = new Router();
//#region static assets
router.get('/assets/*', async ctx => {
// 無圧縮スクリプトを用意するのは大変なので一時的に無効化
const path = process.env.NODE_ENV == 'production' ? ctx.path.replace('raw.js', 'min.js') : ctx.path.replace('min.js', 'raw.js');
// 互換性のため
const path = ctx.path.replace('.raw.js', '.js').replace('.min.js', '.js');
await send(ctx, path, {
root: client,
maxage: ms('7 days'),