mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 19:23:08 +02:00
Merge branch 'develop'
This commit is contained in:
commit
a5df2b0293
14 changed files with 166 additions and 76 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -9,6 +9,17 @@
|
|||
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)
|
||||
|
||||
### Improvements
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "misskey",
|
||||
"version": "13.1.8",
|
||||
"version": "13.2.0",
|
||||
"codename": "nasubi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
"@tensorflow/tfjs-node": "4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bull-board/api": "^4.10.2",
|
||||
"@bull-board/fastify": "^4.10.2",
|
||||
"@bull-board/ui": "^4.10.2",
|
||||
"@bull-board/api": "^4.11.0",
|
||||
"@bull-board/fastify": "^4.11.0",
|
||||
"@bull-board/ui": "^4.11.0",
|
||||
"@discordapp/twemoji": "14.0.2",
|
||||
"@fastify/accepts": "4.1.0",
|
||||
"@fastify/cookie": "^8.3.0",
|
||||
|
@ -120,7 +120,7 @@
|
|||
"typeorm": "0.3.11",
|
||||
"typescript": "4.9.4",
|
||||
"ulid": "2.3.0",
|
||||
"undici": "^5.15.1",
|
||||
"undici": "^5.16.0",
|
||||
"unzipper": "0.10.11",
|
||||
"uuid": "9.0.0",
|
||||
"vary": "1.1.2",
|
||||
|
|
35
packages/backend/src/boot/common.ts
Normal file
35
packages/backend/src/boot/common.ts
Normal 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();
|
||||
}
|
|
@ -6,21 +6,12 @@ import cluster from 'node:cluster';
|
|||
import chalk from 'chalk';
|
||||
import chalkTemplate from 'chalk-template';
|
||||
import semver from 'semver';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import Logger from '@/logger.js';
|
||||
import { loadConfig } 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 { DaemonModule } from '@/daemons/DaemonModule.js';
|
||||
import { JanitorService } from '@/daemons/JanitorService.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';
|
||||
import { envOption } from '@/env.js';
|
||||
import { jobQueue, server } from './common.js';
|
||||
|
||||
const _filename = fileURLToPath(import.meta.url);
|
||||
const _dirname = dirname(_filename);
|
||||
|
@ -73,14 +64,13 @@ export async function masterMain() {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
const app = await NestFactory.createApplicationContext(MainModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
app.enableShutdownHooks();
|
||||
|
||||
// start server
|
||||
const serverService = app.get(ServerService);
|
||||
serverService.launch();
|
||||
if (envOption.onlyServer) {
|
||||
await server();
|
||||
} else if (envOption.onlyQueue) {
|
||||
await jobQueue();
|
||||
} else {
|
||||
await server();
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
app.get(ChartManagementService).start();
|
||||
app.get(JanitorService).start();
|
||||
app.get(QueueStatsService).start();
|
||||
app.get(ServerStatsService).start();
|
||||
}
|
||||
|
||||
function showEnvironment(): void {
|
||||
|
|
|
@ -1,23 +1,18 @@
|
|||
import cluster from 'node:cluster';
|
||||
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 { envOption } from '@/env.js';
|
||||
import { jobQueue, server } from './common.js';
|
||||
|
||||
/**
|
||||
* Init worker process
|
||||
*/
|
||||
export async function workerMain() {
|
||||
const jobQueue = await NestFactory.createApplicationContext(QueueProcessorModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
jobQueue.enableShutdownHooks();
|
||||
|
||||
// start job queue
|
||||
jobQueue.get(QueueProcessorService).start();
|
||||
|
||||
jobQueue.get(ChartManagementService).start();
|
||||
if (envOption.onlyServer) {
|
||||
await server();
|
||||
} else if (envOption.onlyQueue) {
|
||||
await jobQueue();
|
||||
} else {
|
||||
await jobQueue();
|
||||
}
|
||||
|
||||
if (cluster.isWorker) {
|
||||
// Send a 'ready' message to parent process
|
||||
|
|
|
@ -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>
|
||||
</span>
|
||||
</div>
|
||||
<div :class="$style.description">{{ 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 :class="$style.description">{{ withDescription ? i18n.ts._achievements._types['_' + achievement.name].description : '???' }}</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>
|
||||
<template v-if="withLocked">
|
||||
|
@ -49,8 +49,10 @@ import { ACHIEVEMENT_TYPES, ACHIEVEMENT_BADGES, claimAchievement } from '@/scrip
|
|||
const props = withDefaults(defineProps<{
|
||||
user: misskey.entities.User;
|
||||
withLocked: boolean;
|
||||
withDescription: boolean;
|
||||
}>(), {
|
||||
withLocked: true,
|
||||
withDescription: true,
|
||||
});
|
||||
|
||||
let achievements = $ref();
|
||||
|
|
|
@ -21,6 +21,7 @@ import { useTooltip } from '@/scripts/use-tooltip';
|
|||
import { $i } from '@/account';
|
||||
import MkReactionEffect from '@/components/MkReactionEffect.vue';
|
||||
import { claimAchievement } from '@/scripts/achievements';
|
||||
import { defaultStore } from '@/store';
|
||||
|
||||
const props = defineProps<{
|
||||
reaction: string;
|
||||
|
@ -61,6 +62,7 @@ const toggleReaction = () => {
|
|||
|
||||
const anime = () => {
|
||||
if (document.hidden) return;
|
||||
if (!defaultStore.state.animation) return;
|
||||
|
||||
const rect = buttonEl.value.getBoundingClientRect();
|
||||
const x = rect.left + 16;
|
||||
|
|
|
@ -40,11 +40,31 @@
|
|||
</FormSection>
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts._aboutMisskey.contributors }}</template>
|
||||
<div class="_formLinksGrid">
|
||||
<FormLink to="https://github.com/syuilo" external>@syuilo</FormLink>
|
||||
<FormLink to="https://github.com/tamaina" external>@tamaina</FormLink>
|
||||
<FormLink to="https://github.com/acid-chicken" external>@acid-chicken</FormLink>
|
||||
<FormLink to="https://github.com/rinsuki" external>@rinsuki</FormLink>
|
||||
<div :class="$style.contributors">
|
||||
<a href="https://github.com/syuilo" target="_blank" :class="$style.contributor">
|
||||
<img src="https://avatars.githubusercontent.com/u/4439005?v=4" :class="$style.contributorAvatar">
|
||||
<span :class="$style.contributorUsername">@syuilo</span>
|
||||
</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>
|
||||
<template #caption><MkLink url="https://github.com/misskey-dev/misskey/graphs/contributors">{{ i18n.ts._aboutMisskey.allContributors }}</MkLink></template>
|
||||
</FormSection>
|
||||
|
@ -295,3 +315,38 @@ definePageMetadata({
|
|||
}
|
||||
}
|
||||
</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>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<template #label>Access key</template>
|
||||
</MkInput>
|
||||
|
||||
<MkInput v-model="objectStorageSecretKey">
|
||||
<MkInput v-model="objectStorageSecretKey" type="password">
|
||||
<template #prefix><i class="ti ti-key"></i></template>
|
||||
<template #label>Secret key</template>
|
||||
</MkInput>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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="name _monospace">{{ emoji.name }}</div>
|
||||
<div class="info">{{ emoji.aliases.join(' ') }}</div>
|
||||
|
@ -15,7 +15,12 @@ import copyToClipboard from '@/scripts/copy-to-clipboard';
|
|||
import { i18n } from '@/i18n';
|
||||
|
||||
const props = defineProps<{
|
||||
emoji: Record<string, unknown>; // TODO
|
||||
emoji: {
|
||||
name: string;
|
||||
aliases: string[];
|
||||
category: string;
|
||||
url: string;
|
||||
};
|
||||
}>();
|
||||
|
||||
function menu(ev) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ function getButtonOptions(def: values.Value | undefined, call: (fn: values.VFn,
|
|||
if (primary) utils.assertBoolean(primary);
|
||||
const rounded = def.value.get('rounded');
|
||||
if (rounded) utils.assertBoolean(rounded);
|
||||
const disabled = button.value.get('disabled');
|
||||
const disabled = def.value.get('disabled');
|
||||
if (disabled) utils.assertBoolean(disabled);
|
||||
|
||||
return {
|
||||
|
|
|
@ -48,9 +48,9 @@ importers:
|
|||
|
||||
packages/backend:
|
||||
specifiers:
|
||||
'@bull-board/api': ^4.10.2
|
||||
'@bull-board/fastify': ^4.10.2
|
||||
'@bull-board/ui': ^4.10.2
|
||||
'@bull-board/api': ^4.11.0
|
||||
'@bull-board/fastify': ^4.11.0
|
||||
'@bull-board/ui': ^4.11.0
|
||||
'@discordapp/twemoji': 14.0.2
|
||||
'@fastify/accepts': 4.1.0
|
||||
'@fastify/cookie': ^8.3.0
|
||||
|
@ -202,7 +202,7 @@ importers:
|
|||
typeorm: 0.3.11
|
||||
typescript: 4.9.4
|
||||
ulid: 2.3.0
|
||||
undici: ^5.15.1
|
||||
undici: ^5.16.0
|
||||
unzipper: 0.10.11
|
||||
uuid: 9.0.0
|
||||
vary: 1.1.2
|
||||
|
@ -211,9 +211,9 @@ importers:
|
|||
ws: 8.12.0
|
||||
xev: 3.0.2
|
||||
dependencies:
|
||||
'@bull-board/api': 4.10.2
|
||||
'@bull-board/fastify': 4.10.2
|
||||
'@bull-board/ui': 4.10.2
|
||||
'@bull-board/api': 4.11.0
|
||||
'@bull-board/fastify': 4.11.0
|
||||
'@bull-board/ui': 4.11.0
|
||||
'@discordapp/twemoji': 14.0.2
|
||||
'@fastify/accepts': 4.1.0
|
||||
'@fastify/cookie': 8.3.0
|
||||
|
@ -308,7 +308,7 @@ importers:
|
|||
typeorm: 0.3.11_ioredis@4.28.5+pg@8.8.0
|
||||
typescript: 4.9.4
|
||||
ulid: 2.3.0
|
||||
undici: 5.15.1
|
||||
undici: 5.16.0
|
||||
unzipper: 0.10.11
|
||||
uuid: 9.0.0
|
||||
vary: 1.1.2
|
||||
|
@ -915,17 +915,17 @@ packages:
|
|||
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
|
||||
dev: true
|
||||
|
||||
/@bull-board/api/4.10.2:
|
||||
resolution: {integrity: sha512-lRHo0A7hsz71aOx1ZN0SmLLWfSuvKdL6EZ4imlgo5SuXGozybvlRc5KPIJU2/E1w5meoUGi+nFezBwp1gT/SMw==}
|
||||
/@bull-board/api/4.11.0:
|
||||
resolution: {integrity: sha512-qFnG63s3BkaslsNnXYagEUcdeK9SijZTJ+I4vMU+OiZt9VlKh01X1KjNlqjF9guvWcjk+Rg8UOMm0fWwM6PK6g==}
|
||||
dependencies:
|
||||
redis-info: 3.1.0
|
||||
dev: false
|
||||
|
||||
/@bull-board/fastify/4.10.2:
|
||||
resolution: {integrity: sha512-yp/TlfyfMBgR6vibyCUBOTKn2BFlBSLxkJxzlvIcMDs2Vl3PMXMs4YoCr2o3m+dXxSNzpTfomxAc5XQfJdp0VQ==}
|
||||
/@bull-board/fastify/4.11.0:
|
||||
resolution: {integrity: sha512-G4sAFVx5kGT5T/F2gL91RjZ2+YrMHNrLWoVo/QfHMcZe3RoOP4PpbOLgLC/O67KYn3JK6t8ysGyyP035OSJ2HA==}
|
||||
dependencies:
|
||||
'@bull-board/api': 4.10.2
|
||||
'@bull-board/ui': 4.10.2
|
||||
'@bull-board/api': 4.11.0
|
||||
'@bull-board/ui': 4.11.0
|
||||
'@fastify/static': 6.6.1
|
||||
'@fastify/view': 7.4.0
|
||||
ejs: 3.1.8
|
||||
|
@ -933,10 +933,10 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@bull-board/ui/4.10.2:
|
||||
resolution: {integrity: sha512-vaHGojG5D3xjnaed3nwOaLy4Y06RgDJdYRaFR5E06SjZ0vOvjVYGD6s4cykK512Aw/ElFhKDPwzhf8BvpwAtDQ==}
|
||||
/@bull-board/ui/4.11.0:
|
||||
resolution: {integrity: sha512-/Yb7x/3tWxysA2jRDQ89xEPnscvfGQdf4MmDRzWH5lDkVmL8b1HvZAQxLrHcxwB6y16oorQTf/1KbRZl0rJDHg==}
|
||||
dependencies:
|
||||
'@bull-board/api': 4.10.2
|
||||
'@bull-board/api': 4.11.0
|
||||
dev: false
|
||||
|
||||
/@chainsafe/is-ip/2.0.1:
|
||||
|
@ -1077,7 +1077,7 @@ packages:
|
|||
dependencies:
|
||||
ky: 0.30.0
|
||||
ky-universal: 0.10.1_ky@0.30.0
|
||||
undici: 5.15.1
|
||||
undici: 5.16.0
|
||||
transitivePeerDependencies:
|
||||
- web-streams-polyfill
|
||||
dev: false
|
||||
|
@ -1402,7 +1402,7 @@ packages:
|
|||
fastify-plugin: 4.5.0
|
||||
pump: 3.0.0
|
||||
tiny-lru: 10.0.1
|
||||
undici: 5.15.1
|
||||
undici: 5.16.0
|
||||
dev: false
|
||||
|
||||
/@fastify/send/1.0.0:
|
||||
|
@ -13541,8 +13541,8 @@ packages:
|
|||
undertaker-registry: 1.0.1
|
||||
dev: false
|
||||
|
||||
/undici/5.15.1:
|
||||
resolution: {integrity: sha512-XLk8g0WAngdvFqTI+VKfBtM4YWXgdxkf1WezC771Es0Dd+Pm1KmNx8t93WTC+Hh9tnghmVxkclU1HN+j+CvIUA==}
|
||||
/undici/5.16.0:
|
||||
resolution: {integrity: sha512-KWBOXNv6VX+oJQhchXieUznEmnJMqgXMbs0xxH2t8q/FUAWSJvOSr/rMaZKnX5RIVq7JDn0JbP4BOnKG2SGXLQ==}
|
||||
engines: {node: '>=12.18'}
|
||||
dependencies:
|
||||
busboy: 1.6.0
|
||||
|
|
Loading…
Reference in a new issue