Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Jan 5, 2022
1 parent 0c9e236 commit f543b90
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 28 deletions.
5 changes: 4 additions & 1 deletion packages/web-app-files/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<size-info v-if="hasBulkActions && selectedFiles.length > 0" class="oc-mr uk-visible@l" />
<batch-actions v-if="hasBulkActions" />
</div>
<view-options />
<view-options v-if="!hideViewOptions" />
</div>
</div>
</div>
Expand Down Expand Up @@ -213,6 +213,9 @@ export default {
hasBulkActions() {
return this.$route.meta.hasBulkActions === true
},
hideViewOptions() {
return this.$route.meta.hideViewOptions === true
},
pageTitle() {
const title = this.$route.meta.title
return this.$gettext(title)
Expand Down
4 changes: 2 additions & 2 deletions packages/web-app-files/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const navItems = [
iconMaterial: appInfo.icon,
fillType: 'fill',
route: {
path: `/${appInfo.id}/spaces/`
path: `/${appInfo.id}/spaces/personal/`
}
},
{
Expand Down Expand Up @@ -80,7 +80,7 @@ const navItems = [
},
{
name: $gettext('Spaces'),
iconMaterial: 'space',
iconMaterial: 'layout-grid',
route: {
path: `/${appInfo.id}/spaces/projects`
},
Expand Down
1 change: 1 addition & 0 deletions packages/web-app-files/src/router/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
meta: {
hideFilelistActions: true,
hasBulkActions: true,
hideViewOptions: true,
title: $gettext('Spaces')
}
}
Expand Down
52 changes: 27 additions & 25 deletions packages/web-app-files/src/spaces/views/Spaces.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<template>
<div class="oc-p-s">
<h2 class="" v-text="$gettext('Spaces')"></h2>
<div class="">
<span v-text="$gettext('Access all project related files in one place.')"></span>
<a href="#" v-text="$gettext('Learn more about spaces.')"></a>
<h3 v-text="$gettext('Your spaces')"></h3>
<hr class="uk-margin-bottom" />
<h2 v-text="$gettext('Spaces')" />
<div>
<span v-text="$gettext('Access all project related files in one place.')" />
<a href="#" v-text="$gettext('Learn more about spaces.')" />
<h3 v-text="$gettext('Your spaces')" />
<hr class="oc-mb-s" />
</div>
<div class="spaces-list uk-container uk-container-expand uk-padding-remove">
<list-loader v-if="loadSpacesTask.isRunning" />
<template v-else>
<list-loader v-if="loadSpacesTask.isRunning" />
<template v-else>
<no-content-message
v-if="!spaces.length"
id="files-spaces-empty"
class="files-empty"
icon="layout-grid"
>
<template #message>
<span v-translate>You don't have access to any spaces</span>
</template>
</no-content-message>
<div v-else class="spaces-list">
<div
v-if="spaces.length"
class="
uk-grid-match uk-grid-column-small uk-grid-row-large uk-text-center uk-child-width-1-3@s
"
Expand All @@ -22,8 +31,8 @@
<span class="uk-card-media-top oc-border-b">
<img
:src="space.image || defaultImg"
:class="{ 'spaces-list-default-img': !space.image }"
:alt="$gettext('Space image')"
:class="{ 'oc-px-m': !space.image, 'oc-py-m': !space.image }"
alt=""
/>
</span>
<span class="uk-card-body">
Expand All @@ -32,15 +41,8 @@
</span>
</a>
</div>
<div v-else>
<no-content-message id="files-spaces-empty" class="files-empty" icon="space">
<template #message>
<span v-translate>You don't have access to any spaces</span>
</template>
</no-content-message>
</div>
</template>
</div>
</div>
</template>
</div>
</template>

Expand Down Expand Up @@ -85,6 +87,10 @@ export default {
</script>
<style lang="scss">
#files-spaces-empty {
height: 50vh;
}
.spaces-list {
&-card {
box-shadow: none !important;
Expand All @@ -99,9 +105,5 @@ export default {
.uk-card-media-top img {
max-height: 150px;
}
&-default-img {
padding: 40px;
}
}
</style>

0 comments on commit f543b90

Please sign in to comment.