Skip to content

Commit

Permalink
adjust css for NcEmptyContent
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Nov 27, 2023
1 parent ce3b454 commit 858826a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/Forms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@
<!-- No forms & loading emptycontents -->
<NcAppContent v-if="loading || !hasForms || !routeHash || !routeAllowed">
<NcEmptyContent v-if="loading"
class="emptycontent"
:name="t('forms', 'Loading forms …')">
<template #icon>
<NcLoadingIcon :size="64" />
</template>
</NcEmptyContent>

<NcEmptyContent v-else-if="!hasForms"
class="emptycontent"
:name="t('forms', 'No forms created yet')">
<template #icon>
<FormsIcon :size="64" />
Expand All @@ -76,6 +78,7 @@
</NcEmptyContent>

<NcEmptyContent v-else
class="emptycontent"
:name="canCreateForms ? t('forms', 'Select a form or create a new one') : t('forms', 'Please select a form')">
<template #icon>
<FormsIcon :size="64" />
Expand Down Expand Up @@ -378,3 +381,10 @@ export default {
},
}
</script>
<style lang="scss" scoped>
.emptycontent {
display: flex;
height: 100%;
}
</style>
2 changes: 2 additions & 0 deletions src/FormsEmptyContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,7 @@ export default {
.forms-emptycontent {
flex-basis: 100vw;
flex-direction: column;
height: 100%;
display: flex;
}
</style>
8 changes: 7 additions & 1 deletion src/views/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

<template>
<NcAppContent v-if="isLoadingForm">
<NcEmptyContent :name="t('forms', 'Loading {title} …', { title: form.title })">
<NcEmptyContent class="emtpycontent"
:name="t('forms', 'Loading {title} …', { title: form.title })">
<template #icon>
<NcLoadingIcon :size="64" />
</template>
Expand Down Expand Up @@ -425,6 +426,11 @@ export default {
<style lang="scss" scoped>
@import '../scssmixins/markdownOutput';
.emptycontent {
display: flex;
height: 100%;
}
.app-content {
display: flex;
align-items: center;
Expand Down
9 changes: 8 additions & 1 deletion src/views/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

<template>
<NcAppContent v-if="loadingResults">
<NcEmptyContent :name="t('forms', 'Loading responses …')">
<NcEmptyContent class="emptycontent"
:name="t('forms', 'Loading responses …')">
<template #icon>
<NcLoadingIcon :size="64" />
</template>
Expand Down Expand Up @@ -96,6 +97,7 @@
<!-- No submissions -->
<section v-if="noSubmissions">
<NcEmptyContent :name="t('forms', 'No responses yet')"
class="emptycontent"
:description="t('forms', 'Results of submitted forms will show up here')">
<template #icon>
<IconPoll :size="64" />
Expand Down Expand Up @@ -326,6 +328,11 @@ export default {
</script>
<style lang="scss" scoped>
.emptycontent {
display: flex;
height: 100%;
}
.app-content {
display: flex;
align-items: center;
Expand Down
10 changes: 9 additions & 1 deletion src/views/Submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

<template>
<NcAppContent v-if="isLoadingForm">
<NcEmptyContent :name="t('forms', 'Loading {title} …', { title: form.title })">
<NcEmptyContent class="emptycontent"
:name="t('forms', 'Loading {title} …', { title: form.title })">
<template #icon>
<NcLoadingIcon :size="64" />
</template>
Expand Down Expand Up @@ -58,12 +59,14 @@
</header>
<NcEmptyContent v-if="loading"
class="emptycontent"
:name="t('forms', 'Submitting form …')">
<template #icon>
<NcLoadingIcon :size="64" />
</template>
</NcEmptyContent>
<NcEmptyContent v-else-if="success || !form.canSubmit"
class="emptycontent"
:name="t('forms', 'Thank you for completing the form!')"
:description="form.submissionMessage">
<template #icon>
Expand All @@ -75,6 +78,7 @@
</template>
</NcEmptyContent>
<NcEmptyContent v-else-if="isExpired"
class="emptycontent"
:name="t('forms', 'Form expired')"
:description="t('forms', 'This form has expired and is no longer taking answers')">
<template #icon>
Expand Down Expand Up @@ -455,6 +459,10 @@ export default {
<style lang="scss" scoped>
@import '../scssmixins/markdownOutput';
.emptycontent {
display: flex;
height: 100%;
}
.app-content {
display: flex;
align-items: center;
Expand Down

0 comments on commit 858826a

Please sign in to comment.