summaryrefslogtreecommitdiffstats
path: root/apps/settings/src/components
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-11-03 13:31:03 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-11-21 16:28:56 +0100
commit86d9626901b619223eda77aeb2f2197c8c65da69 (patch)
tree968b236db7d4423e4463ddc339eca0c273849ff1 /apps/settings/src/components
parentd0c72cc11a14f4c1d9ca9db82ed4f2b19346bfb6 (diff)
downloadnextcloud-server-86d9626901b619223eda77aeb2f2197c8c65da69.tar.gz
nextcloud-server-86d9626901b619223eda77aeb2f2197c8c65da69.zip
Add mastodon personal info field
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/src/components')
-rw-r--r--apps/settings/src/components/PersonalInfo/MastodonSection.vue50
1 files changed, 50 insertions, 0 deletions
diff --git a/apps/settings/src/components/PersonalInfo/MastodonSection.vue b/apps/settings/src/components/PersonalInfo/MastodonSection.vue
new file mode 100644
index 00000000000..e257b8e96c7
--- /dev/null
+++ b/apps/settings/src/components/PersonalInfo/MastodonSection.vue
@@ -0,0 +1,50 @@
+<!--
+ - @copyright 2022 Christopher Ng <chrng8@gmail.com>
+ -
+ - @author Christopher Ng <chrng8@gmail.com>
+ -
+ - @license AGPL-3.0-or-later
+ -
+ - This program is free software: you can redistribute it and/or modify
+ - it under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ -
+ - This program is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - GNU Affero General Public License for more details.
+ -
+ - You should have received a copy of the GNU Affero General Public License
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -
+-->
+
+<template>
+ <AccountPropertySection v-bind.sync="mastodon"
+ :placeholder="t('settings', 'Your Mastodon handle')" />
+</template>
+
+<script>
+import { loadState } from '@nextcloud/initial-state'
+
+import AccountPropertySection from './shared/AccountPropertySection.vue'
+
+import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.js'
+
+const { mastodon } = loadState('settings', 'personalInfoParameters', {})
+
+export default {
+ name: 'TwitterSection',
+
+ components: {
+ AccountPropertySection,
+ },
+
+ data() {
+ return {
+ mastodon: { ...mastodon, readable: NAME_READABLE_ENUM[mastodon.name] },
+ }
+ },
+}
+</script>