mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 04:56:06 +02:00
add enable mutual friends sharing prompt
This commit is contained in:
@@ -189,6 +189,10 @@
|
||||
try {
|
||||
const snapshot = await database.getMutualGraphSnapshot();
|
||||
if (!snapshot || snapshot.size === 0) {
|
||||
if (isOptOut.value) {
|
||||
promptEnableMutualFriendsSharing();
|
||||
return;
|
||||
}
|
||||
await promptInitialFetch();
|
||||
return;
|
||||
}
|
||||
@@ -239,6 +243,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
function promptEnableMutualFriendsSharing() {
|
||||
ElMessageBox.confirm(
|
||||
t('view.charts.mutual_friend.enable_sharing_prompt.message'),
|
||||
t('view.charts.mutual_friend.enable_sharing_prompt.title'),
|
||||
{
|
||||
confirmButtonText: t('view.charts.mutual_friend.enable_sharing_prompt.confirm'),
|
||||
cancelButtonText: t('view.charts.mutual_friend.enable_sharing_prompt.cancel'),
|
||||
type: 'info'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
userStore.toggleSharedConnectionsOptOut();
|
||||
promptInitialFetch();
|
||||
})
|
||||
.catch(() => {
|
||||
// cancelled
|
||||
});
|
||||
}
|
||||
|
||||
function cancelFetch() {
|
||||
if (isFetching.value) {
|
||||
status.cancelRequested = true;
|
||||
|
||||
Reference in New Issue
Block a user