mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
wip
This commit is contained in:
parent
a7e16c09dd
commit
af7d1a763a
6 changed files with 57 additions and 10 deletions
|
|
@ -3559,8 +3559,8 @@ _qr:
|
|||
raw: "テキスト"
|
||||
mfm: "MFM"
|
||||
|
||||
threeDAvatar: "3Dアバター"
|
||||
threeDAvatar_description: "MisskeyWorld / MisskeyRoomsで使用可能なアバターを作成できます。"
|
||||
worldAvatar: "Worldアバター"
|
||||
worldAvatar_description: "MisskeyWorld / MisskeyRoomsで使用可能な3Dアバターを作成できます。"
|
||||
|
||||
_miWorld:
|
||||
separateRenderingThread: "描画を別スレッドに分離"
|
||||
|
|
@ -3618,6 +3618,10 @@ _miRoom:
|
|||
furnitureCustomize: "家具のアレンジ"
|
||||
uninstallFurniture: "しまう"
|
||||
furnituresCount: "家具の数"
|
||||
_furniturePlacement:
|
||||
top: "床/上"
|
||||
bottom: "底面/下"
|
||||
side: "壁/側面"
|
||||
|
||||
_objects:
|
||||
woodRingFloorLamp: "リングシェードフロアランプ"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div>{{ avatar.name }}</div>
|
||||
<div>{{ avatar.active }}</div>
|
||||
<MkButton small rounded iconOnly @click="editWorldAvatar($event, avatar)"><i class="ti ti-pencil"></i></MkButton>
|
||||
<MkButton small rounded iconOnly @click="makeActive($event, avatar)"><i class="ti ti-check"></i></MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</MkPagination>
|
||||
|
|
@ -72,6 +73,14 @@ async function editWorldAvatar(ev: PointerEvent, item: Misskey.entities.WorldAva
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function makeActive(ev: PointerEvent, item: Misskey.entities.WorldAvatarsListResponse[number]) {
|
||||
await os.apiWithDialog('world/avatars/update', {
|
||||
avatarId: item.id,
|
||||
active: true,
|
||||
});
|
||||
paginator.reload();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style module>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ const props = defineProps<{
|
|||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
content-visibility: auto;
|
||||
contain-intrinsic-size: auto 200px;
|
||||
}
|
||||
.selected {
|
||||
color: var(--MI_THEME-accent);
|
||||
|
|
|
|||
|
|
@ -21,9 +21,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
<div v-else :class="$style.main">
|
||||
<div class="_spacer _gaps">
|
||||
<MkInput v-model="searchKeyword" type="search" :placeholder="i18n.ts.search"></MkInput>
|
||||
<MkInput v-model="searchKeyword" type="search" :placeholder="i18n.ts.search">
|
||||
<template #prefix><i class="ti ti-search"></i></template>
|
||||
</MkInput>
|
||||
<MkFoldableSection v-if="searchResult.length > 0" :expanded="true">
|
||||
<template #header><i class="ti ti-search"></i> {{ i18n.ts.searchResult }}</template>
|
||||
<div :class="$style.catalogItems">
|
||||
<XItem v-for="def in searchResult" :key="def.id" :def="def" :class="[$style.catalogItem]" @click="selectedId = def.id"/>
|
||||
</div>
|
||||
</MkFoldableSection>
|
||||
<MkFoldableSection v-if="recentlyUsedSchemas.length > 0" :expanded="true">
|
||||
<template #header>{{ i18n.ts.recentUsed }}</template>
|
||||
<template #header><i class="ti ti-history"></i> {{ i18n.ts.recentUsed }}</template>
|
||||
<div :class="$style.catalogItems">
|
||||
<XItem v-for="def in recentlyUsedSchemas" :key="def.id" :def="def" :class="[$style.catalogItem]" @click="selectedId = def.id"/>
|
||||
</div>
|
||||
|
|
@ -123,6 +131,7 @@ const selectedFunitureOptionsState = ref<RawOptions | null>(null);
|
|||
const selectedFunitureSchema = computed(() => selectedId.value == null ? null : FURNITURE_SCHEMA_DEFS[selectedId.value]);
|
||||
const showFurnitureOptions = ref(false);
|
||||
const searchKeyword = ref('');
|
||||
const searchResult = ref([]);
|
||||
|
||||
const attachments = {
|
||||
files: [],
|
||||
|
|
@ -146,6 +155,15 @@ const recentlyUsedSchemas = computed(() => {
|
|||
return recentlyUsed.map(id => FURNITURE_SCHEMA_DEFS[id]).filter((def): def is typeof FURNITURE_SCHEMA_DEFS[string] => def != null);
|
||||
});
|
||||
|
||||
watch(searchKeyword, (newKeyword) => {
|
||||
const kw = newKeyword.trim().toLowerCase();
|
||||
if (kw === '') {
|
||||
searchResult.value = [];
|
||||
} else {
|
||||
searchResult.value = Object.values(FURNITURE_SCHEMA_DEFS).filter(def => def.id.includes(kw) || FURNITURE_UI_DEFS[def.id].name.toLowerCase().includes(kw));
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await controller.init(canvas.value!);
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<SearchMarker :keywords="['world', 'rooms', 'avatar', '3d']">
|
||||
<MkFolder>
|
||||
<template #icon><i class="ti ti-box"></i></template>
|
||||
<template #label><SearchLabel>{{ i18n.ts.threeDAvatar }}</SearchLabel></template>
|
||||
<template #caption>{{ i18n.ts.threeDAvatar_description }}</template>
|
||||
<template #label><SearchLabel>{{ i18n.ts.worldAvatar }}</SearchLabel></template>
|
||||
<template #caption>{{ i18n.ts.worldAvatar_description }}</template>
|
||||
|
||||
<MkWorldAvatarManager/>
|
||||
</MkFolder>
|
||||
|
|
|
|||
|
|
@ -13283,13 +13283,13 @@ export interface Locale extends ILocale {
|
|||
"mfm": string;
|
||||
};
|
||||
/**
|
||||
* 3Dアバター
|
||||
* Worldアバター
|
||||
*/
|
||||
"threeDAvatar": string;
|
||||
"worldAvatar": string;
|
||||
/**
|
||||
* MisskeyWorld / MisskeyRoomsで使用可能なアバターを作成できます。
|
||||
* MisskeyWorld / MisskeyRoomsで使用可能な3Dアバターを作成できます。
|
||||
*/
|
||||
"threeDAvatar_description": string;
|
||||
"worldAvatar_description": string;
|
||||
"_miWorld": {
|
||||
/**
|
||||
* 描画を別スレッドに分離
|
||||
|
|
@ -13490,6 +13490,20 @@ export interface Locale extends ILocale {
|
|||
* 家具の数
|
||||
*/
|
||||
"furnituresCount": string;
|
||||
"_furniturePlacement": {
|
||||
/**
|
||||
* 床/上
|
||||
*/
|
||||
"top": string;
|
||||
/**
|
||||
* 底面/下
|
||||
*/
|
||||
"bottom": string;
|
||||
/**
|
||||
* 壁/側面
|
||||
*/
|
||||
"side": string;
|
||||
};
|
||||
"_objects": {
|
||||
/**
|
||||
* リングシェードフロアランプ
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue