Small changes

This commit is contained in:
Natsumi
2025-12-09 15:22:19 +11:00
parent 71969d663e
commit d2340285de
10 changed files with 33 additions and 21 deletions

View File

@@ -38,7 +38,7 @@ const inventoryReq = {
},
/**
* @param {{ n: number, offset: number, order: string, types: string }} params
* @param {{ n: number, offset: number, order: string, types?: string }} params
* @returns {Promise<{json: any, params}>}
*/
getInventoryItems(params) {

View File

@@ -241,7 +241,7 @@
@click="showFullscreenImageDialog(badge.badgeImageUrl)"
loading="lazy" />
<br />
<div style="display: block; width: 300px; word-break: normal">
<div style="display: block; width: 275px; word-break: normal">
<span>{{ badge.badgeName }}</span>
<br />
<span class="x-grey" style="font-size: 12px">{{ badge.badgeDescription }}</span>

View File

@@ -730,7 +730,7 @@
"translation_api": {
"header": "Bio Translate API",
"enable": "Enable",
"translation_api_key": "Google Translate API Key",
"translation_api_key": "Translate API Key",
"enable_tooltip": "Translate user bios"
},
"video_progress_pie": {
@@ -1415,6 +1415,7 @@
"mode_google": "Google Translate",
"mode_openai": "OpenAI",
"test": "Test",
"save": "Save",
"msg_disabled": "Translation API disabled",
"msg_fill_endpoint_model": "Please fill endpoint and model",
"msg_settings_invalid": "Translation settings invalid",

View File

@@ -219,7 +219,7 @@ export const useGalleryStore = defineStore('Gallery', () => {
return;
}
instanceStickersCache.value.push(inventoryId);
if (instanceStickersCache.value.size > 100) {
if (instanceStickersCache.value.length > 100) {
instanceStickersCache.value.shift();
}
const args = await inventoryRequest.getUserInventoryItem({
@@ -261,7 +261,10 @@ export const useGalleryStore = defineStore('Gallery', () => {
try {
const args = await vrcPlusImageRequest.getPrints(params);
args.json.sort((a, b) => {
return new Date(b.timestamp) - new Date(a.timestamp);
return (
new Date(b.timestamp).getTime() -
new Date(a.timestamp).getTime()
);
});
printTable.value = args.json;
} catch (error) {

View File

@@ -73,7 +73,11 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
state.nextFriendsRefresh = 3600; // 1hour
friendStore.refreshFriendsList();
authStore.updateStoredUser(userStore.currentUser);
if (gameStore.isGameRunning) {
if (
userStore.currentUser.last_activity &&
new Date(userStore.currentUser.last_activity) >
new Date(Date.now() - 3600 * 1000) // 1hour
) {
moderationStore.refreshPlayerModerations();
}
}

View File

@@ -15,6 +15,7 @@ import { useAvatarProviderStore } from './avatarProvider';
import { useAvatarStore } from './avatar';
import { useFavoriteStore } from './favorite';
import { useFriendStore } from './friend';
import { useGalleryStore } from './gallery';
import { useGameLogStore } from './gameLog';
import { useGameStore } from './game';
import { useGroupStore } from './group';
@@ -50,6 +51,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
const gameLogStore = useGameLogStore();
const updateLoopStore = useUpdateLoopStore();
const vrcStatusStore = useVrcStatusStore();
const galleryStore = useGalleryStore();
const { t } = useI18n();
const state = reactive({
@@ -257,8 +259,9 @@ export const useVrcxStore = defineStore('Vrcx', () => {
instanceStore.cachedInstances.delete(id);
}
});
avatarStore.cachedAvatarNames = new Map();
userStore.customUserTags = new Map();
avatarStore.cachedAvatarNames.clear();
userStore.customUserTags.clear();
galleryStore.cachedEmoji.clear();
}
function eventVrcxMessage(data) {

View File

@@ -108,7 +108,7 @@
<div class="favorites-search-card__content">
<div class="favorites-search-card__avatar is-empty"></div>
<div class="favorites-search-card__detail">
<span class="name">{{ favorite.name || favorite.id }}</span>
<span>{{ favorite.name || favorite.id }}</span>
</div>
</div>
<div class="favorites-search-card__actions">

View File

@@ -64,7 +64,7 @@
<div class="favorites-search-card__content">
<div class="favorites-search-card__avatar is-empty"></div>
<div class="favorites-search-card__detail">
<span class="name">{{ favorite.name || favorite.id }}</span>
<span>{{ favorite.name || favorite.id }}</span>
</div>
</div>
<div class="favorites-search-card__actions">

View File

@@ -104,7 +104,7 @@
<div class="favorites-search-card__content">
<div class="favorites-search-card__avatar is-empty"></div>
<div class="favorites-search-card__detail" v-once>
<span class="name">{{ favorite.name || favorite.id }}</span>
<span>{{ favorite.name || favorite.id }}</span>
<i
v-if="favorite.deleted"
:title="t('view.favorite.unavailable_tooltip')"

View File

@@ -36,16 +36,17 @@
</el-form>
<template v-if="form.translationApiType === 'google'">
<div style="font-size: 12px">{{ t('dialog.translation_api.description') }} <br /></div>
<el-input
v-model="form.translationApiKey"
type="textarea"
:placeholder="t('dialog.translation_api.placeholder')"
maxlength="39"
show-word-limit
style="display: block; margin-top: 10px">
</el-input>
<el-form label-position="top" label-width="120px" size="small">
<el-form-item :label="t('dialog.translation_api.description')">
<el-input
v-model="form.translationApiKey"
type="textarea"
:rows="4"
show-password
placeholder="AIzaSy..."
clearable />
</el-form-item>
</el-form>
</template>
<template v-if="form.translationApiType === 'openai'">