mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Project switching (#206)
* Register notice component globally * Render button as flex in full width * Add buttons to / route * Rename block->full-width * Add hyrate overlay / project chooser placeholder * Make routes named * Dehydrate / hydrate when switching projects * Add choose project buttons to / route * Add main app component and hydration loader effect * Improve routing flow * Remove unused import statement * Fix test
This commit is contained in:
@@ -34,7 +34,7 @@ describe('Modules / Collections / Compositions / useNavigation', () => {
|
||||
navItems = useNavigation().navItems;
|
||||
});
|
||||
|
||||
expect(navItems).toEqual([
|
||||
expect(navItems.value).toEqual([
|
||||
{
|
||||
collection: 'test',
|
||||
name: 'Test',
|
||||
@@ -89,8 +89,8 @@ describe('Modules / Collections / Compositions / useNavigation', () => {
|
||||
navItems = useNavigation().navItems;
|
||||
});
|
||||
|
||||
expect(navItems[0].name).toBe('A Test');
|
||||
expect(navItems[1].name).toBe('B Test');
|
||||
expect(navItems[2].name).toBe('C Test');
|
||||
expect(navItems.value[0].name).toBe('A Test');
|
||||
expect(navItems.value[1].name).toBe('B Test');
|
||||
expect(navItems.value[2].name).toBe('C Test');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -31,5 +31,5 @@ export default function useNavigation() {
|
||||
});
|
||||
});
|
||||
|
||||
return { navItems: navItems.value };
|
||||
return { navItems: navItems };
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import { Collection } from '@/stores/collections/types';
|
||||
import CollectionsNavigation from '../../components/navigation/';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'collections-browse',
|
||||
components: { CollectionsNavigation },
|
||||
props: {
|
||||
collection: {
|
||||
|
||||
@@ -19,6 +19,7 @@ import api from '@/api';
|
||||
import CollectionsNavigation from '../../components/navigation/';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'collections-detail',
|
||||
components: { CollectionsNavigation },
|
||||
props: {
|
||||
collection: {
|
||||
|
||||
@@ -24,6 +24,7 @@ import useNavigation, { NavItem } from '../../compositions/use-navigation';
|
||||
import router from '@/router';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'collections-overview',
|
||||
components: {
|
||||
CollectionsNavigation
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user