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:
Rijk van Zanten
2020-03-17 16:25:43 -04:00
committed by GitHub
parent b26b91f785
commit 346e6f95ce
23 changed files with 252 additions and 55 deletions

View File

@@ -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');
});
});

View File

@@ -31,5 +31,5 @@ export default function useNavigation() {
});
});
return { navItems: navItems.value };
return { navItems: navItems };
}

View File

@@ -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: {

View File

@@ -19,6 +19,7 @@ import api from '@/api';
import CollectionsNavigation from '../../components/navigation/';
export default defineComponent({
name: 'collections-detail',
components: { CollectionsNavigation },
props: {
collection: {

View File

@@ -24,6 +24,7 @@ import useNavigation, { NavItem } from '../../compositions/use-navigation';
import router from '@/router';
export default defineComponent({
name: 'collections-overview',
components: {
CollectionsNavigation
},