Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent navigation #376

Merged
merged 88 commits into from Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
bca2695
Updated inter-ui with the reduced charset
manuelmeister Feb 24, 2020
490efdc
Moved definitions into different file (otherwise variables.scss are a…
manuelmeister Feb 24, 2020
7beeaa0
Remove background skeleton loaders.
manuelmeister Feb 24, 2020
3b090b4
Shows already loaded data and better styling of the day headers
manuelmeister Feb 29, 2020
37c0080
Created CardView as a container for the main content
manuelmeister Feb 29, 2020
5a24f37
Created CardView as a container for the main content
manuelmeister Feb 29, 2020
627b2ed
Improved text on home & implemented new CardView
manuelmeister Feb 29, 2020
9da48b4
Added searchbar (only mockup)
manuelmeister Feb 29, 2020
2d86c29
Fixed styling
manuelmeister Feb 29, 2020
11f76f2
Added CardView and readonly api input
manuelmeister Feb 29, 2020
bb796ae
Implemented CardView
manuelmeister Feb 29, 2020
2abb0a7
Added username similar as to isLoggedin
manuelmeister Feb 29, 2020
7db9c59
Added loading filter (probably not yet correctly implemented, but wor…
manuelmeister Feb 29, 2020
249af6b
Improved frontend-routing
manuelmeister Feb 29, 2020
a1f6ca8
Implemented CardView
manuelmeister Feb 29, 2020
9c5bdc5
Changed import style
manuelmeister Feb 29, 2020
9f9e9f7
Implemented CardView
manuelmeister Feb 29, 2020
546084a
Changed Periods from Component to View
manuelmeister Feb 29, 2020
cf46642
Added profile with email (read-only)
manuelmeister Feb 29, 2020
2ba69ad
Changed background color to standard material color
manuelmeister Feb 29, 2020
4c437d8
Implemented CardView and optimized for mobile with toggle between pic…
manuelmeister Feb 29, 2020
04e5732
Created navigation that is more consistent
manuelmeister Feb 29, 2020
65a85a2
Updated dependencies
manuelmeister Feb 29, 2020
06c5e18
Added profile link in login
manuelmeister Feb 29, 2020
c8f4373
Linted
manuelmeister Feb 29, 2020
ff3f255
Fixed conflicts from devel
manuelmeister Mar 1, 2020
2cf421b
Implemented the filter as instructed by @carlobeltrame
manuelmeister Mar 6, 2020
045fc2f
Changed structure to only use the `vue-router` and no layouts, which …
manuelmeister Mar 13, 2020
8e1d0cd
Renamed CardView.vue to ContentCard.vue and moved Picasso.vue and Cam…
manuelmeister Mar 13, 2020
909bbc1
isLoggedIn entfernt, da wir hier bereits eingeloggt sind.
manuelmeister Mar 14, 2020
a9103a2
Nur eine Periode zeigen. Evtl muss die Periode in Route aufgenommen w…
manuelmeister Mar 14, 2020
cf2190f
Rearranged
manuelmeister Mar 14, 2020
d78f702
Added character variants so that the characters are more easily disti…
manuelmeister Mar 14, 2020
f6ab0f1
Removed unnecessary definitions
manuelmeister Mar 14, 2020
45a6c9a
Removed unnecessary loggedin
manuelmeister Mar 14, 2020
6f039ce
Extracted MobileSearch.vue from WeekPicasso.vue and renamed Search.vu…
manuelmeister Mar 14, 2020
0a96674
Now with correct `v-app` usage, the sizing is correct
manuelmeister Mar 14, 2020
2db8675
Sidebar consistency improved
manuelmeister Mar 14, 2020
9149232
Now with correct `v-app` usage, the sizing is correct
manuelmeister Mar 14, 2020
bf96764
Removed unnecessary definition
manuelmeister Mar 14, 2020
0e7d6ed
Improved naming of view components
manuelmeister Mar 14, 2020
2a5d1ed
Store format in query. Also added parse Boolean query parameter function
manuelmeister Mar 14, 2020
b164743
Made route naming consistent
manuelmeister Mar 14, 2020
8033683
Removed username from auth.js, exchanged it for profile and removed r…
manuelmeister Mar 14, 2020
cad27f0
Merge branch 'devel' of github.com:ecamp/ecamp3 into consistent-navig…
manuelmeister Mar 14, 2020
10fc674
Use correct api input
manuelmeister Mar 14, 2020
93320e2
Renamed CampHome to Admin
manuelmeister Mar 14, 2020
52444e9
Fixed campRoute without subroute
manuelmeister Mar 14, 2020
9f082cb
Fixed problems and improved consistency with merged features from devel
manuelmeister Mar 14, 2020
78b8c58
Fixed layout of the forms
manuelmeister Mar 14, 2020
04bcc65
Improved spacing
manuelmeister Mar 15, 2020
b200a57
Optimized collaborator view
manuelmeister Mar 15, 2020
6381461
Optimized loading states
manuelmeister Mar 15, 2020
df14036
Removed class
manuelmeister Mar 15, 2020
717c7b5
Improved buttons. Added possibility for a custom icon
manuelmeister Mar 15, 2020
bc97826
Improved collaborators
manuelmeister Mar 15, 2020
858584a
Fixed spacing problem in form
manuelmeister Mar 15, 2020
7ef3521
Moved Collaborators.vue into view
manuelmeister Mar 15, 2020
42e64cc
Moved SideBar.vue into components
manuelmeister Mar 15, 2020
9cbbba2
Moved Collaborators.vue into view
manuelmeister Mar 15, 2020
fef7f77
Moved SideBar.vue into components
manuelmeister Mar 15, 2020
3964148
Merge branch 'devel' of github.com:ecamp/ecamp3 into consistent-navig…
manuelmeister Mar 15, 2020
39932d9
Fixed snapshots
manuelmeister Mar 15, 2020
514f1e5
Fixed snapshots
manuelmeister Mar 15, 2020
d93eb48
Fixed test, is wrong assumption
manuelmeister Mar 15, 2020
b07725a
Move v-if of MobileSearch.vue to CampOverview.vue
manuelmeister Mar 16, 2020
09a75b4
Fixed description
manuelmeister Mar 16, 2020
cf4d3d7
Linted whole project
manuelmeister Mar 16, 2020
cfaf177
Changed button to logout
manuelmeister Mar 16, 2020
901743f
Fixed eslint problem
manuelmeister Mar 16, 2020
f14edbe
Extracted UserMenu
manuelmeister Mar 16, 2020
92fc74d
Specified naming of components
manuelmeister Mar 16, 2020
14f2917
Removed condition on BackButton.vue
manuelmeister Mar 16, 2020
d6dfb74
Adjusted name of the components
manuelmeister Mar 16, 2020
57317ea
Changed mini setting to computed
manuelmeister Mar 16, 2020
1430475
Implemented suggestions from @carlobeltrame
manuelmeister Mar 17, 2020
a1ded10
Solved active button problem with query params
manuelmeister Mar 17, 2020
406b2db
The router-definition can't really be tested
manuelmeister Mar 17, 2020
11508a7
Implemented suggestions from @usu
manuelmeister Mar 18, 2020
751b0f6
Fixed console error
manuelmeister Mar 18, 2020
5a154e8
Fixed naming
manuelmeister Mar 18, 2020
3ab8a4f
Removed unnecessary styles
manuelmeister Mar 18, 2020
be84675
Used ContentCard in aside
manuelmeister Mar 18, 2020
c820cc7
Fixed wrong type
manuelmeister Mar 18, 2020
e34f702
Improved consistency in naming
manuelmeister Mar 18, 2020
1fdb274
Renamed overview to program
manuelmeister Mar 18, 2020
5cd48b8
Removed last reference to CardView
manuelmeister Mar 18, 2020
cdd4752
Added test for vue loading filter
manuelmeister Mar 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -57,9 +57,11 @@ public function indexAction() {
}
if ($user != null) {
$data['user'] = $user->getDisplayName();
$data['username'] = $user->getUsername();
$data['role'] = $user->getRole();
} else {
$data['user'] = 'guest';
$data['username'] = 'guest';
$data['role'] = 'guest';
}

Expand Down
Expand Up @@ -37,6 +37,14 @@ public function indexAction() {
}
if ($user != null) {
$data['user'] = $user->getDisplayName();

$data['profile'] = Link::factory([
'rel' => 'profile',
'route' => [
'name' => 'e-camp-api.rest.doctrine.user',
'params' => [ 'user_id' => $userId ]
]
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
]);
} else {
$data['user'] = 'guest';
}
Expand Down
133 changes: 120 additions & 13 deletions frontend/src/App.vue
@@ -1,25 +1,132 @@

<template>
<div id="app">
<component :is="layout">
<v-app>
<router-view name="topbar" />

<router-view name="aside" />

<!-- main content -->
<v-content>
<router-view />
</component>
</div>
</v-content>

<router-view name="bottombar" />

<!-- footer -->
<v-footer v-if="$vuetify.breakpoint.mdAndUp"
app color="grey lighten-5">
eCamp v0.1.0
</v-footer>
</v-app>
</template>

<script>
const defaultLayout = 'default'

export default {
name: 'App',
computed: {
layout () {
return (this.$route.meta.layout || defaultLayout) + '-layout'
}
}
name: 'App'
}
</script>
<style lang="scss">
@import "src/scss/global";
// consider replacing with CDN for production
@import '../node_modules/@mdi/font/css/materialdesignicons.css';

.v-navigation-drawer--temporary.v-navigation-drawer--clipped {
z-index: 5;
margin-top: 116px;
}

.v-btn.ec-drawer-collapse {
right: 0;
}

.v-content {
height: 100vh;
position: relative;
}

.v-app-bar .v-toolbar__content {
padding-left: 0;
padding-right: 0;
width: 100%;
}

.v-content__wrap {
overflow: scroll;
position: static;
}

.user-nav {
border-top-left-radius: 0!important;
border-top-right-radius: 0!important;
}

.v-navigation-drawer--temporary.v-navigation-drawer--clipped {
z-index: 5;
margin-top: 116px;
}

.v-btn--open {
background: #B0BEC5 !important;
color: rgba(0, 0, 0, 0.87) !important;
}

.ec-usermenu {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
right: 0;
left: inherit !important;

.v-list {
border-radius: 0;
}
}

.v-app-bar .v-toolbar__content {
padding-left: 0;
padding-right: 0;
width: 100%;
}

.v-navigation-drawer__content .v-card {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}

@media #{map-get($display-breakpoints, 'xs-only')}{
.v-content .container {
min-height: 100%;
display: flex;

.v-card {
margin-left: 0 !important;
margin-right: 0 !important;
flex: auto;
}
}
}

.ec-menu-left {
left: 0 !important;
font-feature-settings: 'tnum';
}

@media #{map-get($display-breakpoints, 'sm-and-down')}{
.container.container--fluid {
padding: 0;

& > .v-card {
border-radius: 0;
}
}
.sr-only-sm-and-down {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
clip-path: inset(50%);
border: 0;
}
}
</style>
16 changes: 16 additions & 0 deletions frontend/src/components/base/BackButton.vue
@@ -0,0 +1,16 @@
<template>
<v-btn aria-label="Zurück"
icon @click="$router.go(-1)">
<v-icon>mdi-arrow-left</v-icon>
</v-btn>
</template>

<script>
export default {
name: 'BackButton'
}
</script>

<style scoped>

</style>
10 changes: 7 additions & 3 deletions frontend/src/components/base/ButtonAdd.vue
@@ -1,9 +1,10 @@
<template>
<v-btn
small
class="px-3 px-sm-4"
min-width="0"
color="success"
v-on="$listeners">
<v-icon :left="$vuetify.breakpoint.smAndUp" size="150%">mdi-plus</v-icon>
<v-icon :left="$vuetify.breakpoint.smAndUp" size="150%">{{ icon }}</v-icon>
<span class="d-none d-sm-block">
<slot>Add</slot>
</span>
Expand All @@ -12,7 +13,10 @@

<script>
export default {
name: 'ButtonAdd'
name: 'ButtonAdd',
props: {
icon: { type: String, default: 'mdi-plus' }
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
}
}
</script>

Expand Down
10 changes: 7 additions & 3 deletions frontend/src/components/base/ButtonDelete.vue
@@ -1,9 +1,10 @@
<template>
<v-btn
small
class="px-3 px-sm-4"
min-width="0"
color="error"
v-on="$listeners">
<v-icon :left="$vuetify.breakpoint.smAndUp" size="150%">mdi-delete</v-icon>
<v-icon :left="$vuetify.breakpoint.smAndUp" size="150%">{{ icon }}</v-icon>
<span class="d-none d-sm-block">
<slot>Delete</slot>
</span>
Expand All @@ -12,7 +13,10 @@

<script>
export default {
name: 'ButtonDelete'
name: 'ButtonDelete',
props: {
icon: { type: String, default: 'mdi-delete' }
}
}
</script>

Expand Down
9 changes: 6 additions & 3 deletions frontend/src/components/base/ButtonEdit.vue
@@ -1,9 +1,9 @@
<template>
<v-btn
small
class="px-3 px-sm-4"
color="primary"
v-on="$listeners">
<v-icon :left="$vuetify.breakpoint.smAndUp" size="150%">mdi-pencil</v-icon>
<v-icon :left="$vuetify.breakpoint.smAndUp" size="150%">{{ icon }}</v-icon>
<span class="d-none d-sm-block">
<slot>Edit</slot>
</span>
Expand All @@ -12,7 +12,10 @@

<script>
export default {
name: 'ButtonEdit'
name: 'ButtonEdit',
props: {
icon: { type: String, default: 'mdi-pencil' }
}
}
</script>

Expand Down
37 changes: 20 additions & 17 deletions frontend/src/components/base/ContentCard.vue
Expand Up @@ -3,34 +3,37 @@ Displays the content wrapped inside a card.
-->

<template>
<v-card class="mb-4">
<v-toolbar dense color="blue-grey lighten-5">
<v-icon left>
{{ icon }}
</v-icon>
<v-toolbar-title>
<v-card :max-width="maxWidth" class="mx-auto">
<slot name="title">
<v-card-title v-if="title">
<v-icon v-if="icon" left>{{ icon }}</v-icon>
{{ title }}
</v-toolbar-title>
</v-toolbar>
<v-card-text>
<slot />
</v-card-text>
</v-card-title>
</slot>
<v-skeleton-loader v-if="!loaded" type="article" />
<slot v-else />
</v-card>
</template>

<script>
export default {
name: 'ContentCard',
props: {
icon: { type: String, required: true },
title: { type: String, required: true }
},
data () {
return {
}
loaded: { type: Boolean, required: false, default: true },
title: { type: String, required: false, default: '' },
icon: { type: String, required: false, default: '' },
maxWidth: { type: String, default: '' }
}
}
</script>

<style scoped>
.v-toolbar {
border-bottom: 1px solid;
}
.v-card__title {font-weight: 600;}

.static {
position: static;
}
</style>
34 changes: 34 additions & 0 deletions frontend/src/components/base/ContentGroup.vue
@@ -0,0 +1,34 @@
<!--
Displays the content wrapped inside a card.
manuelmeister marked this conversation as resolved.
Show resolved Hide resolved
-->

<template>
<v-sheet class="ec-content-group mb-8">
<slot name="title">
<div v-if="title" class="ec-content-group__title py-1 subtitle-1">
<v-icon v-if="icon" left>{{ icon }}</v-icon>
{{ title }}
</div>
</slot>
<v-skeleton-loader v-if="!loaded" type="article" />
<slot v-else />
</v-sheet>
</template>

<script>
export default {
name: 'ContentGroup',
props: {
loaded: { type: Boolean, required: false, default: true },
title: { type: String, required: false, default: '' },
icon: { type: String, required: false, default: '' },
maxWidth: { type: String, default: '' }
}
}
</script>

<style lang="scss" scoped>
.ec-content-group__title {
border-bottom: 1px solid map-get($blue-grey, 'lighten-4');
}
</style>
32 changes: 32 additions & 0 deletions frontend/src/components/base/Logo.vue
@@ -0,0 +1,32 @@
<template>
<v-toolbar-items>
<v-btn text class="px-2"
min-width="0" rounded
exact :to="{ name: 'home'}">
<v-toolbar-title>
<i>🏕</i>️<span v-if="text" class="ml-4 mr-2">eCamp</span>
</v-toolbar-title>
</v-btn>
<slot />
</v-toolbar-items>
</template>

<script>
import { campRoute } from '@/router'

export default {
name: 'Logo',
props: {
text: { type: Boolean, default: false }
},
computed: {
campHome () {
return this.camp ? campRoute(this.camp, 'overview') : false
}
}
}
</script>

<style scoped>

</style>