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