1
0
forked from mirror/misskey

Merge branch 'develop'

This commit is contained in:
syuilo 2023-01-23 20:13:46 +09:00
commit a5df2b0293
14 changed files with 166 additions and 76 deletions

View File

@ -9,6 +9,17 @@
You should also include the user name that made the change. You should also include the user name that made the change.
--> -->
## 13.2.0 (2021/01/23)
### Improvements
- onlyServer / onlyQueue オプションを復活
- 他人の実績閲覧時は獲得条件を表示しないように
- アニメーション減らすオプション有効時はリアクションのアニメーションを無効に
- カスタム絵文字一覧のパフォーマンスを改善
### Bugfixes
- Aiscript: button is not defined
## 13.1.7 (2023/01/22) ## 13.1.7 (2023/01/22)
### Improvements ### Improvements

View File

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "13.1.8", "version": "13.2.0",
"codename": "nasubi", "codename": "nasubi",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -23,9 +23,9 @@
"@tensorflow/tfjs-node": "4.1.0" "@tensorflow/tfjs-node": "4.1.0"
}, },
"dependencies": { "dependencies": {
"@bull-board/api": "^4.10.2", "@bull-board/api": "^4.11.0",
"@bull-board/fastify": "^4.10.2", "@bull-board/fastify": "^4.11.0",
"@bull-board/ui": "^4.10.2", "@bull-board/ui": "^4.11.0",
"@discordapp/twemoji": "14.0.2", "@discordapp/twemoji": "14.0.2",
"@fastify/accepts": "4.1.0", "@fastify/accepts": "4.1.0",
"@fastify/cookie": "^8.3.0", "@fastify/cookie": "^8.3.0",
@ -120,7 +120,7 @@
"typeorm": "0.3.11", "typeorm": "0.3.11",
"typescript": "4.9.4", "typescript": "4.9.4",
"ulid": "2.3.0", "ulid": "2.3.0",
"undici": "^5.15.1", "undici": "^5.16.0",
"unzipper": "0.10.11", "unzipper": "0.10.11",
"uuid": "9.0.0", "uuid": "9.0.0",
"vary": "1.1.2", "vary": "1.1.2",

View File

@ -0,0 +1,35 @@
import { NestFactory } from '@nestjs/core';
import { ChartManagementService } from '@/core/chart/ChartManagementService.js';
import { QueueProcessorService } from '@/queue/QueueProcessorService.js';
import { NestLogger } from '@/NestLogger.js';
import { QueueProcessorModule } from '@/queue/QueueProcessorModule.js';
import { JanitorService } from '@/daemons/JanitorService.js';
import { QueueStatsService } from '@/daemons/QueueStatsService.js';
import { ServerStatsService } from '@/daemons/ServerStatsService.js';
import { ServerService } from '@/server/ServerService.js';
import { MainModule } from '@/MainModule.js';
export async function server() {
const app = await NestFactory.createApplicationContext(MainModule, {
logger: new NestLogger(),
});
app.enableShutdownHooks();
const serverService = app.get(ServerService);
serverService.launch();
app.get(ChartManagementService).start();
app.get(JanitorService).start();
app.get(QueueStatsService).start();
app.get(ServerStatsService).start();
}
export async function jobQueue() {
const jobQueue = await NestFactory.createApplicationContext(QueueProcessorModule, {
logger: new NestLogger(),
});
jobQueue.enableShutdownHooks();
jobQueue.get(QueueProcessorService).start();
jobQueue.get(ChartManagementService).start();
}

View File

@ -6,21 +6,12 @@ import cluster from 'node:cluster';
import chalk from 'chalk'; import chalk from 'chalk';
import chalkTemplate from 'chalk-template'; import chalkTemplate from 'chalk-template';
import semver from 'semver'; import semver from 'semver';
import { NestFactory } from '@nestjs/core';
import Logger from '@/logger.js'; import Logger from '@/logger.js';
import { loadConfig } from '@/config.js'; import { loadConfig } from '@/config.js';
import type { Config } from '@/config.js'; import type { Config } from '@/config.js';
import { lessThan } from '@/misc/prelude/array.js';
import { showMachineInfo } from '@/misc/show-machine-info.js'; import { showMachineInfo } from '@/misc/show-machine-info.js';
import { DaemonModule } from '@/daemons/DaemonModule.js'; import { envOption } from '@/env.js';
import { JanitorService } from '@/daemons/JanitorService.js'; import { jobQueue, server } from './common.js';
import { QueueStatsService } from '@/daemons/QueueStatsService.js';
import { ServerStatsService } from '@/daemons/ServerStatsService.js';
import { NestLogger } from '@/NestLogger.js';
import { ChartManagementService } from '@/core/chart/ChartManagementService.js';
import { ServerService } from '@/server/ServerService.js';
import { MainModule } from '@/MainModule.js';
import { envOption } from '../env.js';
const _filename = fileURLToPath(import.meta.url); const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename); const _dirname = dirname(_filename);
@ -73,14 +64,13 @@ export async function masterMain() {
process.exit(1); process.exit(1);
} }
const app = await NestFactory.createApplicationContext(MainModule, { if (envOption.onlyServer) {
logger: new NestLogger(), await server();
}); } else if (envOption.onlyQueue) {
app.enableShutdownHooks(); await jobQueue();
} else {
// start server await server();
const serverService = app.get(ServerService); }
serverService.launch();
bootLogger.succ('Misskey initialized'); bootLogger.succ('Misskey initialized');
@ -89,11 +79,6 @@ export async function masterMain() {
} }
bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true); bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true);
app.get(ChartManagementService).start();
app.get(JanitorService).start();
app.get(QueueStatsService).start();
app.get(ServerStatsService).start();
} }
function showEnvironment(): void { function showEnvironment(): void {

View File

@ -1,23 +1,18 @@
import cluster from 'node:cluster'; import cluster from 'node:cluster';
import { NestFactory } from '@nestjs/core'; import { envOption } from '@/env.js';
import { ChartManagementService } from '@/core/chart/ChartManagementService.js'; import { jobQueue, server } from './common.js';
import { QueueProcessorService } from '@/queue/QueueProcessorService.js';
import { NestLogger } from '@/NestLogger.js';
import { QueueProcessorModule } from '@/queue/QueueProcessorModule.js';
/** /**
* Init worker process * Init worker process
*/ */
export async function workerMain() { export async function workerMain() {
const jobQueue = await NestFactory.createApplicationContext(QueueProcessorModule, { if (envOption.onlyServer) {
logger: new NestLogger(), await server();
}); } else if (envOption.onlyQueue) {
jobQueue.enableShutdownHooks(); await jobQueue();
} else {
// start job queue await jobQueue();
jobQueue.get(QueueProcessorService).start(); }
jobQueue.get(ChartManagementService).start();
if (cluster.isWorker) { if (cluster.isWorker) {
// Send a 'ready' message to parent process // Send a 'ready' message to parent process

View File

@ -16,8 +16,8 @@
<time v-tooltip="new Date(achievement.unlockedAt).toLocaleString()">{{ new Date(achievement.unlockedAt).getFullYear() }}/{{ new Date(achievement.unlockedAt).getMonth() + 1 }}/{{ new Date(achievement.unlockedAt).getDate() }}</time> <time v-tooltip="new Date(achievement.unlockedAt).toLocaleString()">{{ new Date(achievement.unlockedAt).getFullYear() }}/{{ new Date(achievement.unlockedAt).getMonth() + 1 }}/{{ new Date(achievement.unlockedAt).getDate() }}</time>
</span> </span>
</div> </div>
<div :class="$style.description">{{ i18n.ts._achievements._types['_' + achievement.name].description }}</div> <div :class="$style.description">{{ withDescription ? i18n.ts._achievements._types['_' + achievement.name].description : '???' }}</div>
<div v-if="i18n.ts._achievements._types['_' + achievement.name].flavor" :class="$style.flavor">{{ i18n.ts._achievements._types['_' + achievement.name].flavor }}</div> <div v-if="i18n.ts._achievements._types['_' + achievement.name].flavor && withDescription" :class="$style.flavor">{{ i18n.ts._achievements._types['_' + achievement.name].flavor }}</div>
</div> </div>
</div> </div>
<template v-if="withLocked"> <template v-if="withLocked">
@ -49,8 +49,10 @@ import { ACHIEVEMENT_TYPES, ACHIEVEMENT_BADGES, claimAchievement } from '@/scrip
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
user: misskey.entities.User; user: misskey.entities.User;
withLocked: boolean; withLocked: boolean;
withDescription: boolean;
}>(), { }>(), {
withLocked: true, withLocked: true,
withDescription: true,
}); });
let achievements = $ref(); let achievements = $ref();

View File

@ -21,6 +21,7 @@ import { useTooltip } from '@/scripts/use-tooltip';
import { $i } from '@/account'; import { $i } from '@/account';
import MkReactionEffect from '@/components/MkReactionEffect.vue'; import MkReactionEffect from '@/components/MkReactionEffect.vue';
import { claimAchievement } from '@/scripts/achievements'; import { claimAchievement } from '@/scripts/achievements';
import { defaultStore } from '@/store';
const props = defineProps<{ const props = defineProps<{
reaction: string; reaction: string;
@ -61,6 +62,7 @@ const toggleReaction = () => {
const anime = () => { const anime = () => {
if (document.hidden) return; if (document.hidden) return;
if (!defaultStore.state.animation) return;
const rect = buttonEl.value.getBoundingClientRect(); const rect = buttonEl.value.getBoundingClientRect();
const x = rect.left + 16; const x = rect.left + 16;

View File

@ -40,11 +40,31 @@
</FormSection> </FormSection>
<FormSection> <FormSection>
<template #label>{{ i18n.ts._aboutMisskey.contributors }}</template> <template #label>{{ i18n.ts._aboutMisskey.contributors }}</template>
<div class="_formLinksGrid"> <div :class="$style.contributors">
<FormLink to="https://github.com/syuilo" external>@syuilo</FormLink> <a href="https://github.com/syuilo" target="_blank" :class="$style.contributor">
<FormLink to="https://github.com/tamaina" external>@tamaina</FormLink> <img src="https://avatars.githubusercontent.com/u/4439005?v=4" :class="$style.contributorAvatar">
<FormLink to="https://github.com/acid-chicken" external>@acid-chicken</FormLink> <span :class="$style.contributorUsername">@syuilo</span>
<FormLink to="https://github.com/rinsuki" external>@rinsuki</FormLink> </a>
<a href="https://github.com/tamaina" target="_blank" :class="$style.contributor">
<img src="https://avatars.githubusercontent.com/u/7973572?v=4" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@tamaina</span>
</a>
<a href="https://github.com/acid-chicken" target="_blank" :class="$style.contributor">
<img src="https://avatars.githubusercontent.com/u/20679825?v=4" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@acid-chicken</span>
</a>
<a href="https://github.com/rinsuki" target="_blank" :class="$style.contributor">
<img src="https://avatars.githubusercontent.com/u/6533808?v=4" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@rinsuki</span>
</a>
<a href="https://github.com/mei23" target="_blank" :class="$style.contributor">
<img src="https://avatars.githubusercontent.com/u/30769358?v=4" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@mei23</span>
</a>
<a href="https://github.com/robflop" target="_blank" :class="$style.contributor">
<img src="https://avatars.githubusercontent.com/u/8159402?v=4" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">@robflop</span>
</a>
</div> </div>
<template #caption><MkLink url="https://github.com/misskey-dev/misskey/graphs/contributors">{{ i18n.ts._aboutMisskey.allContributors }}</MkLink></template> <template #caption><MkLink url="https://github.com/misskey-dev/misskey/graphs/contributors">{{ i18n.ts._aboutMisskey.allContributors }}</MkLink></template>
</FormSection> </FormSection>
@ -295,3 +315,38 @@ definePageMetadata({
} }
} }
</style> </style>
<style lang="scss" module>
.contributors {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 12px;
}
.contributor {
display: flex;
align-items: center;
padding: 12px;
background: var(--buttonBg);
border-radius: 6px;
&:hover {
text-decoration: none;
background: var(--buttonHoverBg);
}
&.active {
color: var(--accent);
background: var(--buttonHoverBg);
}
}
.contributorAvatar {
width: 30px;
border-radius: 100%;
}
.contributorUsername {
margin-left: 12px;
}
</style>

View File

@ -38,7 +38,7 @@
<template #label>Access key</template> <template #label>Access key</template>
</MkInput> </MkInput>
<MkInput v-model="objectStorageSecretKey"> <MkInput v-model="objectStorageSecretKey" type="password">
<template #prefix><i class="ti ti-key"></i></template> <template #prefix><i class="ti ti-key"></i></template>
<template #label>Secret key</template> <template #label>Secret key</template>
</MkInput> </MkInput>

View File

@ -1,6 +1,6 @@
<template> <template>
<button class="zuvgdzyu _button" @click="menu"> <button class="zuvgdzyu _button" @click="menu">
<img :src="`/emoji/${emoji.name}.webp`" class="img" loading="lazy"/> <img :src="emoji.url" class="img" loading="lazy"/>
<div class="body"> <div class="body">
<div class="name _monospace">{{ emoji.name }}</div> <div class="name _monospace">{{ emoji.name }}</div>
<div class="info">{{ emoji.aliases.join(' ') }}</div> <div class="info">{{ emoji.aliases.join(' ') }}</div>
@ -15,7 +15,12 @@ import copyToClipboard from '@/scripts/copy-to-clipboard';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
const props = defineProps<{ const props = defineProps<{
emoji: Record<string, unknown>; // TODO emoji: {
name: string;
aliases: string[];
category: string;
url: string;
};
}>(); }>();
function menu(ev) { function menu(ev) {

View File

@ -1,6 +1,6 @@
<template> <template>
<MkSpacer :content-max="1200"> <MkSpacer :content-max="1200">
<MkAchievements :user="user" :with-locked="false"/> <MkAchievements :user="user" :with-locked="false" :with-description="$i != null && (props.user.id === $i.id)"/>
</MkSpacer> </MkSpacer>
</template> </template>

View File

@ -303,7 +303,7 @@ function getButtonOptions(def: values.Value | undefined, call: (fn: values.VFn,
if (primary) utils.assertBoolean(primary); if (primary) utils.assertBoolean(primary);
const rounded = def.value.get('rounded'); const rounded = def.value.get('rounded');
if (rounded) utils.assertBoolean(rounded); if (rounded) utils.assertBoolean(rounded);
const disabled = button.value.get('disabled'); const disabled = def.value.get('disabled');
if (disabled) utils.assertBoolean(disabled); if (disabled) utils.assertBoolean(disabled);
return { return {

42
pnpm-lock.yaml generated
View File

@ -48,9 +48,9 @@ importers:
packages/backend: packages/backend:
specifiers: specifiers:
'@bull-board/api': ^4.10.2 '@bull-board/api': ^4.11.0
'@bull-board/fastify': ^4.10.2 '@bull-board/fastify': ^4.11.0
'@bull-board/ui': ^4.10.2 '@bull-board/ui': ^4.11.0
'@discordapp/twemoji': 14.0.2 '@discordapp/twemoji': 14.0.2
'@fastify/accepts': 4.1.0 '@fastify/accepts': 4.1.0
'@fastify/cookie': ^8.3.0 '@fastify/cookie': ^8.3.0
@ -202,7 +202,7 @@ importers:
typeorm: 0.3.11 typeorm: 0.3.11
typescript: 4.9.4 typescript: 4.9.4
ulid: 2.3.0 ulid: 2.3.0
undici: ^5.15.1 undici: ^5.16.0
unzipper: 0.10.11 unzipper: 0.10.11
uuid: 9.0.0 uuid: 9.0.0
vary: 1.1.2 vary: 1.1.2
@ -211,9 +211,9 @@ importers:
ws: 8.12.0 ws: 8.12.0
xev: 3.0.2 xev: 3.0.2
dependencies: dependencies:
'@bull-board/api': 4.10.2 '@bull-board/api': 4.11.0
'@bull-board/fastify': 4.10.2 '@bull-board/fastify': 4.11.0
'@bull-board/ui': 4.10.2 '@bull-board/ui': 4.11.0
'@discordapp/twemoji': 14.0.2 '@discordapp/twemoji': 14.0.2
'@fastify/accepts': 4.1.0 '@fastify/accepts': 4.1.0
'@fastify/cookie': 8.3.0 '@fastify/cookie': 8.3.0
@ -308,7 +308,7 @@ importers:
typeorm: 0.3.11_ioredis@4.28.5+pg@8.8.0 typeorm: 0.3.11_ioredis@4.28.5+pg@8.8.0
typescript: 4.9.4 typescript: 4.9.4
ulid: 2.3.0 ulid: 2.3.0
undici: 5.15.1 undici: 5.16.0
unzipper: 0.10.11 unzipper: 0.10.11
uuid: 9.0.0 uuid: 9.0.0
vary: 1.1.2 vary: 1.1.2
@ -915,17 +915,17 @@ packages:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true dev: true
/@bull-board/api/4.10.2: /@bull-board/api/4.11.0:
resolution: {integrity: sha512-lRHo0A7hsz71aOx1ZN0SmLLWfSuvKdL6EZ4imlgo5SuXGozybvlRc5KPIJU2/E1w5meoUGi+nFezBwp1gT/SMw==} resolution: {integrity: sha512-qFnG63s3BkaslsNnXYagEUcdeK9SijZTJ+I4vMU+OiZt9VlKh01X1KjNlqjF9guvWcjk+Rg8UOMm0fWwM6PK6g==}
dependencies: dependencies:
redis-info: 3.1.0 redis-info: 3.1.0
dev: false dev: false
/@bull-board/fastify/4.10.2: /@bull-board/fastify/4.11.0:
resolution: {integrity: sha512-yp/TlfyfMBgR6vibyCUBOTKn2BFlBSLxkJxzlvIcMDs2Vl3PMXMs4YoCr2o3m+dXxSNzpTfomxAc5XQfJdp0VQ==} resolution: {integrity: sha512-G4sAFVx5kGT5T/F2gL91RjZ2+YrMHNrLWoVo/QfHMcZe3RoOP4PpbOLgLC/O67KYn3JK6t8ysGyyP035OSJ2HA==}
dependencies: dependencies:
'@bull-board/api': 4.10.2 '@bull-board/api': 4.11.0
'@bull-board/ui': 4.10.2 '@bull-board/ui': 4.11.0
'@fastify/static': 6.6.1 '@fastify/static': 6.6.1
'@fastify/view': 7.4.0 '@fastify/view': 7.4.0
ejs: 3.1.8 ejs: 3.1.8
@ -933,10 +933,10 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@bull-board/ui/4.10.2: /@bull-board/ui/4.11.0:
resolution: {integrity: sha512-vaHGojG5D3xjnaed3nwOaLy4Y06RgDJdYRaFR5E06SjZ0vOvjVYGD6s4cykK512Aw/ElFhKDPwzhf8BvpwAtDQ==} resolution: {integrity: sha512-/Yb7x/3tWxysA2jRDQ89xEPnscvfGQdf4MmDRzWH5lDkVmL8b1HvZAQxLrHcxwB6y16oorQTf/1KbRZl0rJDHg==}
dependencies: dependencies:
'@bull-board/api': 4.10.2 '@bull-board/api': 4.11.0
dev: false dev: false
/@chainsafe/is-ip/2.0.1: /@chainsafe/is-ip/2.0.1:
@ -1077,7 +1077,7 @@ packages:
dependencies: dependencies:
ky: 0.30.0 ky: 0.30.0
ky-universal: 0.10.1_ky@0.30.0 ky-universal: 0.10.1_ky@0.30.0
undici: 5.15.1 undici: 5.16.0
transitivePeerDependencies: transitivePeerDependencies:
- web-streams-polyfill - web-streams-polyfill
dev: false dev: false
@ -1402,7 +1402,7 @@ packages:
fastify-plugin: 4.5.0 fastify-plugin: 4.5.0
pump: 3.0.0 pump: 3.0.0
tiny-lru: 10.0.1 tiny-lru: 10.0.1
undici: 5.15.1 undici: 5.16.0
dev: false dev: false
/@fastify/send/1.0.0: /@fastify/send/1.0.0:
@ -13541,8 +13541,8 @@ packages:
undertaker-registry: 1.0.1 undertaker-registry: 1.0.1
dev: false dev: false
/undici/5.15.1: /undici/5.16.0:
resolution: {integrity: sha512-XLk8g0WAngdvFqTI+VKfBtM4YWXgdxkf1WezC771Es0Dd+Pm1KmNx8t93WTC+Hh9tnghmVxkclU1HN+j+CvIUA==} resolution: {integrity: sha512-KWBOXNv6VX+oJQhchXieUznEmnJMqgXMbs0xxH2t8q/FUAWSJvOSr/rMaZKnX5RIVq7JDn0JbP4BOnKG2SGXLQ==}
engines: {node: '>=12.18'} engines: {node: '>=12.18'}
dependencies: dependencies:
busboy: 1.6.0 busboy: 1.6.0