diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-07-26 09:13:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 09:13:24 +0200 |
commit | 623d53315bd9519a3dbc71f16da2d5d7f35d9fc6 (patch) | |
tree | d4f300ca2bb62cc0e6ab269440aaff48a3024d04 /apps/settings/src | |
parent | 1b7c5c941a242c7785f4301ea19e5d279f51cf40 (diff) | |
parent | 34308087d61b894d08b51d96b63809cc8902e7a0 (diff) | |
download | nextcloud-server-623d53315bd9519a3dbc71f16da2d5d7f35d9fc6.tar.gz nextcloud-server-623d53315bd9519a3dbc71f16da2d5d7f35d9fc6.zip |
Merge pull request #33206 from nextcloud/enh/27869/consolidate
Consolidate account property getters
Diffstat (limited to 'apps/settings/src')
6 files changed, 29 insertions, 29 deletions
diff --git a/apps/settings/src/components/PersonalInfo/BiographySection/BiographySection.vue b/apps/settings/src/components/PersonalInfo/BiographySection/BiographySection.vue index c8aacb03e9c..c8464f7b243 100644 --- a/apps/settings/src/components/PersonalInfo/BiographySection/BiographySection.vue +++ b/apps/settings/src/components/PersonalInfo/BiographySection/BiographySection.vue @@ -24,10 +24,10 @@ <section> <HeaderBar :account-property="accountProperty" label-for="biography" - :scope.sync="primaryBiography.scope" /> + :scope.sync="biography.scope" /> - <Biography :biography.sync="primaryBiography.value" - :scope.sync="primaryBiography.scope" /> + <Biography :biography.sync="biography.value" + :scope.sync="biography.scope" /> </section> </template> @@ -39,7 +39,7 @@ import HeaderBar from '../shared/HeaderBar' import { ACCOUNT_PROPERTY_READABLE_ENUM } from '../../../constants/AccountPropertyConstants' -const { biographyMap: { primaryBiography } } = loadState('settings', 'personalInfoParameters', {}) +const { biography } = loadState('settings', 'personalInfoParameters', {}) export default { name: 'BiographySection', @@ -52,7 +52,7 @@ export default { data() { return { accountProperty: ACCOUNT_PROPERTY_READABLE_ENUM.BIOGRAPHY, - primaryBiography, + biography, } }, } diff --git a/apps/settings/src/components/PersonalInfo/DisplayNameSection/DisplayNameSection.vue b/apps/settings/src/components/PersonalInfo/DisplayNameSection/DisplayNameSection.vue index caee7e7c68e..d808369e9fb 100644 --- a/apps/settings/src/components/PersonalInfo/DisplayNameSection/DisplayNameSection.vue +++ b/apps/settings/src/components/PersonalInfo/DisplayNameSection/DisplayNameSection.vue @@ -26,15 +26,15 @@ label-for="displayname" :is-editable="displayNameChangeSupported" :is-valid-section="isValidSection" - :scope.sync="primaryDisplayName.scope" /> + :scope.sync="displayName.scope" /> <template v-if="displayNameChangeSupported"> - <DisplayName :display-name.sync="primaryDisplayName.value" - :scope.sync="primaryDisplayName.scope" /> + <DisplayName :display-name.sync="displayName.value" + :scope.sync="displayName.scope" /> </template> <span v-else> - {{ primaryDisplayName.value || t('settings', 'No full name set') }} + {{ displayName.value || t('settings', 'No full name set') }} </span> </section> </template> @@ -48,7 +48,7 @@ import HeaderBar from '../shared/HeaderBar' import { ACCOUNT_PROPERTY_READABLE_ENUM } from '../../../constants/AccountPropertyConstants' import { validateStringInput } from '../../../utils/validate' -const { displayNameMap: { primaryDisplayName } } = loadState('settings', 'personalInfoParameters', {}) +const { displayName } = loadState('settings', 'personalInfoParameters', {}) const { displayNameChangeSupported } = loadState('settings', 'accountParameters', {}) export default { @@ -63,13 +63,13 @@ export default { return { accountProperty: ACCOUNT_PROPERTY_READABLE_ENUM.DISPLAYNAME, displayNameChangeSupported, - primaryDisplayName, + displayName, } }, computed: { isValidSection() { - return validateStringInput(this.primaryDisplayName.value) + return validateStringInput(this.displayName.value) }, }, } diff --git a/apps/settings/src/components/PersonalInfo/HeadlineSection/HeadlineSection.vue b/apps/settings/src/components/PersonalInfo/HeadlineSection/HeadlineSection.vue index 4f3714aa0ee..1a608d2fc02 100644 --- a/apps/settings/src/components/PersonalInfo/HeadlineSection/HeadlineSection.vue +++ b/apps/settings/src/components/PersonalInfo/HeadlineSection/HeadlineSection.vue @@ -24,10 +24,10 @@ <section> <HeaderBar :account-property="accountProperty" label-for="headline" - :scope.sync="primaryHeadline.scope" /> + :scope.sync="headline.scope" /> - <Headline :headline.sync="primaryHeadline.value" - :scope.sync="primaryHeadline.scope" /> + <Headline :headline.sync="headline.value" + :scope.sync="headline.scope" /> </section> </template> @@ -39,7 +39,7 @@ import HeaderBar from '../shared/HeaderBar' import { ACCOUNT_PROPERTY_READABLE_ENUM } from '../../../constants/AccountPropertyConstants' -const { headlineMap: { primaryHeadline } } = loadState('settings', 'personalInfoParameters', {}) +const { headline } = loadState('settings', 'personalInfoParameters', {}) export default { name: 'HeadlineSection', @@ -52,7 +52,7 @@ export default { data() { return { accountProperty: ACCOUNT_PROPERTY_READABLE_ENUM.HEADLINE, - primaryHeadline, + headline, } }, } diff --git a/apps/settings/src/components/PersonalInfo/OrganisationSection/OrganisationSection.vue b/apps/settings/src/components/PersonalInfo/OrganisationSection/OrganisationSection.vue index 2a0b93d552f..b436b2edd0b 100644 --- a/apps/settings/src/components/PersonalInfo/OrganisationSection/OrganisationSection.vue +++ b/apps/settings/src/components/PersonalInfo/OrganisationSection/OrganisationSection.vue @@ -24,10 +24,10 @@ <section> <HeaderBar :account-property="accountProperty" label-for="organisation" - :scope.sync="primaryOrganisation.scope" /> + :scope.sync="organisation.scope" /> - <Organisation :organisation.sync="primaryOrganisation.value" - :scope.sync="primaryOrganisation.scope" /> + <Organisation :organisation.sync="organisation.value" + :scope.sync="organisation.scope" /> </section> </template> @@ -39,7 +39,7 @@ import HeaderBar from '../shared/HeaderBar' import { ACCOUNT_PROPERTY_READABLE_ENUM } from '../../../constants/AccountPropertyConstants' -const { organisationMap: { primaryOrganisation } } = loadState('settings', 'personalInfoParameters', {}) +const { organisation } = loadState('settings', 'personalInfoParameters', {}) export default { name: 'OrganisationSection', @@ -52,7 +52,7 @@ export default { data() { return { accountProperty: ACCOUNT_PROPERTY_READABLE_ENUM.ORGANISATION, - primaryOrganisation, + organisation, } }, } diff --git a/apps/settings/src/components/PersonalInfo/ProfileSection/ProfileSection.vue b/apps/settings/src/components/PersonalInfo/ProfileSection/ProfileSection.vue index 46048e96c0e..0196b3161a7 100644 --- a/apps/settings/src/components/PersonalInfo/ProfileSection/ProfileSection.vue +++ b/apps/settings/src/components/PersonalInfo/ProfileSection/ProfileSection.vue @@ -47,8 +47,8 @@ import ProfilePreviewCard from './ProfilePreviewCard' import { ACCOUNT_PROPERTY_READABLE_ENUM } from '../../../constants/AccountPropertyConstants' const { - organisationMap: { primaryOrganisation: { value: organisation } }, - displayNameMap: { primaryDisplayName: { value: displayName } }, + organisation: { value: organisation }, + displayName: { value: displayName }, profileEnabled, userId, } = loadState('settings', 'personalInfoParameters', {}) diff --git a/apps/settings/src/components/PersonalInfo/RoleSection/RoleSection.vue b/apps/settings/src/components/PersonalInfo/RoleSection/RoleSection.vue index 51026f4860c..b3e95bc8153 100644 --- a/apps/settings/src/components/PersonalInfo/RoleSection/RoleSection.vue +++ b/apps/settings/src/components/PersonalInfo/RoleSection/RoleSection.vue @@ -24,10 +24,10 @@ <section> <HeaderBar :account-property="accountProperty" label-for="role" - :scope.sync="primaryRole.scope" /> + :scope.sync="role.scope" /> - <Role :role.sync="primaryRole.value" - :scope.sync="primaryRole.scope" /> + <Role :role.sync="role.value" + :scope.sync="role.scope" /> </section> </template> @@ -39,7 +39,7 @@ import HeaderBar from '../shared/HeaderBar' import { ACCOUNT_PROPERTY_READABLE_ENUM } from '../../../constants/AccountPropertyConstants' -const { roleMap: { primaryRole } } = loadState('settings', 'personalInfoParameters', {}) +const { role } = loadState('settings', 'personalInfoParameters', {}) export default { name: 'RoleSection', @@ -52,7 +52,7 @@ export default { data() { return { accountProperty: ACCOUNT_PROPERTY_READABLE_ENUM.ROLE, - primaryRole, + role, } }, } |