Compare commits

...

15 Commits

Author SHA1 Message Date
fe3dd25bc3 8.34.4 2018-09-10 21:40:14 +09:00
5b09209ef9 Fix bug 2018-09-10 21:36:43 +09:00
62db650e3c Revert "Fix bug"
This reverts commit f3ab8199a5.
2018-09-10 21:17:49 +09:00
b847886254 fix docs (#2678) 2018-09-10 18:32:51 +09:00
c6e69ffae4 8.34.3 2018-09-10 18:07:38 +09:00
b24f368d3f サロゲートペアを字数にカウントしないようにする (#2661)
* Update post-form.vue

* Update messaging-message.ts

* Update post-form.vue

* Update note.ts

* Update post-form.vue

refs: https://github.com/syuilo/misskey/pull/2661#issuecomment-419579444

* Update post-form.vue

refs: https://github.com/syuilo/misskey/pull/2661#issuecomment-419579444

* Update messaging-message.ts

refs: https://github.com/syuilo/misskey/pull/2661#issuecomment-419579444

* Update note.ts

refs: https://github.com/syuilo/misskey/pull/2661#issuecomment-419579444

* Update post-form.vue

refs: https://github.com/syuilo/misskey/pull/2661#discussion_r216175581

* Update post-form.vue

* Update post-form.vue

refs: https://github.com/syuilo/misskey/pull/2661#discussion_r216242002

* Update post-form.vue

refs: https://github.com/syuilo/misskey/pull/2661#discussion_r216242105
2018-09-10 18:02:46 +09:00
4dc8351f56 Optimize booting script 2018-09-10 17:50:34 +09:00
f3ab8199a5 Fix bug 2018-09-10 17:40:41 +09:00
28d953933a Merge branch 'develop' of https://github.com/syuilo/misskey into develop 2018-09-10 15:07:52 +09:00
77d9ae92f6 8.34.2 2018-09-10 15:07:37 +09:00
7d00754587 Merge pull request #2676 from syuilo/l10n_develop
New Crowdin translations
2018-09-10 14:51:16 +09:00
982b5eb698 New translations ja-JP.yml (English) 2018-09-10 14:50:54 +09:00
20a9c25d70 Fix #2677 2018-09-10 14:48:19 +09:00
689dc3b9d5 New translations ja-JP.yml (French) 2018-09-10 05:20:52 +09:00
d765803b83 New translations ja-JP.yml (French) 2018-09-10 05:11:20 +09:00
11 changed files with 41 additions and 23 deletions

View File

@ -10,7 +10,7 @@ Misskeyサーバーの構築にご関心をお寄せいただきありがとう
*1.* Misskeyユーザーの作成
----------------------------------------------------------------
Misskeyrootで実行しない方がよいため、代わりにユーザーを作成します。
Misskeyrootユーザーで実行しない方がよいため、代わりにユーザーを作成します。
Debianの例:
```

View File

@ -13,7 +13,7 @@ common:
rich-contents: "Post"
rich-contents-desc: "Just post your idea, hot topics and anything you want to share. You may want to decorate your words, attach your favorite pictures, send files including movies and create a poll - those are the things you can do on Misskey!"
reaction: "Reactions"
reaction-desc: "Easiest way to tell your emotions.\nMisskey allows you to add various type of reactions to others post. The emotional experience on Misskey will never be on other SNSs which only able to push “likes”."
reaction-desc: "Easiest way to tell your emotions. Misskey allows you to add various type of reactions to others post. The emotional experience on Misskey will never be on other SNSs which only able to push “likes”."
ui: "Interface"
ui-desc: "No UI fits for everyone. Therefore, Misskey has a highly customizable UI for your taste. You can edit layouts of your timeline, place selectable widgets you can easily move and create your unique home as this place will be your home."
drive: "Misskey Drive"

View File

@ -7,7 +7,7 @@ common:
about-title: "Une ⭐ du fédivers."
about: "Merci d'avoir découvert Misskey. Misskey est une <b>plateforme de microblogage distribuée</b> née sur Terre. Parce qu'il fait partie du Fédivers (un univers composé de diverses plateformes de réseaux sociaux organisées), il est mutuellement connecté avec d'autres plateformes de réseaux sociaux. Désirez-vous prendre une pause, pendant un instant, loin de l'agitation de la ville et plonger dans un nouvel Internet ?"
intro:
title: "Misskeyって?"
title: "Cest quoi Misskey ?"
about: "Misskeyはオープンソースの<b>分散型マイクロブログSNS</b>です。リッチで高度にカスタマイズできるUI、投稿へのリアクション、ファイルを一元管理できるドライブなど、先進的な機能を揃えています。また、Fediverseと呼ばれるネットワークに接続できるため、他のSNSともやり取りできます。例えば、あなたが何か投稿すると、その投稿はMisskeyだけでなく他のSNSにも伝わります。ちょうどある惑星から他の惑星に電波を発信している様子をイメージしてください。"
features: "Fonctionnalités"
rich-contents: "Notes"
@ -891,10 +891,10 @@ desktop/views/pages/welcome.vue:
signin-button: "Se connecter"
signup-button: "S'inscrire"
timeline: "Fil d'actualité"
announcements: "お知らせ"
photos: "最近の画像"
announcements: "Notices"
photos: "Images récentes"
powered-by-misskey: "Propulsé par <b>Misskey</b>."
info: "情報"
info: "Informations"
desktop/views/pages/drive.vue:
title: "Lecteur de Misskey"
desktop/views/pages/favorites.vue:
@ -1191,7 +1191,7 @@ mobile/views/pages/settings.vue:
post-style: "Style de la publication"
post-style-standard: "Standard"
post-style-smart: "Intelligent"
notification-position: "通知の表示"
notification-position: "Style de notification"
notification-position-bottom: "en bas"
notification-position-top: "en haut"
behavior: "Comportement"

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "8.34.1",
"clientVersion": "1.0.9561",
"version": "8.34.4",
"clientVersion": "1.0.9572",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@ -18,6 +18,8 @@
return;
}
const langs = LANGS;
//#region Load settings
let settings = null;
const vuex = localStorage.getItem('vuex');
@ -40,10 +42,10 @@
//#region Detect the user language
let lang = null;
if (LANGS.includes(navigator.language)) {
if (langs.includes(navigator.language)) {
lang = navigator.language;
} else {
lang = LANGS.find(x => x.split('-')[0] == navigator.language);
lang = langs.find(x => x.split('-')[0] == navigator.language);
if (lang == null) {
// Fallback
@ -52,7 +54,7 @@
}
if (settings && settings.device.lang &&
LANGS.includes(settings.device.lang)) {
langs.includes(settings.device.lang)) {
lang = settings.device.lang;
}
//#endregion

View File

@ -45,7 +45,7 @@
<span v-if="visibility === 'specified'">%fa:envelope%</span>
<span v-if="visibility === 'private'">%fa:lock%</span>
</button>
<p class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</p>
<p class="text-count" :class="{ over: this.trimmedLength(text) > 1000 }">{{ 1000 - this.trimmedLength(text) }}</p>
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
{{ posting ? '%i18n:@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
</button>
@ -63,6 +63,7 @@ import MkVisibilityChooser from '../../../common/views/components/visibility-cho
import parse from '../../../../../mfm/parse';
import { host } from '../../../config';
import { erase } from '../../../../../prelude/array';
import { length } from 'stringz';
import parseAcct from '../../../../../misc/acct/parse';
export default Vue.extend({
@ -147,7 +148,7 @@ export default Vue.extend({
canPost(): boolean {
return !this.posting &&
(1 <= this.text.length || 1 <= this.files.length || this.poll || this.renote) &&
(this.text.trim().length <= 1000);
(length(this.text.trim()) <= 1000);
}
},
@ -199,6 +200,10 @@ export default Vue.extend({
},
methods: {
trimmedLength(text: string) {
return length(text.trim());
},
addTag(tag: string) {
insertTextAtCursor(this.$refs.text, ` #${tag} `);
},

View File

@ -4,7 +4,7 @@
<header>
<button class="cancel" @click="cancel">%fa:times%</button>
<div>
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
<span class="text-count" :class="{ over: trimmedLength(text) > 1000 }">{{ 1000 - trimmedLength(text) }}</span>
<span class="geo" v-if="geo">%fa:map-marker-alt%</span>
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
</div>
@ -60,6 +60,7 @@ import getFace from '../../../common/scripts/get-face';
import parse from '../../../../../mfm/parse';
import { host } from '../../../config';
import { erase } from '../../../../../prelude/array';
import { length } from 'stringz';
import parseAcct from '../../../../../misc/acct/parse';
export default Vue.extend({
@ -180,6 +181,10 @@ export default Vue.extend({
},
methods: {
trimmedLength(text: string) {
return length(text.trim());
},
addTag(tag: string) {
insertTextAtCursor(this.$refs.text, ` #${tag} `);
},

View File

@ -4,6 +4,7 @@ import { pack as packUser } from './user';
import { pack as packFile } from './drive-file';
import db from '../db/mongodb';
import MessagingHistory, { deleteMessagingHistory } from './messaging-history';
import { length } from 'stringz';
const MessagingMessage = db.get<IMessagingMessage>('messagingMessages');
export default MessagingMessage;
@ -19,7 +20,7 @@ export interface IMessagingMessage {
}
export function isValidText(text: string): boolean {
return text.length <= 1000 && text.trim() != '';
return length(text.trim()) <= 1000 && text.trim() != '';
}
/**

View File

@ -2,6 +2,7 @@ import * as mongo from 'mongodb';
const deepcopy = require('deepcopy');
import rap from '@prezzemolo/rap';
import db from '../db/mongodb';
import { length } from 'stringz';
import { IUser, pack as packUser } from './user';
import { pack as packApp } from './app';
import PollVote, { deletePollVote } from './poll-vote';
@ -24,11 +25,11 @@ Note.createIndex({
export default Note;
export function isValidText(text: string): boolean {
return text.length <= 1000 && text.trim() != '';
return length(text.trim()) <= 1000 && text.trim() != '';
}
export function isValidCw(text: string): boolean {
return text.length <= 100;
return length(text.trim()) <= 100;
}
export type INote = {

View File

@ -36,8 +36,11 @@ async function save(path: string, name: string, type: string, hash: string, size
if (config.drive && config.drive.storage == 'minio') {
const minio = new Minio.Client(config.drive.config);
const key = `${config.drive.prefix}/${uuid.v4()}/${name}`;
const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${name}.thumbnail.jpg`;
const keyDir = `${config.drive.prefix}/${uuid.v4()}`;
const key = `${keyDir}/${name}`;
const thumbnailKeyDir = `${config.drive.prefix}/${uuid.v4()}`;
const thumbnailKey = `${thumbnailKeyDir}/${name}.thumbnail.jpg`;
const baseUrl = config.drive.baseUrl
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`;
@ -61,8 +64,8 @@ async function save(path: string, name: string, type: string, hash: string, size
key: key,
thumbnailKey: thumbnailKey
},
url: `${ baseUrl }/${ key }`,
thumbnailUrl: thumbnail ? `${ baseUrl }/${ thumbnailKey }` : null
url: `${ baseUrl }/${ keyDir }/${ encodeURIComponent(name) }`,
thumbnailUrl: thumbnail ? `${ baseUrl }/${ thumbnailKeyDir }/${ encodeURIComponent(name) }.thumbnail.jpg` : null
});
const file = await DriveFile.insert({

View File

@ -25,7 +25,8 @@ export default async function(user: IUser, note: INote) {
tags: [],
fileIds: [],
poll: null,
geo: null
geo: null,
cw: null
}
});