mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-19 14:45:38 +02:00
wip
This commit is contained in:
@@ -3559,3 +3559,6 @@ _room:
|
|||||||
gridScale: "グリッドサイズ"
|
gridScale: "グリッドサイズ"
|
||||||
thereAreUnsavedChanges: "未保存の変更があります"
|
thereAreUnsavedChanges: "未保存の変更があります"
|
||||||
revertAllChangesConfirmation: "全ての変更を取り消し、部屋を最後に保存した状態まで戻しますか?"
|
revertAllChangesConfirmation: "全ての変更を取り消し、部屋を最後に保存した状態まで戻しますか?"
|
||||||
|
graphicsQuality: "グラフィックの品質"
|
||||||
|
frameRate: "フレームレート"
|
||||||
|
resolution: "解像度"
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineAsyncComponent, inject, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef, unref, watch, shallowRef, reactive, isRef } from 'vue';
|
import { computed, defineAsyncComponent, inject, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef, unref, watch, shallowRef, reactive, isRef } from 'vue';
|
||||||
import type { MenuItem, InnerMenuItem, MenuPending, MenuAction, MenuSwitch, MenuRadio, MenuRadioOption, MenuParent } from '@/types/menu.js';
|
import type { MenuItem, InnerMenuItem, MenuPending, MenuAction, MenuSwitch, MenuRadio, MenuRadioOption, MenuParent, MenuDivider } from '@/types/menu.js';
|
||||||
import type { Keymap } from '@/utility/hotkey.js';
|
import type { Keymap } from '@/utility/hotkey.js';
|
||||||
import MkSwitchButton from '@/components/MkSwitch.button.vue';
|
import MkSwitchButton from '@/components/MkSwitch.button.vue';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
@@ -339,7 +339,11 @@ function onItemMouseLeave() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function showRadioOptions(item: MenuRadio, ev: MouseEvent | PointerEvent | KeyboardEvent) {
|
async function showRadioOptions(item: MenuRadio, ev: MouseEvent | PointerEvent | KeyboardEvent) {
|
||||||
const children: MenuItem[] = item.options.map<MenuRadioOption>(def => {
|
const children: MenuItem[] = item.options.map<MenuRadioOption | MenuDivider>(def => {
|
||||||
|
if (def.type === 'divider') {
|
||||||
|
return { type: 'divider' };
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: 'radioOption',
|
type: 'radioOption',
|
||||||
text: def.label,
|
text: def.label,
|
||||||
|
|||||||
@@ -474,12 +474,12 @@ function impor() {
|
|||||||
function showOtherMenu(ev: PointerEvent) {
|
function showOtherMenu(ev: PointerEvent) {
|
||||||
os.popupMenu([{
|
os.popupMenu([{
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
text: 'Graphics quality',
|
text: i18n.ts._room.graphicsQuality,
|
||||||
caption: graphicsQualityRaw.value == null ? i18n.ts.auto : graphicsQualityRaw.value === GRAPHICS_QUALITY_HIGH ? 'High' : graphicsQualityRaw.value === GRAPHICS_QUALITY_MEDIUM ? 'Medium' : 'Low',
|
caption: graphicsQualityRaw.value == null ? i18n.ts.auto : graphicsQualityRaw.value === GRAPHICS_QUALITY_HIGH ? 'High' : graphicsQualityRaw.value === GRAPHICS_QUALITY_MEDIUM ? 'Medium' : 'Low',
|
||||||
options: [{
|
options: [{
|
||||||
label: `Auto (${graphicsQualityAutoValue.value === GRAPHICS_QUALITY_HIGH ? 'High' : graphicsQualityAutoValue.value === GRAPHICS_QUALITY_MEDIUM ? 'Medium' : 'Low'})`,
|
label: `${i18n.ts.auto} (${graphicsQualityAutoValue.value === GRAPHICS_QUALITY_HIGH ? 'High' : graphicsQualityAutoValue.value === GRAPHICS_QUALITY_MEDIUM ? 'Medium' : 'Low'})`,
|
||||||
value: null,
|
value: null,
|
||||||
}, {
|
}, { type: 'divider' }, {
|
||||||
label: 'High',
|
label: 'High',
|
||||||
value: GRAPHICS_QUALITY_HIGH,
|
value: GRAPHICS_QUALITY_HIGH,
|
||||||
}, {
|
}, {
|
||||||
@@ -492,12 +492,12 @@ function showOtherMenu(ev: PointerEvent) {
|
|||||||
ref: graphicsQualityRaw,
|
ref: graphicsQualityRaw,
|
||||||
}, {
|
}, {
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
text: 'Framerate',
|
text: i18n.ts._room.frameRate,
|
||||||
caption: fpsRaw.value == null ? i18n.ts.auto : fpsRaw.value === 'max' ? 'Max' : `~${fpsRaw.value}fps`,
|
caption: fpsRaw.value == null ? i18n.ts.auto : fpsRaw.value === 'max' ? 'Max' : `~${fpsRaw.value}fps`,
|
||||||
options: [{
|
options: [{
|
||||||
label: `Auto (${fpsAutoValue.value}fps)`,
|
label: `${i18n.ts.auto} (${fpsAutoValue.value}fps)`,
|
||||||
value: null,
|
value: null,
|
||||||
}, {
|
}, { type: 'divider' }, {
|
||||||
label: 'Max',
|
label: 'Max',
|
||||||
value: 'max',
|
value: 'max',
|
||||||
}, {
|
}, {
|
||||||
@@ -513,12 +513,12 @@ function showOtherMenu(ev: PointerEvent) {
|
|||||||
ref: fpsRaw,
|
ref: fpsRaw,
|
||||||
}, {
|
}, {
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
text: 'Resolution',
|
text: i18n.ts._room.resolution,
|
||||||
caption: resolutionRaw.value == null ? i18n.ts.auto : resolutionRaw.value + 'x',
|
caption: resolutionRaw.value == null ? i18n.ts.auto : resolutionRaw.value + 'x',
|
||||||
options: [{
|
options: [{
|
||||||
label: `Auto (${resolutionAutoValue.value}x)`,
|
label: `${i18n.ts.auto} (${resolutionAutoValue.value}x)`,
|
||||||
value: null,
|
value: null,
|
||||||
}, {
|
}, { type: 'divider' }, {
|
||||||
label: '2x',
|
label: '2x',
|
||||||
value: 2,
|
value: 2,
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -78,10 +78,11 @@ export interface MenuSwitch extends TextMenuBase {
|
|||||||
export interface MenuRadio extends TextMenuBase {
|
export interface MenuRadio extends TextMenuBase {
|
||||||
type: 'radio';
|
type: 'radio';
|
||||||
ref: Ref<OptionValue>;
|
ref: Ref<OptionValue>;
|
||||||
options: {
|
options: ({
|
||||||
|
type?: 'option';
|
||||||
label: string;
|
label: string;
|
||||||
value: OptionValue;
|
value: OptionValue;
|
||||||
}[];
|
} | MenuDivider)[];
|
||||||
disabled?: boolean | Ref<boolean>;
|
disabled?: boolean | Ref<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13279,5 +13279,17 @@ export interface Locale extends ILocale {
|
|||||||
* 全ての変更を取り消し、部屋を最後に保存した状態まで戻しますか?
|
* 全ての変更を取り消し、部屋を最後に保存した状態まで戻しますか?
|
||||||
*/
|
*/
|
||||||
"revertAllChangesConfirmation": string;
|
"revertAllChangesConfirmation": string;
|
||||||
|
/**
|
||||||
|
* グラフィックの品質
|
||||||
|
*/
|
||||||
|
"graphicsQuality": string;
|
||||||
|
/**
|
||||||
|
* フレームレート
|
||||||
|
*/
|
||||||
|
"frameRate": string;
|
||||||
|
/**
|
||||||
|
* 解像度
|
||||||
|
*/
|
||||||
|
"resolution": string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user