Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
c6e69ffae4 | |||
b24f368d3f | |||
4dc8351f56 | |||
f3ab8199a5 | |||
28d953933a | |||
77d9ae92f6 | |||
7d00754587 | |||
982b5eb698 | |||
20a9c25d70 | |||
eebed9944c | |||
507a192489 | |||
689dc3b9d5 | |||
d765803b83 |
@ -13,7 +13,7 @@ common:
|
|||||||
rich-contents: "Post"
|
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!"
|
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: "Reactions"
|
||||||
reaction-desc: "Easiest way to tell your emotions.\nMisskey allows you to add various type of reactions to other’s 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 other’s post. The emotional experience on Misskey will never be on other SNSs which only able to push “likes”."
|
||||||
ui: "Interface"
|
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."
|
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"
|
drive: "Misskey Drive"
|
||||||
|
@ -7,7 +7,7 @@ common:
|
|||||||
about-title: "Une ⭐ du fédivers."
|
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 ?"
|
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:
|
intro:
|
||||||
title: "Misskeyって?"
|
title: "C’est quoi Misskey ?"
|
||||||
about: "Misskeyはオープンソースの<b>分散型マイクロブログSNS</b>です。リッチで高度にカスタマイズできるUI、投稿へのリアクション、ファイルを一元管理できるドライブなど、先進的な機能を揃えています。また、Fediverseと呼ばれるネットワークに接続できるため、他のSNSともやり取りできます。例えば、あなたが何か投稿すると、その投稿はMisskeyだけでなく他のSNSにも伝わります。ちょうどある惑星から他の惑星に電波を発信している様子をイメージしてください。"
|
about: "Misskeyはオープンソースの<b>分散型マイクロブログSNS</b>です。リッチで高度にカスタマイズできるUI、投稿へのリアクション、ファイルを一元管理できるドライブなど、先進的な機能を揃えています。また、Fediverseと呼ばれるネットワークに接続できるため、他のSNSともやり取りできます。例えば、あなたが何か投稿すると、その投稿はMisskeyだけでなく他のSNSにも伝わります。ちょうどある惑星から他の惑星に電波を発信している様子をイメージしてください。"
|
||||||
features: "Fonctionnalités"
|
features: "Fonctionnalités"
|
||||||
rich-contents: "Notes"
|
rich-contents: "Notes"
|
||||||
@ -891,10 +891,10 @@ desktop/views/pages/welcome.vue:
|
|||||||
signin-button: "Se connecter"
|
signin-button: "Se connecter"
|
||||||
signup-button: "S'inscrire"
|
signup-button: "S'inscrire"
|
||||||
timeline: "Fil d'actualité"
|
timeline: "Fil d'actualité"
|
||||||
announcements: "お知らせ"
|
announcements: "Notices"
|
||||||
photos: "最近の画像"
|
photos: "Images récentes"
|
||||||
powered-by-misskey: "Propulsé par <b>Misskey</b>."
|
powered-by-misskey: "Propulsé par <b>Misskey</b>."
|
||||||
info: "情報"
|
info: "Informations"
|
||||||
desktop/views/pages/drive.vue:
|
desktop/views/pages/drive.vue:
|
||||||
title: "Lecteur de Misskey"
|
title: "Lecteur de Misskey"
|
||||||
desktop/views/pages/favorites.vue:
|
desktop/views/pages/favorites.vue:
|
||||||
@ -1191,7 +1191,7 @@ mobile/views/pages/settings.vue:
|
|||||||
post-style: "Style de la publication"
|
post-style: "Style de la publication"
|
||||||
post-style-standard: "Standard"
|
post-style-standard: "Standard"
|
||||||
post-style-smart: "Intelligent"
|
post-style-smart: "Intelligent"
|
||||||
notification-position: "通知の表示"
|
notification-position: "Style de notification"
|
||||||
notification-position-bottom: "en bas"
|
notification-position-bottom: "en bas"
|
||||||
notification-position-top: "en haut"
|
notification-position-top: "en haut"
|
||||||
behavior: "Comportement"
|
behavior: "Comportement"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "8.34.0",
|
"version": "8.34.3",
|
||||||
"clientVersion": "1.0.9559",
|
"clientVersion": "1.0.9572",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const langs = LANGS;
|
||||||
|
|
||||||
//#region Load settings
|
//#region Load settings
|
||||||
let settings = null;
|
let settings = null;
|
||||||
const vuex = localStorage.getItem('vuex');
|
const vuex = localStorage.getItem('vuex');
|
||||||
@ -40,10 +42,10 @@
|
|||||||
//#region Detect the user language
|
//#region Detect the user language
|
||||||
let lang = null;
|
let lang = null;
|
||||||
|
|
||||||
if (LANGS.includes(navigator.language)) {
|
if (langs.includes(navigator.language)) {
|
||||||
lang = navigator.language;
|
lang = navigator.language;
|
||||||
} else {
|
} else {
|
||||||
lang = LANGS.find(x => x.split('-')[0] == navigator.language);
|
lang = langs.find(x => x.split('-')[0] == navigator.language);
|
||||||
|
|
||||||
if (lang == null) {
|
if (lang == null) {
|
||||||
// Fallback
|
// Fallback
|
||||||
@ -52,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settings && settings.device.lang &&
|
if (settings && settings.device.lang &&
|
||||||
LANGS.includes(settings.device.lang)) {
|
langs.includes(settings.device.lang)) {
|
||||||
lang = settings.device.lang;
|
lang = settings.device.lang;
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<span v-if="visibility === 'specified'">%fa:envelope%</span>
|
<span v-if="visibility === 'specified'">%fa:envelope%</span>
|
||||||
<span v-if="visibility === 'private'">%fa:lock%</span>
|
<span v-if="visibility === 'private'">%fa:lock%</span>
|
||||||
</button>
|
</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">
|
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
|
||||||
{{ posting ? '%i18n:@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
|
{{ posting ? '%i18n:@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
|
||||||
</button>
|
</button>
|
||||||
@ -63,6 +63,7 @@ import MkVisibilityChooser from '../../../common/views/components/visibility-cho
|
|||||||
import parse from '../../../../../mfm/parse';
|
import parse from '../../../../../mfm/parse';
|
||||||
import { host } from '../../../config';
|
import { host } from '../../../config';
|
||||||
import { erase } from '../../../../../prelude/array';
|
import { erase } from '../../../../../prelude/array';
|
||||||
|
import { length } from 'stringz';
|
||||||
import parseAcct from '../../../../../misc/acct/parse';
|
import parseAcct from '../../../../../misc/acct/parse';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
@ -147,7 +148,7 @@ export default Vue.extend({
|
|||||||
canPost(): boolean {
|
canPost(): boolean {
|
||||||
return !this.posting &&
|
return !this.posting &&
|
||||||
(1 <= this.text.length || 1 <= this.files.length || this.poll || this.renote) &&
|
(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: {
|
methods: {
|
||||||
|
trimmedLength(text: string) {
|
||||||
|
return length(text.trim());
|
||||||
|
},
|
||||||
|
|
||||||
addTag(tag: string) {
|
addTag(tag: string) {
|
||||||
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<button class="cancel" @click="cancel">%fa:times%</button>
|
<button class="cancel" @click="cancel">%fa:times%</button>
|
||||||
<div>
|
<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>
|
<span class="geo" v-if="geo">%fa:map-marker-alt%</span>
|
||||||
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
|
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
|
||||||
</div>
|
</div>
|
||||||
@ -60,6 +60,7 @@ import getFace from '../../../common/scripts/get-face';
|
|||||||
import parse from '../../../../../mfm/parse';
|
import parse from '../../../../../mfm/parse';
|
||||||
import { host } from '../../../config';
|
import { host } from '../../../config';
|
||||||
import { erase } from '../../../../../prelude/array';
|
import { erase } from '../../../../../prelude/array';
|
||||||
|
import { length } from 'stringz';
|
||||||
import parseAcct from '../../../../../misc/acct/parse';
|
import parseAcct from '../../../../../misc/acct/parse';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
@ -180,6 +181,10 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
trimmedLength(text: string) {
|
||||||
|
return length(text.trim());
|
||||||
|
},
|
||||||
|
|
||||||
addTag(tag: string) {
|
addTag(tag: string) {
|
||||||
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||||
},
|
},
|
||||||
|
@ -4,6 +4,7 @@ import { pack as packUser } from './user';
|
|||||||
import { pack as packFile } from './drive-file';
|
import { pack as packFile } from './drive-file';
|
||||||
import db from '../db/mongodb';
|
import db from '../db/mongodb';
|
||||||
import MessagingHistory, { deleteMessagingHistory } from './messaging-history';
|
import MessagingHistory, { deleteMessagingHistory } from './messaging-history';
|
||||||
|
import { length } from 'stringz';
|
||||||
|
|
||||||
const MessagingMessage = db.get<IMessagingMessage>('messagingMessages');
|
const MessagingMessage = db.get<IMessagingMessage>('messagingMessages');
|
||||||
export default MessagingMessage;
|
export default MessagingMessage;
|
||||||
@ -19,7 +20,7 @@ export interface IMessagingMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isValidText(text: string): boolean {
|
export function isValidText(text: string): boolean {
|
||||||
return text.length <= 1000 && text.trim() != '';
|
return length(text.trim()) <= 1000 && text.trim() != '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,6 +2,7 @@ import * as mongo from 'mongodb';
|
|||||||
const deepcopy = require('deepcopy');
|
const deepcopy = require('deepcopy');
|
||||||
import rap from '@prezzemolo/rap';
|
import rap from '@prezzemolo/rap';
|
||||||
import db from '../db/mongodb';
|
import db from '../db/mongodb';
|
||||||
|
import { length } from 'stringz';
|
||||||
import { IUser, pack as packUser } from './user';
|
import { IUser, pack as packUser } from './user';
|
||||||
import { pack as packApp } from './app';
|
import { pack as packApp } from './app';
|
||||||
import PollVote, { deletePollVote } from './poll-vote';
|
import PollVote, { deletePollVote } from './poll-vote';
|
||||||
@ -24,11 +25,11 @@ Note.createIndex({
|
|||||||
export default Note;
|
export default Note;
|
||||||
|
|
||||||
export function isValidText(text: string): boolean {
|
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 {
|
export function isValidCw(text: string): boolean {
|
||||||
return text.length <= 100;
|
return length(text.trim()) <= 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type INote = {
|
export type INote = {
|
||||||
|
@ -36,8 +36,8 @@ async function save(path: string, name: string, type: string, hash: string, size
|
|||||||
|
|
||||||
if (config.drive && config.drive.storage == 'minio') {
|
if (config.drive && config.drive.storage == 'minio') {
|
||||||
const minio = new Minio.Client(config.drive.config);
|
const minio = new Minio.Client(config.drive.config);
|
||||||
const key = `${config.drive.prefix}/${uuid.v4()}/${name}`;
|
const key = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}`;
|
||||||
const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${name}.thumbnail.jpg`;
|
const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${encodeURIComponent(name)}.thumbnail.jpg`;
|
||||||
|
|
||||||
const baseUrl = config.drive.baseUrl
|
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 }`;
|
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? `:${config.drive.config.port}` : '' }/${ config.drive.bucket }`;
|
||||||
|
@ -278,7 +278,6 @@ async function publish(user: IUser, note: INote, noteObj: any, reply: INote, ren
|
|||||||
} else {
|
} else {
|
||||||
// Publish event to myself's stream
|
// Publish event to myself's stream
|
||||||
publishUserStream(note.userId, 'note', noteObj);
|
publishUserStream(note.userId, 'note', noteObj);
|
||||||
publishHybridTimelineStream(note.userId, noteObj);
|
|
||||||
|
|
||||||
// Publish note to local and hybrid timeline stream
|
// Publish note to local and hybrid timeline stream
|
||||||
if (note.visibility != 'home') {
|
if (note.visibility != 'home') {
|
||||||
@ -287,6 +286,9 @@ async function publish(user: IUser, note: INote, noteObj: any, reply: INote, ren
|
|||||||
|
|
||||||
if (note.visibility == 'public') {
|
if (note.visibility == 'public') {
|
||||||
publishHybridTimelineStream(null, noteObj);
|
publishHybridTimelineStream(null, noteObj);
|
||||||
|
} else {
|
||||||
|
// Publish event to myself's stream
|
||||||
|
publishHybridTimelineStream(note.userId, noteObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,8 @@ export default async function(user: IUser, note: INote) {
|
|||||||
tags: [],
|
tags: [],
|
||||||
fileIds: [],
|
fileIds: [],
|
||||||
poll: null,
|
poll: null,
|
||||||
geo: null
|
geo: null,
|
||||||
|
cw: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user