Merge branch 'develop' into deps-update-openapits

This commit is contained in:
かっこかり 2025-05-23 20:39:22 +09:00 committed by GitHub
commit cc77b855cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 218 additions and 56 deletions

View File

@ -43,11 +43,14 @@
- Enhance: ノートのサーバー情報のデザインを改善・パフォーマンス向上
(Based on https://github.com/taiyme/misskey/pull/198, https://github.com/taiyme/misskey/pull/211, https://github.com/taiyme/misskey/pull/283)
- Enhance: ユーザー設定でURLプレビューを無効化できるように
- Enhance: ヒントとコツを追加
- Enhance: ヒントとコツを再表示できるように
- Enhance: AiScriptからtoastを表示する関数 `Mk:toast` を追加
- Enhance: シンタックスハイライトのエンジンをJavaScriptベースのものに変更
- フロントエンドの読み込みサイズを軽量化しました
- ほとんどの言語のハイライトは問題なく行えますが、互換性の問題により一部の言語が正常にハイライトできなくなる可能性があります。詳しくは https://shiki.style/references/engine-js-compat をご覧ください。
- Fix: "時計"ウィジェット(Clock)において、Transparent設定が有効でも、その背景が透過されない問題を修正
- Fix: 一定時間操作がなかったら動画プレイヤーのコントロールを隠すように
### Server
- Enhance: チャットルームの最大メンバー数を30人から50人に調整
@ -58,6 +61,7 @@
- Fix: ユーザ除外アンテナをインポートできない問題を修正
- Fix: アンテナのセンシティブなチャンネルのノートを含むかどうかの情報がエクスポートされない問題を修正
- Fix: 連合モードが「なし」の場合に、生成されるHTML内のactivity jsonへのリンクタグを省略するように
- Fix: コントロールパネルから招待コードを作成すると作成者の情報が記録されない問題を修正
## 2025.5.0

28
locales/index.d.ts vendored
View File

@ -5461,6 +5461,18 @@ export interface Locale extends ILocale {
*
*/
"abort": string;
/**
*
*/
"tip": string;
/**
*
*/
"redisplayAllTips": string;
/**
*
*/
"hideAllTips": string;
"_chat": {
/**
*
@ -11941,6 +11953,10 @@ export interface Locale extends ILocale {
*
*/
"allowedTypes": string;
/**
*
*/
"tip": string;
};
"_clientPerformanceIssueTip": {
/**
@ -11972,6 +11988,18 @@ export interface Locale extends ILocale {
*/
"makeSureDisabledAddons_description": string;
};
"_clip": {
/**
*
*/
"tip": string;
};
"_userLists": {
/**
*
*/
"tip": string;
};
}
declare const locales: {
[lang: string]: Locale;

View File

@ -1360,6 +1360,9 @@ emojiUnmute: "絵文字ミュート解除"
muteX: "{x}をミュート"
unmuteX: "{x}のミュートを解除"
abort: "中止"
tip: "ヒントとコツ"
redisplayAllTips: "全ての「ヒントとコツ」を再表示"
hideAllTips: "全ての「ヒントとコツ」を非表示"
_chat:
noMessagesYet: "まだメッセージはありません"
@ -3194,6 +3197,7 @@ _uploader:
doneConfirm: "アップロードされていないファイルがありますが、完了しますか?"
maxFileSizeIsX: "アップロード可能な最大ファイルサイズは{x}です。"
allowedTypes: "アップロード可能なファイル種別"
tip: "ファイルはまだアップロードされていません。このダイアログで、アップロード前の確認・リネーム・圧縮・クロッピングなどが行えます。準備が出来たら、「アップロード」ボタンを押してアップロードを開始できます。"
_clientPerformanceIssueTip:
title: "バッテリー消費が多いと感じたら"
@ -3203,3 +3207,9 @@ _clientPerformanceIssueTip:
makeSureDisabledCustomCss_description: "スタイルを上書きするとパフォーマンスに影響を及ぼすことがあります。カスタムCSSや、スタイルを上書きする拡張機能が有効になっていないか確認してください。"
makeSureDisabledAddons: "拡張機能を無効にしてください"
makeSureDisabledAddons_description: "一部の拡張機能はクライアントの動作に干渉しパフォーマンスに影響を及ぼすことがあります。ブラウザの拡張機能を無効にして改善するか確認してください。"
_clip:
tip: "クリップは、ノートをまとめることができる機能です。"
_userLists:
tip: "任意のユーザーが含まれるリストを作成できます。作成したリストはタイムラインとして表示可能です。"

View File

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2025.5.1-alpha.4",
"version": "2025.5.1-beta.0",
"codename": "nasubi",
"repository": {
"type": "git",

View File

@ -68,6 +68,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
for (let i = 0; i < ps.count; i++) {
ticketsPromises.push(this.registrationTicketsRepository.insertOne({
id: this.idService.gen(),
createdBy: me,
createdById: me.id,
expiresAt: ps.expiresAt ? new Date(ps.expiresAt) : null,
code: generateInviteCode(),
}));

View File

@ -38,14 +38,13 @@ export function convertSchemaToOpenApiSchema(schema: Schema, type: 'param' | 're
if (type === 'res' && schema.ref && (!schema.selfRef || includeSelfRef)) {
const $ref = `#/components/schemas/${schema.ref}`;
if (schema.nullable || schema.optional) {
res.allOf = [{ $ref }];
if (schema.nullable) {
res.oneOf = [{ $ref }, { type: 'null' }];
} else {
res.$ref = $ref;
}
}
if (schema.nullable) {
delete res.type;
} else if (schema.nullable) {
if (Array.isArray(schema.type) && !schema.type.includes('null')) {
res.type.push('null');
} else if (typeof schema.type === 'string') {

View File

@ -60,9 +60,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@drop.prevent.stop="onDrop"
@contextmenu.stop="onContextmenu"
>
<div v-if="!store.r.readDriveTip.value" style="padding: 8px;">
<MkInfo closable @close="closeTip()"><div v-html="i18n.ts.driveAboutTip"></div></MkInfo>
</div>
<MkTip k="drive"><div v-html="i18n.ts.driveAboutTip"></div></MkTip>
<div :class="$style.folders">
<XFolder
@ -135,7 +133,6 @@ SPDX-License-Identifier: AGPL-3.0-only
import { nextTick, onActivated, onBeforeUnmount, onMounted, ref, useTemplateRef, watch, computed, TransitionGroup } from 'vue';
import * as Misskey from 'misskey-js';
import MkButton from './MkButton.vue';
import MkInfo from './MkInfo.vue';
import type { MenuItem } from '@/types/menu.js';
import XNavFolder from '@/components/MkDrive.navFolder.vue';
import XFolder from '@/components/MkDrive.folder.vue';
@ -661,10 +658,6 @@ function onContextmenu(ev: MouseEvent) {
os.contextMenu(getMenu(), ev);
}
function closeTip() {
store.set('readDriveTip', true);
}
useGlobalEvent('driveFileCreated', (file) => {
if (file.folderId === (folder.value?.id ?? null)) {
filesPaginator.prepend(file);

View File

@ -110,6 +110,8 @@ function onClosed() {
right: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
padding-bottom: env(safe-area-inset-bottom, 0px);
margin: auto;
background: var(--MI_THEME-bg);
container-type: size;

View File

@ -13,8 +13,9 @@ SPDX-License-Identifier: AGPL-3.0-only
controlsShowing && $style.active,
(video.isSensitive && prefer.s.highlightSensitiveMedia) && $style.sensitive,
]"
@mouseover="onMouseOver"
@mouseleave="onMouseLeave"
@mouseover.passive="onMouseOver"
@mousemove.passive="onMouseMove"
@mouseleave.passive="onMouseLeave"
@contextmenu.stop
@keydown.stop
>
@ -309,7 +310,7 @@ const controlsShowing = computed(() => {
return false;
});
const isFullscreen = ref(false);
let controlStateTimer: string | number;
let controlStateTimer: number | null = null;
// MediaControl: Common State
const oncePlayed = ref(false);
@ -342,9 +343,26 @@ function onMouseOver() {
window.clearTimeout(controlStateTimer);
}
isHoverring.value = true;
controlStateTimer = window.setTimeout(() => {
isHoverring.value = false;
}, 3000);
}
function onMouseMove() {
if (controlStateTimer) {
window.clearTimeout(controlStateTimer);
}
isHoverring.value = true;
controlStateTimer = window.setTimeout(() => {
isHoverring.value = false;
}, 3000);
}
function onMouseLeave() {
if (controlStateTimer) {
window.clearTimeout(controlStateTimer);
}
controlStateTimer = window.setTimeout(() => {
isHoverring.value = false;
}, 100);
@ -509,6 +527,10 @@ onDeactivated(() => {
window.cancelAnimationFrame(mediaTickFrameId);
mediaTickFrameId = null;
}
if (controlStateTimer) {
window.clearTimeout(controlStateTimer);
controlStateTimer = null;
}
});
</script>

View File

@ -19,6 +19,10 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="[$style.overallProgress, canRetry ? $style.overallProgressError : null]" :style="{ '--op': `${overallProgress}%` }"></div>
<div class="_gaps_s _spacer">
<MkTip k="uploader">
{{ i18n.ts._uploader.tip }}
</MkTip>
<div class="_gaps_s">
<div
v-for="ctx in items"
@ -250,6 +254,23 @@ async function done() {
function showMenu(ev: MouseEvent, item: typeof items.value[0]) {
const menu: MenuItem[] = [];
menu.push({
icon: 'ti ti-cursor-text',
text: i18n.ts.rename,
action: async () => {
const { result, canceled } = await os.inputText({
type: 'text',
title: i18n.ts.rename,
placeholder: item.name,
default: item.name,
});
if (canceled) return;
if (result.trim() === '') return;
item.name = result;
},
});
if (CROPPING_SUPPORTED_TYPES.includes(item.file.type) && !item.waiting && !item.uploading && !item.uploaded) {
menu.push({
icon: 'ti ti-crop',

View File

@ -41,6 +41,7 @@ const props = defineProps<{
.img {
vertical-align: bottom;
height: 128px;
aspect-ratio: 1;
margin-bottom: 16px;
border-radius: 16px;
}

View File

@ -0,0 +1,48 @@
<!--
SPDX-FileCopyrightText: syuilo and misskey-project
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div v-if="!store.r.tips.value[props.k]" :class="[$style.root, { [$style.warn]: warn }]" class="_selectable _gaps_s">
<div style="font-weight: bold;"><i class="ti ti-bulb"></i> {{ i18n.ts.tip }}:</div>
<div><slot></slot></div>
<MkButton primary rounded small @click="closeTip()"><i class="ti ti-check"></i> {{ i18n.ts.gotIt }}</MkButton>
</div>
</template>
<script lang="ts" setup>
import { i18n } from '@/i18n.js';
import { store } from '@/store.js';
import MkButton from '@/components/MkButton.vue';
const props = withDefaults(defineProps<{
k: keyof (typeof store['s']['tips']);
warn?: boolean;
}>(), {
warn: false,
});
function closeTip() {
store.set('tips', {
...store.r.tips.value,
[props.k]: true,
});
}
</script>
<style lang="scss" module>
.root {
padding: 12px 14px;
font-size: 90%;
background: var(--MI_THEME-infoBg);
color: var(--MI_THEME-infoFg);
border-radius: var(--MI-radius);
&.warn {
background: var(--MI_THEME-infoWarnBg);
color: var(--MI_THEME-infoWarnFg);
}
}
</style>

View File

@ -26,6 +26,7 @@ import MkStickyContainer from './global/MkStickyContainer.vue';
import MkLazy from './global/MkLazy.vue';
import MkResult from './global/MkResult.vue';
import MkSystemIcon from './global/MkSystemIcon.vue';
import MkTip from './global/MkTip.vue';
import PageWithHeader from './global/PageWithHeader.vue';
import PageWithAnimBg from './global/PageWithAnimBg.vue';
import SearchMarker from './global/SearchMarker.vue';
@ -65,6 +66,7 @@ export const components = {
MkLazy: MkLazy,
MkResult: MkResult,
MkSystemIcon: MkSystemIcon,
MkTip: MkTip,
PageWithHeader: PageWithHeader,
PageWithAnimBg: PageWithAnimBg,
SearchMarker: SearchMarker,
@ -98,6 +100,7 @@ declare module '@vue/runtime-core' {
MkLazy: typeof MkLazy;
MkResult: typeof MkResult;
MkSystemIcon: typeof MkSystemIcon;
MkTip: typeof MkTip;
PageWithHeader: typeof PageWithHeader;
PageWithAnimBg: typeof PageWithAnimBg;
SearchMarker: typeof SearchMarker;

View File

@ -11,9 +11,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkButton link to="/admin/abuse-report-notification-recipient" primary>{{ i18n.ts.notificationSetting }}</MkButton>
</div>
<MkInfo v-if="!store.r.abusesTutorial.value" closable @close="closeTutorial()">
<MkTip k="abuses">
{{ i18n.ts._abuseUserReport.resolveTutorial }}
</MkInfo>
</MkTip>
<div :class="$style.inputs" class="_gaps">
<MkSelect v-model="state" style="margin: 0; flex: 1;">
@ -65,7 +65,6 @@ import XAbuseReport from '@/components/MkAbuseReport.vue';
import { i18n } from '@/i18n.js';
import { definePage } from '@/page.js';
import MkButton from '@/components/MkButton.vue';
import MkInfo from '@/components/MkInfo.vue';
import { store } from '@/store.js';
const reports = useTemplateRef('reports');
@ -90,10 +89,6 @@ function resolved(reportId) {
reports.value?.paginator.removeItem(reportId);
}
function closeTutorial() {
store.set('abusesTutorial', false);
}
const headerActions = computed(() => []);
const headerTabs = computed(() => []);

View File

@ -5,7 +5,10 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<PageWithHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs" :swipable="true">
<div class="_spacer" style="--MI_SPACER-w: 700px;">
<div class="_spacer _gaps" style="--MI_SPACER-w: 700px;">
<MkTip k="clips">
{{ i18n.ts._clip.tip }}
</MkTip>
<div v-if="tab === 'my'" class="_gaps">
<MkButton primary rounded class="add" @click="create"><i class="ti ti-plus"></i> {{ i18n.ts.add }}</MkButton>

View File

@ -7,6 +7,10 @@ SPDX-License-Identifier: AGPL-3.0-only
<PageWithHeader :actions="headerActions" :tabs="headerTabs">
<div class="_spacer" style="--MI_SPACER-w: 700px;">
<div class="_gaps">
<MkTip k="userLists">
{{ i18n.ts._userLists.tip }}
</MkTip>
<MkResult v-if="items.length === 0" type="empty"/>
<MkButton primary rounded style="margin: 0 auto;" @click="create"><i class="ti ti-plus"></i> {{ i18n.ts.createList }}</MkButton>

View File

@ -123,6 +123,11 @@ SPDX-License-Identifier: AGPL-3.0-only
<hr>
<MkButton @click="resetAllTips"><i class="ti ti-bulb"></i> {{ i18n.ts.redisplayAllTips }}</MkButton>
<MkButton @click="hideAllTips"><i class="ti ti-bulb-off"></i> {{ i18n.ts.hideAllTips }}</MkButton>
<hr>
<FormSlot>
<MkButton danger @click="migrate"><i class="ti ti-refresh"></i> {{ i18n.ts.migrateOldSettings }}</MkButton>
<template #caption>{{ i18n.ts.migrateOldSettings_description }}</template>
@ -152,6 +157,7 @@ import { prefer } from '@/preferences.js';
import MkRolePreview from '@/components/MkRolePreview.vue';
import { signout } from '@/signout.js';
import { migrateOldSettings } from '@/pref-migrate.js';
import { store, TIPS } from '@/store.js';
const $i = ensureSignin();
@ -194,6 +200,20 @@ function migrate() {
migrateOldSettings();
}
function resetAllTips() {
store.set('tips', {});
os.success();
}
function hideAllTips() {
const v = {};
for (const k of TIPS) {
v[k] = true;
}
store.set('tips', v);
os.success();
}
const headerActions = computed(() => []);
const headerTabs = computed(() => []);

View File

@ -6,9 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<PageWithHeader v-model:tab="src" :actions="headerActions" :tabs="$i ? headerTabs : headerTabsWhenNotLogin" :swipable="true" :displayMyAvatar="true">
<div class="_spacer" style="--MI_SPACER-w: 800px;">
<MkInfo v-if="isBasicTimeline(src) && !store.r.timelineTutorials.value[src]" style="margin-bottom: var(--MI-margin);" closable @close="closeTutorial()">
<MkTip v-if="isBasicTimeline(src)" :k="`tl.${src}`" style="margin-bottom: var(--MI-margin);">
{{ i18n.ts._timelineDescription[src] }}
</MkInfo>
</MkTip>
<MkPostForm v-if="prefer.r.showFixedPostForm.value" :class="$style.postForm" class="_panel" fixed style="margin-bottom: var(--MI-margin);"/>
<MkStreamingNotesTimeline
ref="tlComponent"
@ -32,7 +32,6 @@ import type { Tab } from '@/components/global/MkPageHeader.tabs.vue';
import type { MenuItem } from '@/types/menu.js';
import type { BasicTimelineType } from '@/timelines.js';
import MkStreamingNotesTimeline from '@/components/MkStreamingNotesTimeline.vue';
import MkInfo from '@/components/MkInfo.vue';
import MkPostForm from '@/components/MkPostForm.vue';
import * as os from '@/os.js';
import { store } from '@/store.js';
@ -204,13 +203,6 @@ function focus(): void {
tlComponent.value.focus();
}
function closeTutorial(): void {
if (!isBasicTimeline(src.value)) return;
const before = store.s.timelineTutorials;
before[src.value] = true;
store.set('timelineTutorials', before);
}
function switchTlIfNeeded() {
if (isBasicTimeline(src.value) && !isAvailableBasicTimeline(src.value)) {
src.value = availableBasicTimelines()[0];

View File

@ -194,10 +194,10 @@ export const PREF_DEF = {
default: 'auto' as 'auto' | 'popup' | 'drawer',
},
useBlurEffectForModal: {
default: DEFAULT_DEVICE_KIND === 'desktop',
default: true,
},
useBlurEffect: {
default: DEFAULT_DEVICE_KIND === 'desktop',
default: true,
},
useStickyIcons: {
default: true,
@ -351,7 +351,7 @@ export const PREF_DEF = {
},
'sound.masterVolume': {
default: 0.3,
default: 0.5,
},
'sound.notUseSound': {
default: false,

View File

@ -14,6 +14,18 @@ import { miLocalStorage } from '@/local-storage.js';
import { Pizzax } from '@/lib/pizzax.js';
import { DEFAULT_DEVICE_KIND } from '@/utility/device-kind.js';
export const TIPS = [
'drive',
'uploader',
'clips',
'userLists',
'tl.home',
'tl.local',
'tl.social',
'tl.global',
'abuses',
] as const;
/**
* (not)
*/
@ -22,22 +34,9 @@ export const store = markRaw(new Pizzax('base', {
where: 'account',
default: 0,
},
timelineTutorials: {
where: 'account',
default: {
home: false,
local: false,
social: false,
global: false,
},
},
abusesTutorial: {
where: 'account',
default: false,
},
readDriveTip: {
where: 'account',
default: false,
tips: {
where: 'device',
default: {} as Partial<Record<typeof TIPS[number], boolean>>, // true = 既読
},
memo: {
where: 'account',

View File

@ -136,7 +136,7 @@ watch(rootEl, () => {
}
.itemIcon {
font-size: 14px;
font-size: 15px;
}
.itemIndicator {

View File

@ -39,6 +39,10 @@ export function calcPopupPosition(el: HTMLElement, props: {
left = window.innerWidth - contentWidth + window.scrollX - 1;
}
if (left < window.scrollX) {
left = window.scrollX;
}
return [left, top];
};
@ -60,6 +64,10 @@ export function calcPopupPosition(el: HTMLElement, props: {
left = window.innerWidth - contentWidth + window.scrollX - 1;
}
if (left < window.scrollX) {
left = window.scrollX;
}
return [left, top];
};
@ -81,6 +89,10 @@ export function calcPopupPosition(el: HTMLElement, props: {
top = window.innerHeight - contentHeight + window.scrollY - 1;
}
if (left < window.scrollX) {
left = window.scrollX;
}
return [left, top];
};
@ -110,6 +122,10 @@ export function calcPopupPosition(el: HTMLElement, props: {
top = window.innerHeight - contentHeight + window.scrollY - 1;
}
if (left < window.scrollX) {
left = window.scrollX;
}
return [left, top];
};

View File

@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
"version": "2025.5.1-alpha.4",
"version": "2025.5.1-beta.0",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",