-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44013 from nextcloud/fieat/profile-pronounces
feat: add pronouns to account profile
- Loading branch information
Showing
30 changed files
with
938 additions
and
779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
apps/settings/src/components/PersonalInfo/PronounsSection.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
- SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
|
||
<template> | ||
<AccountPropertySection v-bind.sync="pronouns" | ||
:placeholder="randomPronounsPlaceholder" /> | ||
</template> | ||
|
||
<script> | ||
import { loadState } from '@nextcloud/initial-state' | ||
import AccountPropertySection from './shared/AccountPropertySection.vue' | ||
import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.js' | ||
const { pronouns } = loadState('settings', 'personalInfoParameters', {}) | ||
export default { | ||
name: 'PronounsSection', | ||
components: { | ||
AccountPropertySection, | ||
}, | ||
data() { | ||
return { | ||
pronouns: { ...pronouns, readable: NAME_READABLE_ENUM[pronouns.name] }, | ||
} | ||
}, | ||
computed: { | ||
randomPronounsPlaceholder() { | ||
const pronouns = [ | ||
this.t('settings', 'she/her'), | ||
this.t('settings', 'he/him'), | ||
this.t('settings', 'they/them'), | ||
] | ||
const pronounsExample = pronouns[Math.floor(Math.random() * pronouns.length)] | ||
return this.t('settings', `Your pronouns. E.g. ${pronounsExample}`, { pronounsExample }) | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.