Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
ed9fef408e
@ -12,11 +12,15 @@ You should also include the user name that made the change.
|
|||||||
|
|
||||||
## 12.x.x (unreleased)
|
## 12.x.x (unreleased)
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- ノートの最大文字数を設定できる機能が廃止され、デフォルトで一律3000文字になりました
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
-
|
-
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- Client: リアクションピッカーの高さが低くなったまま戻らないことがあるのを修正 @syuilo
|
- Client: リアクションピッカーの高さが低くなったまま戻らないことがあるのを修正 @syuilo
|
||||||
|
- Client: タッチ操作だとウィジェットの編集がしにくいのを修正 @xianonn
|
||||||
|
|
||||||
## 12.107.0 (2022/02/12)
|
## 12.107.0 (2022/02/12)
|
||||||
|
|
||||||
|
@ -422,7 +422,6 @@ next: "次"
|
|||||||
retype: "再入力"
|
retype: "再入力"
|
||||||
noteOf: "{user}のノート"
|
noteOf: "{user}のノート"
|
||||||
inviteToGroup: "グループに招待"
|
inviteToGroup: "グループに招待"
|
||||||
maxNoteTextLength: "ノートの文字数制限"
|
|
||||||
quoteAttached: "引用付き"
|
quoteAttached: "引用付き"
|
||||||
quoteQuestion: "引用として添付しますか?"
|
quoteQuestion: "引用として添付しますか?"
|
||||||
noMessagesYet: "まだチャットはありません"
|
noMessagesYet: "まだチャットはありません"
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
const { MigrationInterface, QueryRunner } = require("typeorm");
|
||||||
|
|
||||||
|
module.exports = class removeMaxNoteTextLength1645340161439 {
|
||||||
|
name = 'removeMaxNoteTextLength1645340161439'
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "maxNoteTextLength"`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" ADD "maxNoteTextLength" integer NOT NULL DEFAULT '500'`);
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
export const MAX_NOTE_TEXT_LENGTH = 3000;
|
||||||
|
|
||||||
export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min
|
export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min
|
||||||
export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days
|
export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days
|
||||||
|
|
||||||
|
@ -205,12 +205,6 @@ export class Meta {
|
|||||||
})
|
})
|
||||||
public remoteDriveCapacityMb: number;
|
public remoteDriveCapacityMb: number;
|
||||||
|
|
||||||
@Column('integer', {
|
|
||||||
default: 500,
|
|
||||||
comment: 'Max allowed note text length in characters',
|
|
||||||
})
|
|
||||||
public maxNoteTextLength: number;
|
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column('varchar', {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
@ -36,7 +36,6 @@ export const paramDef = {
|
|||||||
logoImageUrl: { type: 'string', nullable: true },
|
logoImageUrl: { type: 'string', nullable: true },
|
||||||
name: { type: 'string', nullable: true },
|
name: { type: 'string', nullable: true },
|
||||||
description: { type: 'string', nullable: true },
|
description: { type: 'string', nullable: true },
|
||||||
maxNoteTextLength: { type: 'integer', maximum: 8192 },
|
|
||||||
localDriveCapacityMb: { type: 'integer' },
|
localDriveCapacityMb: { type: 'integer' },
|
||||||
remoteDriveCapacityMb: { type: 'integer' },
|
remoteDriveCapacityMb: { type: 'integer' },
|
||||||
cacheRemoteFiles: { type: 'boolean' },
|
cacheRemoteFiles: { type: 'boolean' },
|
||||||
@ -164,10 +163,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
set.description = ps.description;
|
set.description = ps.description;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.maxNoteTextLength) {
|
|
||||||
set.maxNoteTextLength = ps.maxNoteTextLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ps.localDriveCapacityMb !== undefined) {
|
if (ps.localDriveCapacityMb !== undefined) {
|
||||||
set.localDriveCapacityMb = ps.localDriveCapacityMb;
|
set.localDriveCapacityMb = ps.localDriveCapacityMb;
|
||||||
}
|
}
|
||||||
|
@ -138,11 +138,6 @@ export const meta = {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: true,
|
optional: false, nullable: true,
|
||||||
},
|
},
|
||||||
maxNoteTextLength: {
|
|
||||||
type: 'number',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
default: 500,
|
|
||||||
},
|
|
||||||
emojis: {
|
emojis: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
@ -506,7 +501,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||||||
iconUrl: instance.iconUrl,
|
iconUrl: instance.iconUrl,
|
||||||
backgroundImageUrl: instance.backgroundImageUrl,
|
backgroundImageUrl: instance.backgroundImageUrl,
|
||||||
logoImageUrl: instance.logoImageUrl,
|
logoImageUrl: instance.logoImageUrl,
|
||||||
maxNoteTextLength: Math.min(instance.maxNoteTextLength, DB_MAX_NOTE_TEXT_LENGTH),
|
|
||||||
emojis: await Emojis.packMany(emojis),
|
emojis: await Emojis.packMany(emojis),
|
||||||
ads: ads.map(ad => ({
|
ads: ads.map(ad => ({
|
||||||
id: ad.id,
|
id: ad.id,
|
||||||
|
@ -1,24 +1,14 @@
|
|||||||
import ms from 'ms';
|
import ms from 'ms';
|
||||||
import { length } from 'stringz';
|
|
||||||
import create from '@/services/note/create';
|
import create from '@/services/note/create';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
import { fetchMeta } from '@/misc/fetch-meta';
|
|
||||||
import { ApiError } from '../../error';
|
import { ApiError } from '../../error';
|
||||||
import { User } from '@/models/entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index';
|
import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index';
|
||||||
import { DriveFile } from '@/models/entities/drive-file';
|
import { DriveFile } from '@/models/entities/drive-file';
|
||||||
import { Note } from '@/models/entities/note';
|
import { Note } from '@/models/entities/note';
|
||||||
import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits';
|
|
||||||
import { noteVisibilities } from '../../../../types';
|
import { noteVisibilities } from '../../../../types';
|
||||||
import { Channel } from '@/models/entities/channel';
|
import { Channel } from '@/models/entities/channel';
|
||||||
|
import { MAX_NOTE_TEXT_LENGTH } from '@/const';
|
||||||
let maxNoteTextLength = 500;
|
|
||||||
|
|
||||||
setInterval(() => {
|
|
||||||
fetchMeta().then(m => {
|
|
||||||
maxNoteTextLength = m.maxNoteTextLength;
|
|
||||||
});
|
|
||||||
}, 3000);
|
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['notes'],
|
tags: ['notes'],
|
||||||
@ -102,7 +92,7 @@ export const paramDef = {
|
|||||||
visibleUserIds: { type: 'array', uniqueItems: true, items: {
|
visibleUserIds: { type: 'array', uniqueItems: true, items: {
|
||||||
type: 'string', format: 'misskey:id',
|
type: 'string', format: 'misskey:id',
|
||||||
} },
|
} },
|
||||||
text: { type: 'string', nullable: true, maxLength: 3000, default: null },
|
text: { type: 'string', nullable: true, maxLength: MAX_NOTE_TEXT_LENGTH, default: null },
|
||||||
cw: { type: 'string', nullable: true, maxLength: 100 },
|
cw: { type: 'string', nullable: true, maxLength: 100 },
|
||||||
localOnly: { type: 'boolean', default: false },
|
localOnly: { type: 'boolean', default: false },
|
||||||
noExtractMentions: { type: 'boolean', default: false },
|
noExtractMentions: { type: 'boolean', default: false },
|
||||||
|
@ -3,6 +3,7 @@ import config from '@/config/index';
|
|||||||
import { fetchMeta } from '@/misc/fetch-meta';
|
import { fetchMeta } from '@/misc/fetch-meta';
|
||||||
import { Users, Notes } from '@/models/index';
|
import { Users, Notes } from '@/models/index';
|
||||||
import { MoreThan } from 'typeorm';
|
import { MoreThan } from 'typeorm';
|
||||||
|
import { MAX_NOTE_TEXT_LENGTH } from '@/const';
|
||||||
|
|
||||||
const router = new Router();
|
const router = new Router();
|
||||||
|
|
||||||
@ -69,7 +70,7 @@ const nodeinfo2 = async () => {
|
|||||||
emailRequiredForSignup: meta.emailRequiredForSignup,
|
emailRequiredForSignup: meta.emailRequiredForSignup,
|
||||||
enableHcaptcha: meta.enableHcaptcha,
|
enableHcaptcha: meta.enableHcaptcha,
|
||||||
enableRecaptcha: meta.enableRecaptcha,
|
enableRecaptcha: meta.enableRecaptcha,
|
||||||
maxNoteTextLength: meta.maxNoteTextLength,
|
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH,
|
||||||
enableTwitterIntegration: meta.enableTwitterIntegration,
|
enableTwitterIntegration: meta.enableTwitterIntegration,
|
||||||
enableGithubIntegration: meta.enableGithubIntegration,
|
enableGithubIntegration: meta.enableGithubIntegration,
|
||||||
enableDiscordIntegration: meta.enableDiscordIntegration,
|
enableDiscordIntegration: meta.enableDiscordIntegration,
|
||||||
|
@ -12,13 +12,14 @@
|
|||||||
<XDraggable
|
<XDraggable
|
||||||
v-model="widgets_"
|
v-model="widgets_"
|
||||||
item-key="id"
|
item-key="id"
|
||||||
|
handle=".handle"
|
||||||
animation="150"
|
animation="150"
|
||||||
>
|
>
|
||||||
<template #item="{element}">
|
<template #item="{element}">
|
||||||
<div class="customize-container">
|
<div class="customize-container">
|
||||||
<button class="config _button" @click.prevent.stop="configWidget(element.id)"><i class="fas fa-cog"></i></button>
|
<button class="config _button" @click.prevent.stop="configWidget(element.id)"><i class="fas fa-cog"></i></button>
|
||||||
<button class="remove _button" @click.prevent.stop="removeWidget(element)"><i class="fas fa-times"></i></button>
|
<button class="remove _button" @click.prevent.stop="removeWidget(element)"><i class="fas fa-times"></i></button>
|
||||||
<component :ref="el => widgetRefs[element.id] = el" :is="`mkw-${element.name}`" :widget="element" @updateProps="updateWidget(element.id, $event)"/>
|
<component class="handle" :ref="el => widgetRefs[element.id] = el" :is="`mkw-${element.name}`" :widget="element" @updateProps="updateWidget(element.id, $event)"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</XDraggable>
|
</XDraggable>
|
||||||
@ -121,10 +122,6 @@ export default defineComponent({
|
|||||||
position: relative;
|
position: relative;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
|
|
||||||
> *:not(.remove):not(.config) {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
> .config,
|
> .config,
|
||||||
> .remove {
|
> .remove {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -52,11 +52,6 @@
|
|||||||
<template #caption>{{ $ts.pinnedUsersDescription }}</template>
|
<template #caption>{{ $ts.pinnedUsersDescription }}</template>
|
||||||
</FormTextarea>
|
</FormTextarea>
|
||||||
|
|
||||||
<FormInput v-model="maxNoteTextLength" type="number" class="_formBlock">
|
|
||||||
<template #prefix><i class="fas fa-pencil-alt"></i></template>
|
|
||||||
<template #label>{{ $ts.maxNoteTextLength }}</template>
|
|
||||||
</FormInput>
|
|
||||||
|
|
||||||
<FormSection>
|
<FormSection>
|
||||||
<FormSwitch v-model="enableRegistration" class="_formBlock">
|
<FormSwitch v-model="enableRegistration" class="_formBlock">
|
||||||
<template #label>{{ $ts.enableRegistration }}</template>
|
<template #label>{{ $ts.enableRegistration }}</template>
|
||||||
@ -186,7 +181,6 @@ export default defineComponent({
|
|||||||
bannerUrl: null,
|
bannerUrl: null,
|
||||||
backgroundImageUrl: null,
|
backgroundImageUrl: null,
|
||||||
themeColor: null,
|
themeColor: null,
|
||||||
maxNoteTextLength: 0,
|
|
||||||
enableLocalTimeline: false,
|
enableLocalTimeline: false,
|
||||||
enableGlobalTimeline: false,
|
enableGlobalTimeline: false,
|
||||||
pinnedUsers: '',
|
pinnedUsers: '',
|
||||||
@ -216,7 +210,6 @@ export default defineComponent({
|
|||||||
this.themeColor = meta.themeColor;
|
this.themeColor = meta.themeColor;
|
||||||
this.maintainerName = meta.maintainerName;
|
this.maintainerName = meta.maintainerName;
|
||||||
this.maintainerEmail = meta.maintainerEmail;
|
this.maintainerEmail = meta.maintainerEmail;
|
||||||
this.maxNoteTextLength = meta.maxNoteTextLength;
|
|
||||||
this.enableLocalTimeline = !meta.disableLocalTimeline;
|
this.enableLocalTimeline = !meta.disableLocalTimeline;
|
||||||
this.enableGlobalTimeline = !meta.disableGlobalTimeline;
|
this.enableGlobalTimeline = !meta.disableGlobalTimeline;
|
||||||
this.pinnedUsers = meta.pinnedUsers.join('\n');
|
this.pinnedUsers = meta.pinnedUsers.join('\n');
|
||||||
@ -244,7 +237,6 @@ export default defineComponent({
|
|||||||
themeColor: this.themeColor === '' ? null : this.themeColor,
|
themeColor: this.themeColor === '' ? null : this.themeColor,
|
||||||
maintainerName: this.maintainerName,
|
maintainerName: this.maintainerName,
|
||||||
maintainerEmail: this.maintainerEmail,
|
maintainerEmail: this.maintainerEmail,
|
||||||
maxNoteTextLength: this.maxNoteTextLength,
|
|
||||||
disableLocalTimeline: !this.enableLocalTimeline,
|
disableLocalTimeline: !this.enableLocalTimeline,
|
||||||
disableGlobalTimeline: !this.enableGlobalTimeline,
|
disableGlobalTimeline: !this.enableGlobalTimeline,
|
||||||
pinnedUsers: this.pinnedUsers.split('\n'),
|
pinnedUsers: this.pinnedUsers.split('\n'),
|
||||||
|
Loading…
Reference in New Issue
Block a user