mirror of
https://github.com/vrcx-team/VRCX.git
synced 2026-04-06 00:32:02 +02:00
Open feed avatar image, remove dead avatar provider
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ref, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
import { removeFromArray } from '../shared/utils';
|
||||
import { useAdvancedSettingsStore } from './settings/advanced';
|
||||
import { watchState } from '../service/watchState';
|
||||
|
||||
@@ -14,10 +15,8 @@ export const useAvatarProviderStore = defineStore('AvatarProvider', () => {
|
||||
const avatarRemoteDatabaseProvider = ref('');
|
||||
|
||||
const avatarRemoteDatabaseProviderList = ref([
|
||||
'https://api.avtrdb.com/v2/avatar/search/vrcx',
|
||||
'https://avtr.just-h.party/vrcx_search.php'
|
||||
'https://api.avtrdb.com/v2/avatar/search/vrcx'
|
||||
]);
|
||||
|
||||
watch(
|
||||
() => watchState.isLoggedIn,
|
||||
() => {
|
||||
@@ -30,16 +29,17 @@ export const useAvatarProviderStore = defineStore('AvatarProvider', () => {
|
||||
avatarRemoteDatabaseProviderList.value = JSON.parse(
|
||||
await configRepository.getString(
|
||||
'VRCX_avatarRemoteDatabaseProviderList',
|
||||
'[ "https://api.avtrdb.com/v2/avatar/search/vrcx", "https://avtr.just-h.party/vrcx_search.php" ]'
|
||||
'[ "https://api.avtrdb.com/v2/avatar/search/vrcx" ]'
|
||||
)
|
||||
);
|
||||
if (
|
||||
avatarRemoteDatabaseProviderList.value.length === 1 &&
|
||||
avatarRemoteDatabaseProviderList.value[0] ===
|
||||
avatarRemoteDatabaseProviderList.value.includes(
|
||||
'https://avtr.just-h.party/vrcx_search.php'
|
||||
)
|
||||
) {
|
||||
avatarRemoteDatabaseProviderList.value.unshift(
|
||||
'https://api.avtrdb.com/v2/avatar/search/vrcx'
|
||||
removeFromArray(
|
||||
avatarRemoteDatabaseProviderList.value,
|
||||
'https://avtr.just-h.party/vrcx_search.php'
|
||||
);
|
||||
await configRepository.setString(
|
||||
'VRCX_avatarRemoteDatabaseProviderList',
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from 'lucide-vue-next';
|
||||
import { formatDateFilter, statusClass, timeToText } from '../../shared/utils';
|
||||
import { i18n } from '../../plugin';
|
||||
import { useUserStore } from '../../stores';
|
||||
import { useUserStore, useGalleryStore } from '../../stores';
|
||||
|
||||
const { t } = i18n.global;
|
||||
|
||||
@@ -81,6 +81,7 @@ const expandedRow = ({ row }) => {
|
||||
}
|
||||
|
||||
if (type === 'Avatar') {
|
||||
const { showFullscreenImageDialog } = useGalleryStore();
|
||||
return (
|
||||
<div class="pl-5 text-sm">
|
||||
<div class="flex items-center">
|
||||
@@ -91,8 +92,13 @@ const expandedRow = ({ row }) => {
|
||||
src={
|
||||
original.previousCurrentAvatarThumbnailImageUrl
|
||||
}
|
||||
class="x-link h-30 w-40 rounded"
|
||||
class="x-link h-30 w-40 rounded pointer"
|
||||
loading="lazy"
|
||||
onClick={() =>
|
||||
showFullscreenImageDialog(
|
||||
original.previousCurrentAvatarImageUrl
|
||||
)
|
||||
}
|
||||
/>
|
||||
<br />
|
||||
<AvatarInfo
|
||||
@@ -119,8 +125,13 @@ const expandedRow = ({ row }) => {
|
||||
src={
|
||||
original.currentAvatarThumbnailImageUrl
|
||||
}
|
||||
class="x-link h-30 w-40 rounded"
|
||||
class="x-link h-30 w-40 rounded pointer"
|
||||
loading="lazy"
|
||||
onClick={() =>
|
||||
showFullscreenImageDialog(
|
||||
original.currentAvatarImageUrl
|
||||
)
|
||||
}
|
||||
/>
|
||||
<br />
|
||||
<AvatarInfo
|
||||
|
||||
Reference in New Issue
Block a user