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

Make components compatible to nextcloud-vue 8 #1696

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions src/Forms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</NcAppNavigationNew>
<template #list>
<!-- Form-Owner-->
<NcAppNavigationCaption v-if="!noOwnedForms" :title="t('forms', 'Your Forms')" />
<NcAppNavigationCaption v-if="!noOwnedForms" :name="t('forms', 'Your Forms')" />
<AppNavigationForm v-for="form in forms"
:key="form.id"
:form="form"
Expand All @@ -44,7 +44,7 @@
@delete="onDeleteForm" />

<!-- Shared Forms-->
<NcAppNavigationCaption v-if="!noSharedForms" :title="t('forms', 'Shared with you')" />
<NcAppNavigationCaption v-if="!noSharedForms" :name="t('forms', 'Shared with you')" />
<AppNavigationForm v-for="form in sharedForms"
:key="form.id"
:form="form"
Expand All @@ -57,14 +57,16 @@
<!-- No forms & loading emptycontents -->
<NcAppContent v-if="loading || !hasForms || !routeHash || !routeAllowed">
<NcEmptyContent v-if="loading"
:title="t('forms', 'Loading forms …')">
class="forms-emptycontent"
:name="t('forms', 'Loading forms …')">
<template #icon>
<NcLoadingIcon :size="64" />
</template>
</NcEmptyContent>

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

<NcEmptyContent v-else
:title="canCreateForms ? t('forms', 'Select a form or create a new one') : t('forms', 'Please select a form')">
class="forms-emptycontent"
:name="canCreateForms ? t('forms', 'Select a form or create a new one') : t('forms', 'Please select a form')">
<template #icon>
<FormsIcon :size="64" />
</template>
Expand Down Expand Up @@ -378,3 +381,9 @@ export default {
},
}
</script>

<style scoped lang="scss">
.forms-emptycontent {
height: 100%;
}
</style>
4 changes: 3 additions & 1 deletion src/FormsEmptyContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<NcContent app-name="forms" class="forms-emptycontent">
<NcEmptyContent :title="currentModel.title"
<NcEmptyContent :name="currentModel.title"
:description="currentModel.description">
<template #icon>
<Icon :is="currentModel.icon" :size="64" />
Expand Down Expand Up @@ -82,5 +82,7 @@ export default {
.forms-emptycontent {
flex-basis: 100vw;
flex-direction: column;
height: 100%;
display: flex;
}
</style>
4 changes: 2 additions & 2 deletions src/FormsSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<div>
<NcSettingsSection :title="t('forms', 'Form creation')">
<NcSettingsSection :name="t('forms', 'Form creation')">
<NcCheckboxRadioSwitch ref="switchRestrictCreation"
:checked.sync="appConfig.restrictCreation"
class="forms-settings__creation__switch"
Expand All @@ -39,7 +39,7 @@
label="displayName"
@input="onCreationAllowedGroupsChange" />
</NcSettingsSection>
<NcSettingsSection :title="t('forms', 'Form sharing')">
<NcSettingsSection :name="t('forms', 'Form sharing')">
<NcCheckboxRadioSwitch ref="switchAllowPublicLink"
:checked.sync="appConfig.allowPublicLink"
type="switch"
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppNavigationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<NcListItem ref="navigationItem"
:title="formTitle"
:name="formTitle"
:to="{
name: routerTarget,
params: { hash: form.hash }
Expand All @@ -37,7 +37,7 @@
<IconCheck v-else-if="isExpired" :size="16" />
<FormsIcon v-else :size="16" />
</template>
<template v-if="hasSubtitle" #subtitle>
<template v-if="hasSubtitle" #subname>
{{ formSubtitle }}
</template>
<template v-if="!loading && !readOnly" #actions>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidebarTabs/SharingShareDiv.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<span>{{ displayNameAppendix }}</span>
</div>
<NcActions class="share-div__actions">
<NcActionCaption :title="t('forms', 'Permissions')" />
<NcActionCaption :name="t('forms', 'Permissions')" />
<NcActionCheckbox :checked="canAccessResults" @update:checked="updatePermissionResults">
{{ t('forms', 'View responses') }}
</NcActionCheckbox>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default {
align-items: center;
align-self: flex-end;
justify-content: flex-end;
padding: calc(var(--default-grid-baseline, 4px) * 2);
padding: var(--app-navigation-padding);
&__view-select {
display: flex;
Expand Down
10 changes: 8 additions & 2 deletions 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 :title="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 @@ -105,7 +106,7 @@
<div class="question-menu">
<NcActions ref="questionMenu"
:open.sync="questionMenuOpened"
:menu-title="t('forms', 'Add a question')"
:menu-name="t('forms', 'Add a question')"
:aria-label="t('forms', 'Add a question')"
:primary="true">
<template #icon>
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
Loading