Skip to content

Commit

Permalink
feat: mobile navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Guillemin committed Sep 29, 2023
1 parent 16f5b08 commit 5654a90
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
28 changes: 28 additions & 0 deletions src/main/webapp/src/components/BottomNavigation.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import { useDisplay } from 'vuetify';
const { mobile } = useDisplay();
const { t } = useI18n();
</script>

<template>
<v-bottom-navigation v-if="mobile" grow color="primary" class="pa-2">
<v-btn :to="{ name: 'projects' }" rounded="xl">
<v-icon icon="fas fa-folder" />
{{ t('navigation.item.projects') }}
</v-btn>
<v-btn :to="{ name: 'favorites' }" rounded="xl">
<v-icon icon="fas fa-star" />
{{ t('navigation.item.favorites') }}
</v-btn>
<v-btn :to="{ name: 'shared' }" rounded="xl">
<v-icon icon="fas fa-share-nodes" />
{{ t('navigation.item.shared') }}
</v-btn>
<v-btn :to="{ name: 'public' }" rounded="xl">
<v-icon icon="fas fa-globe" />
{{ t('navigation.item.public') }}
</v-btn>
</v-bottom-navigation>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { t } = useI18n();
<v-navigation-drawer class="pa-2">
<div class="d-flex flex-column h-100">
<h1 class="text-center my-3">Collabsoft</h1>
<v-list>
<v-list color="primary">
<v-list-item
prepend-icon="fas fa-folder"
:title="t('navigation.item.projects')"
Expand Down
7 changes: 4 additions & 3 deletions src/main/webapp/src/components/layouts/FilesLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ defineProps<{
v-for="(file, index) in files"
:key="index"
:cols="12"
:md="6"
:lg="4"
:xxl="3"
:sm="6"
:md="4"
:lg="3"
:xxl="2"
class="d-flex align-center pa-2"
>
<file-card :file="file" />
Expand Down
2 changes: 2 additions & 0 deletions src/main/webapp/src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import BottomNavigation from '@/components/BottomNavigation.vue';
import SettingsDialog from '@/components/dialogs/SettingsDialog.vue';
import InformationDrawer from '@/components/drawers/InformationDrawer.vue';
import NavigationDrawer from '@/components/drawers/NavigationDrawer.vue';
Expand All @@ -14,6 +15,7 @@ import NavigationDrawer from '@/components/drawers/NavigationDrawer.vue';
</div>
</v-container>
</v-main>
<bottom-navigation />
<information-drawer />
<settings-dialog />
</v-layout>
Expand Down

0 comments on commit 5654a90

Please sign in to comment.