Skip to content

Commit

Permalink
Rename activity->notifications module (directus#9446)
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten authored Nov 3, 2021
1 parent 69d8931 commit 428e5d4
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 35 deletions.
27 changes: 0 additions & 27 deletions app/src/modules/activity/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/modules/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const checkForSystem: NavigationGuard = (to, from) => {

if (to.params.collection === 'directus_activity') {
if (to.params.primaryKey) {
return `/activity/${to.params.primaryKey}`;
return `/notifications/${to.params.primaryKey}`;
} else {
return '/activity';
return '/notifications';
}
}

Expand Down
27 changes: 27 additions & 0 deletions app/src/modules/notifications/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { defineModule } from '@directus/shared/utils';
import NotificationsCollection from './routes/collection.vue';
import NotificationsItem from './routes/item.vue';

export default defineModule({
id: 'notifications',
hidden: true,
name: '$t:notifications',
icon: 'notifications',
routes: [
{
name: 'notifications-collection',
path: '',
component: NotificationsCollection,
props: true,
children: [
{
name: 'notifications-item',
path: ':primaryKey',
components: {
detail: NotificationsItem,
},
},
],
},
],
});
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</template>

<template #navigation>
<activity-navigation v-model:filter="roleFilter" />
<notifications-navigation v-model:filter="roleFilter" />
</template>

<component :is="`layout-${layout}`" v-bind="layoutState" class="layout">
Expand Down Expand Up @@ -61,7 +61,7 @@
<script lang="ts">
import { useI18n } from 'vue-i18n';
import { defineComponent, computed, ref } from 'vue';
import ActivityNavigation from '../components/navigation.vue';
import NotificationsNavigation from '../components/navigation.vue';
import usePreset from '@/composables/use-preset';
import { useLayout } from '@/composables/use-layout';
import LayoutSidebarDetail from '@/views/private/components/layout-sidebar-detail';
Expand All @@ -71,7 +71,7 @@ import { mergeFilters } from '@directus/shared/utils';
export default defineComponent({
name: 'ActivityCollection',
components: { ActivityNavigation, LayoutSidebarDetail, SearchInput },
components: { NotificationsNavigation, LayoutSidebarDetail, SearchInput },
props: {
primaryKey: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<v-icon name="launch" />
</v-button>

<v-button v-tooltip.bottom="t('done')" to="/activity" icon rounded>
<v-button v-tooltip.bottom="t('done')" to="/notifications" icon rounded>
<v-icon name="check" />
</v-button>
</template>
Expand Down Expand Up @@ -132,7 +132,7 @@ export default defineComponent({
}
function close() {
router.push('/activity');
router.push('/notifications');
}
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<transition-expand tag="div">
<div v-if="modelValue" class="inline">
<div class="padding-box">
<router-link class="link" to="/activity" :class="{ 'has-items': lastFour.length > 0 }">
<router-link class="link" to="/notifications" :class="{ 'has-items': lastFour.length > 0 }">
{{ t('show_all_activity') }}
</router-link>
<transition-group tag="div" name="notification" class="transition">
Expand Down

0 comments on commit 428e5d4

Please sign in to comment.