1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-29 13:54:37 +02:00
This commit is contained in:
syuilo
2026-05-31 11:16:56 +09:00
parent 52cb23da63
commit b81b9e1da7
5 changed files with 120 additions and 77 deletions

View File

@@ -3563,6 +3563,7 @@ _miWorld:
separateRenderingThread: "描画を別スレッドに分離"
separateRenderingThread_description: "有効にするとパフォーマンスが向上します。不安定になる場合は無効すると改善する可能性があります。"
graphicsQuality: "グラフィックの品質"
graphicsSettings: "グラフィック設定"
frameRate: "フレームレート"
resolution: "解像度"
failedToInitialize: "初期化に失敗しました"
@@ -3607,6 +3608,7 @@ _miRoom:
exitEditMode: "エディットモードを終了"
installFurniture: "家具を設置"
roomCustomize: "部屋のカスタマイズ"
changeRoomName: "部屋名を編集"
_objects:
woodRingFloorLamp: "リングシェードフロアランプ"

View File

@@ -145,6 +145,11 @@ export const navbarItemDef = reactive<{
icon: 'ti ti-device-gamepad',
to: '/games',
},
rooms: {
title: 'Rooms',
icon: 'ti ti-door',
to: '/rooms',
},
ui: {
title: i18n.ts.switchUi,
icon: 'ti ti-devices',

View File

@@ -7,12 +7,22 @@ SPDX-License-Identifier: AGPL-3.0-only
<PageWithHeader :actions="headerActions" :tabs="headerTabs">
<div class="_spacer" style="--MI_SPACER-w: 700px;">
<MkButton gradate rounded @click="create">Create</MkButton>
<MkPagination v-slot="{items}" :paginator="paginator">
<div class="_gaps_s">
<div v-for="room in items" :key="room.id">
<MkA :to="'/rooms/' + room.id">
<div>{{ room.name }}</div>
</MkA>
</div>
</div>
</MkPagination>
</div>
</PageWithHeader>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { computed, markRaw } from 'vue';
import * as Misskey from 'misskey-js';
import { WORLD_SCALE } from 'misskey-world/src/utility.js';
import type { RoomState } from 'misskey-world/src/room/type.js';
@@ -23,9 +33,21 @@ import MkButton from '@/components/MkButton.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/utility/misskey-api.js';
import { useRouter } from '@/router.js';
import { Paginator } from '@/utility/paginator.js';
import MkPagination from '@/components/MkPagination.vue';
import MkLink from '@/components/MkLink.vue';
const $i = ensureSignin();
const router = useRouter();
const paginator = markRaw(new Paginator('world/rooms/list-by-user', {
limit: 10,
params: {
userId: $i.id,
},
}));
const initialRoomDef = {
env: {
type: 'simple',
@@ -128,7 +150,7 @@ const headerActions = computed(() => [{
const headerTabs = computed(() => []);
definePage(() => ({
title: 'Room',
title: 'Rooms',
icon: 'ti ti-door',
}));
</script>

View File

@@ -582,66 +582,22 @@ function impor() {
function showOtherMenu(ev: PointerEvent) {
os.popupMenu([{
type: 'radio',
text: i18n.ts._miWorld.graphicsQuality,
caption: graphicsQualityRaw.value == null ? i18n.ts.auto : graphicsQualityRaw.value === GRAPHICS_QUALITY.HIGH ? 'High' : graphicsQualityRaw.value === GRAPHICS_QUALITY.MEDIUM ? 'Medium' : 'Low',
options: [{
label: `${i18n.ts.auto} (${graphicsQualityAutoValue.value === GRAPHICS_QUALITY.HIGH ? 'High' : graphicsQualityAutoValue.value === GRAPHICS_QUALITY.MEDIUM ? 'Medium' : 'Low'})`,
value: null,
}, { type: 'divider' }, {
label: 'High',
value: GRAPHICS_QUALITY.HIGH,
}, {
label: 'Medium',
value: GRAPHICS_QUALITY.MEDIUM,
}, {
label: 'Low',
value: GRAPHICS_QUALITY.LOW,
}],
ref: graphicsQualityRaw,
}, {
type: 'radio',
text: i18n.ts._miWorld.frameRate,
caption: fpsRaw.value == null ? i18n.ts.auto : fpsRaw.value === 'max' ? 'Max' : `~${fpsRaw.value}fps`,
options: [{
label: `${i18n.ts.auto} (${fpsAutoValue.value}fps)`,
value: null,
}, { type: 'divider' }, {
label: 'Max',
value: 'max',
}, {
label: '~120fps',
value: '120',
}, {
label: '~60fps',
value: '60',
}, {
label: '~30fps',
value: '30',
}],
ref: fpsRaw,
}, {
type: 'radio',
text: i18n.ts._miWorld.resolution,
caption: resolutionRaw.value == null ? i18n.ts.auto : resolutionRaw.value + 'x',
options: [{
label: `${i18n.ts.auto} (${resolutionAutoValue.value}x)`,
value: null,
}, { type: 'divider' }, {
label: '2x',
value: 2,
}, {
label: '1x',
value: 1,
}, {
label: '0.5x',
value: 0.5,
}],
ref: resolutionRaw,
}, {
type: 'switch',
text: i18n.ts._miWorld.antialiasing,
ref: antialias,
text: i18n.ts._miRoom.changeRoomName,
icon: 'ti ti-forms',
action: async () => {
const { canceled, result } = await os.inputText({
title: i18n.ts.name,
default: props.room.name,
});
if (canceled) return;
os.apiWithDialog('world/rooms/update', {
roomId: props.room.id,
name: result,
}).then(() => {
props.room.name = result;
});
},
}, {
type: 'divider',
}, {
@@ -650,24 +606,73 @@ function showOtherMenu(ev: PointerEvent) {
}, {
text: 'Import',
action: impor,
}, {
text: 'Delete',
danger: true,
action: () => {
os.confirm({
type: 'warning',
title: i18n.ts.areYouSure,
}).then(({ canceled }) => {
if (canceled) return;
// TODO
});
},
}, {
type: 'divider',
}, {
text: 'Refresh',
action: refresh,
type: 'parent',
text: i18n.ts._miWorld.graphicsSettings,
children: [{
type: 'radio',
text: i18n.ts._miWorld.graphicsQuality,
caption: graphicsQualityRaw.value == null ? i18n.ts.auto : graphicsQualityRaw.value === GRAPHICS_QUALITY.HIGH ? 'High' : graphicsQualityRaw.value === GRAPHICS_QUALITY.MEDIUM ? 'Medium' : 'Low',
options: [{
label: `${i18n.ts.auto} (${graphicsQualityAutoValue.value === GRAPHICS_QUALITY.HIGH ? 'High' : graphicsQualityAutoValue.value === GRAPHICS_QUALITY.MEDIUM ? 'Medium' : 'Low'})`,
value: null,
}, { type: 'divider' }, {
label: 'High',
value: GRAPHICS_QUALITY.HIGH,
}, {
label: 'Medium',
value: GRAPHICS_QUALITY.MEDIUM,
}, {
label: 'Low',
value: GRAPHICS_QUALITY.LOW,
}],
ref: graphicsQualityRaw,
}, {
type: 'radio',
text: i18n.ts._miWorld.frameRate,
caption: fpsRaw.value == null ? i18n.ts.auto : fpsRaw.value === 'max' ? 'Max' : `~${fpsRaw.value}fps`,
options: [{
label: `${i18n.ts.auto} (${fpsAutoValue.value}fps)`,
value: null,
}, { type: 'divider' }, {
label: 'Max',
value: 'max',
}, {
label: '~120fps',
value: '120',
}, {
label: '~60fps',
value: '60',
}, {
label: '~30fps',
value: '30',
}],
ref: fpsRaw,
}, {
type: 'radio',
text: i18n.ts._miWorld.resolution,
caption: resolutionRaw.value == null ? i18n.ts.auto : resolutionRaw.value + 'x',
options: [{
label: `${i18n.ts.auto} (${resolutionAutoValue.value}x)`,
value: null,
}, { type: 'divider' }, {
label: '2x',
value: 2,
}, {
label: '1x',
value: 1,
}, {
label: '0.5x',
value: 0.5,
}],
ref: resolutionRaw,
}, {
type: 'switch',
text: i18n.ts._miWorld.antialiasing,
ref: antialias,
}],
}], ev.currentTarget ?? ev.target);
}
@@ -768,6 +773,7 @@ function enterOnline() {
display: flex;
align-items: center;
gap: 16px;
pointer-events: none;
}
.topMenu {

View File

@@ -13295,6 +13295,10 @@ export interface Locale extends ILocale {
* グラフィックの品質
*/
"graphicsQuality": string;
/**
* グラフィック設定
*/
"graphicsSettings": string;
/**
* フレームレート
*/
@@ -13450,6 +13454,10 @@ export interface Locale extends ILocale {
* 部屋のカスタマイズ
*/
"roomCustomize": string;
/**
* 部屋名を編集
*/
"changeRoomName": string;
"_objects": {
/**
* リングシェードフロアランプ