Skip to content

Commit

Permalink
Fix activity-bar-id handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Dec 11, 2024
1 parent 0991d59 commit f2eca1b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions client/src/components/ActivityBar/ActivityBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@ defineExpose({
v-if="activity.id === 'upload'"
:id="`${activity.id}`"
:key="activity.id"
:activity-bar-id="props.activityBarId"
:icon="activity.icon"
:title="activity.title"
:tooltip="activity.tooltip" />
<InteractiveItem
v-else-if="activity.to && activity.id === 'interactivetools'"
:id="`${activity.id}`"
:key="activity.id"
:activity-bar-id="props.activityBarId"
:icon="activity.icon"
:is-active="isActiveRoute(activity.to)"
:title="activity.title"
Expand Down Expand Up @@ -274,6 +276,7 @@ defineExpose({
<NotificationItem
v-if="isConfigLoaded && config.enable_notification_system"
id="notifications"
:activity-bar-id="props.activityBarId"
:icon="faBell"
:is-active="isActiveSideBar('notifications') || isActiveRoute('/user/notifications')"
title="Notifications"
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/ActivityBar/Items/InteractiveItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface Props {
icon: IconDefinition;
isActive: boolean;
to: string;
activityBarId: string;
}
defineProps<Props>();
Expand All @@ -27,7 +28,7 @@ const emit = defineEmits<{
const tooltip = computed(() =>
totalCount.value === 1
? `You currently have 1 active interactive tool`
? "You currently have 1 active interactive tool"
: `You currently have ${totalCount.value} active interactive tools`
);
</script>
Expand All @@ -36,7 +37,7 @@ const tooltip = computed(() =>
<ActivityItem
v-if="totalCount > 0"
:id="id"
:activity-bar-id="id"
:activity-bar-id="activityBarId"
:icon="icon"
:indicator="totalCount"
:is-active="isActive"
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ActivityBar/Items/NotificationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const { totalUnreadCount } = storeToRefs(useNotificationsStore());
export interface Props {
id: string;
activityBarId: string;
title: string;
icon: IconDefinition;
isActive: boolean;
Expand All @@ -32,7 +33,7 @@ const tooltip = computed(() =>
<template>
<ActivityItem
:id="id"
:activity-bar-id="'notifications'"
:activity-bar-id="activityBarId"
:icon="icon"
:indicator="totalUnreadCount"
:is-active="isActive"
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ActivityBar/Items/UploadItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface Props {
title: string;
icon: IconDefinition;
tooltip: string;
activityBarId: string;
}
defineProps<Props>();
Expand All @@ -40,7 +41,7 @@ function onUploadModal() {
<template>
<ActivityItem
:id="id"
:activity-bar-id="id"
:activity-bar-id="activityBarId"
:title="title"
:tooltip="tooltip"
:icon="icon"
Expand Down

0 comments on commit f2eca1b

Please sign in to comment.