mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 22:36:05 +02:00
improve ui
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog v-model:open="isVisible">
|
<Dialog v-model:open="isVisible">
|
||||||
<DialogContent>
|
<DialogContent class="sm:max-w-xl">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>{{ t('dialog.launch.header') }}</DialogTitle>
|
<DialogTitle>{{ t('dialog.launch.header') }}</DialogTitle>
|
||||||
<DialogDescription class="sr-only">{{ t('dialog.launch.header') }}</DialogDescription>
|
<DialogDescription class="sr-only">{{ t('dialog.launch.header') }}</DialogDescription>
|
||||||
|
|||||||
@@ -492,7 +492,8 @@
|
|||||||
"favorites_only_tooltip": "Filter favorites only",
|
"favorites_only_tooltip": "Filter favorites only",
|
||||||
"search_placeholder": "Search",
|
"search_placeholder": "Search",
|
||||||
"filter_placeholder": "Filter",
|
"filter_placeholder": "Filter",
|
||||||
"load_mutual_friends": "Load Mutual Friends"
|
"load_mutual_friends": "Load Mutual Friends",
|
||||||
|
"mutual_loading_hint": "View progress on the Mutual Friend Graph page"
|
||||||
},
|
},
|
||||||
"charts": {
|
"charts": {
|
||||||
"instance_activity": {
|
"instance_activity": {
|
||||||
|
|||||||
@@ -78,7 +78,22 @@
|
|||||||
@update:modelValue="toggleFriendsListBulkUnfriendMode" />
|
@update:modelValue="toggleFriendsListBulkUnfriendMode" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<Button variant="outline" class="mr-2" :disabled="isMutualFetching || isMutualOptOut" @click="loadMutualFriends">
|
<TooltipWrapper
|
||||||
|
v-if="isMutualFetching"
|
||||||
|
:content="t('view.friend_list.mutual_loading_hint')">
|
||||||
|
<span>
|
||||||
|
<Button variant="outline" class="mr-2" disabled>
|
||||||
|
<Loader2 class="h-4 w-4 animate-spin" />
|
||||||
|
{{ t('view.friend_list.load_mutual_friends') }}
|
||||||
|
</Button>
|
||||||
|
</span>
|
||||||
|
</TooltipWrapper>
|
||||||
|
<Button
|
||||||
|
v-else
|
||||||
|
variant="outline"
|
||||||
|
class="mr-2"
|
||||||
|
:disabled="isMutualOptOut"
|
||||||
|
@click="loadMutualFriends">
|
||||||
{{ t('view.friend_list.load_mutual_friends') }}
|
{{ t('view.friend_list.load_mutual_friends') }}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -130,6 +145,7 @@
|
|||||||
import { toast } from 'vue-sonner';
|
import { toast } from 'vue-sonner';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
import { Loader2 } from 'lucide-vue-next';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useAppearanceSettingsStore,
|
useAppearanceSettingsStore,
|
||||||
@@ -143,6 +159,7 @@
|
|||||||
import { DataTableLayout } from '../../components/ui/data-table';
|
import { DataTableLayout } from '../../components/ui/data-table';
|
||||||
import { Switch } from '../../components/ui/switch';
|
import { Switch } from '../../components/ui/switch';
|
||||||
import { Toggle } from '../../components/ui/toggle';
|
import { Toggle } from '../../components/ui/toggle';
|
||||||
|
import { TooltipWrapper } from '../../components/ui/tooltip';
|
||||||
import { createColumns } from './columns.jsx';
|
import { createColumns } from './columns.jsx';
|
||||||
import { localeIncludes } from '../../shared/utils';
|
import { localeIncludes } from '../../shared/utils';
|
||||||
import removeConfusables, { removeWhitespace } from '../../services/confusables';
|
import removeConfusables, { removeWhitespace } from '../../services/confusables';
|
||||||
@@ -309,13 +326,15 @@
|
|||||||
getAllUserStats(),
|
getAllUserStats(),
|
||||||
getAllUserMutualCount(),
|
getAllUserMutualCount(),
|
||||||
getAllUserMutualOptedOut()
|
getAllUserMutualOptedOut()
|
||||||
]).then((results) => {
|
])
|
||||||
|
.then((results) => {
|
||||||
if (results.every((result) => result.status === 'fulfilled')) {
|
if (results.every((result) => result.status === 'fulfilled')) {
|
||||||
lastFriendStatsRefreshAt = Date.now();
|
lastFriendStatsRefreshAt = Date.now();
|
||||||
lastFriendStatsRefreshKey = friendStatsRefreshKey;
|
lastFriendStatsRefreshKey = friendStatsRefreshKey;
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
}).finally(() => {
|
})
|
||||||
|
.finally(() => {
|
||||||
friendStatsRefreshInFlight = null;
|
friendStatsRefreshInFlight = null;
|
||||||
});
|
});
|
||||||
return friendStatsRefreshInFlight;
|
return friendStatsRefreshInFlight;
|
||||||
@@ -564,10 +583,7 @@
|
|||||||
async function loadMutualFriends() {
|
async function loadMutualFriends() {
|
||||||
if (isMutualFetching.value) return;
|
if (isMutualFetching.value) return;
|
||||||
await chartsStore.fetchMutualGraph();
|
await chartsStore.fetchMutualGraph();
|
||||||
await Promise.allSettled([
|
await Promise.allSettled([getAllUserMutualCount(), getAllUserMutualOptedOut()]);
|
||||||
getAllUserMutualCount(),
|
|
||||||
getAllUserMutualOptedOut()
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user