add enable mutual friends sharing prompt

This commit is contained in:
pa
2025-11-25 22:00:05 +09:00
committed by Natsumi
parent 05c5b32755
commit 5176447e69
4 changed files with 40 additions and 8 deletions
@@ -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;