add tooltip to notification

This commit is contained in:
pa
2026-01-20 22:27:43 +09:00
committed by Natsumi
parent 0fa6e48fd7
commit ded6b0ccf0
5 changed files with 42 additions and 21 deletions

View File

@@ -194,7 +194,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
userStore.userDialog.visible = false; userStore.userDialog.visible = false;
worldStore.worldDialog.visible = false; worldStore.worldDialog.visible = false;
groupStore.groupDialog.visible = false; groupStore.groupDialog.visible = false;
D.visible = true;
D.loading = true; D.loading = true;
D.id = avatarId; D.id = avatarId;
D.inCache = false; D.inCache = false;
@@ -222,7 +222,6 @@ export const useAvatarStore = defineStore('Avatar', () => {
if (typeof ref2 !== 'undefined') { if (typeof ref2 !== 'undefined') {
D.ref = ref2; D.ref = ref2;
uiStore.setDialogCrumbLabel('avatar', D.id, D.ref?.name || D.id); uiStore.setDialogCrumbLabel('avatar', D.id, D.ref?.name || D.id);
updateVRChatAvatarCache();
if ( if (
ref2.releaseStatus !== 'public' && ref2.releaseStatus !== 'public' &&
ref2.authorId !== userStore.currentUser.id ref2.authorId !== userStore.currentUser.id
@@ -242,6 +241,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
D.ref?.name || D.id D.ref?.name || D.id
); );
getAvatarGallery(avatarId); getAvatarGallery(avatarId);
D.visible = true;
updateVRChatAvatarCache(); updateVRChatAvatarCache();
if (/quest/.test(ref.tags)) { if (/quest/.test(ref.tags)) {
D.isQuestFallback = true; D.isQuestFallback = true;

View File

@@ -149,7 +149,6 @@ export const useGroupStore = defineStore('Group', () => {
worldStore.worldDialog.visible = false; worldStore.worldDialog.visible = false;
avatarStore.avatarDialog.visible = false; avatarStore.avatarDialog.visible = false;
const D = groupDialog.value; const D = groupDialog.value;
D.visible = true;
D.loading = true; D.loading = true;
D.id = groupId; D.id = groupId;
D.inGroup = false; D.inGroup = false;
@@ -188,6 +187,7 @@ export const useGroupStore = defineStore('Group', () => {
); );
D.inGroup = args.ref.membershipStatus === 'member'; D.inGroup = args.ref.membershipStatus === 'member';
D.ownerDisplayName = args.ref.ownerId; D.ownerDisplayName = args.ref.ownerId;
D.visible = true;
userRequest userRequest
.getCachedUser({ .getCachedUser({
userId: args.ref.ownerId userId: args.ref.ownerId

View File

@@ -1,4 +1,4 @@
import { computed, reactive, ref, shallowReactive, watch } from 'vue'; import { computed, nextTick, reactive, ref, shallowReactive, watch } from 'vue';
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import { toast } from 'vue-sonner'; import { toast } from 'vue-sonner';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
@@ -799,7 +799,7 @@ export const useUserStore = defineStore('User', () => {
} }
} }
}); });
D.visible = true;
D.loading = true; D.loading = true;
D.avatars = []; D.avatars = [];
D.worlds = []; D.worlds = [];
@@ -900,8 +900,6 @@ export const useUserStore = defineStore('User', () => {
} else if (D.ref.friendRequestStatus === 'outgoing') { } else if (D.ref.friendRequestStatus === 'outgoing') {
D.outgoingRequest = true; D.outgoingRequest = true;
} }
applyUserDialogLocation(true);
userRequest.getUser(args.params); userRequest.getUser(args.params);
let inCurrentWorld = false; let inCurrentWorld = false;
if ( if (
@@ -1018,6 +1016,8 @@ export const useUserStore = defineStore('User', () => {
groupStore.handleGroupRepresented(args1); groupStore.handleGroupRepresented(args1);
}); });
D.loading = false; D.loading = false;
D.visible = true;
applyUserDialogLocation(true);
}); });
} }
}); });

View File

@@ -103,7 +103,6 @@ export const useWorldStore = defineStore('World', () => {
D.treeData = {}; D.treeData = {};
D.bundleSizes = []; D.bundleSizes = [];
D.lastUpdated = ''; D.lastUpdated = '';
D.visible = false;
D.loading = true; D.loading = true;
D.inCache = false; D.inCache = false;
D.cacheSize = ''; D.cacheSize = '';
@@ -166,6 +165,7 @@ export const useWorldStore = defineStore('World', () => {
D.id, D.id,
D.ref?.name || D.id D.ref?.name || D.id
); );
D.visible = true;
D.isFavorite = favoriteStore.getCachedFavoritesByObjectId( D.isFavorite = favoriteStore.getCachedFavoritesByObjectId(
D.id D.id
); );

View File

@@ -5,7 +5,8 @@ import {
Tooltip, Tooltip,
TooltipContent, TooltipContent,
TooltipProvider, TooltipProvider,
TooltipTrigger TooltipTrigger,
TooltipWrapper
} from '../../components/ui/tooltip'; } from '../../components/ui/tooltip';
import { import {
ArrowUpDown, ArrowUpDown,
@@ -467,27 +468,47 @@ export const createColumns = ({
{original.message && {original.message &&
original.message !== original.message !==
`This is a generated invite to ${original.details?.worldName}` ? ( `This is a generated invite to ${original.details?.worldName}` ? (
<span class="block w-full min-w-0 truncate"> <TooltipWrapper
{original.message} content={original.message}
</span> delayDuration={500}
>
<span class="block w-full min-w-0 truncate">
{original.message}
</span>
</TooltipWrapper>
) : null} ) : null}
{!original.message && {!original.message &&
original.details?.inviteMessage ? ( original.details?.inviteMessage ? (
<span class="block w-full min-w-0 truncate"> <TooltipWrapper
{original.details.inviteMessage} content={original.details.inviteMessage}
</span> delayDuration={500}
>
<span class="block w-full min-w-0 truncate">
{original.details.inviteMessage}
</span>
</TooltipWrapper>
) : null} ) : null}
{!original.message && {!original.message &&
original.details?.requestMessage ? ( original.details?.requestMessage ? (
<span class="block w-full min-w-0 truncate"> <TooltipWrapper
{original.details.requestMessage} content={original.details.requestMessage}
</span> delayDuration={500}
>
<span class="block w-full min-w-0 truncate">
{original.details.requestMessage}
</span>
</TooltipWrapper>
) : null} ) : null}
{!original.message && {!original.message &&
original.details?.responseMessage ? ( original.details?.responseMessage ? (
<span class="block w-full min-w-0 truncate"> <TooltipWrapper
{original.details.responseMessage} content={original.details.responseMessage}
</span> delayDuration={500}
>
<span class="block w-full min-w-0 truncate">
{original.details.responseMessage}
</span>
</TooltipWrapper>
) : null} ) : null}
</div> </div>
); );