Browse Source
feat(settings): allow to set own timezone in personal settings
feat(settings): allow to set own timezone in personal settings
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>pull/54470/head
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
9 changed files with 66 additions and 0 deletions
-
2apps/provisioning_api/lib/Controller/AUserDataOCSController.php
-
8apps/provisioning_api/lib/Controller/UsersController.php
-
1apps/provisioning_api/lib/ResponseDefinitions.php
-
3apps/provisioning_api/tests/Controller/UsersControllerTest.php
-
1apps/settings/lib/Settings/Personal/PersonalInfo.php
-
43apps/settings/src/components/PersonalInfo/TimezoneSection.vue
-
2apps/settings/src/constants/AccountPropertyConstants.ts
-
3apps/settings/src/main-personal-info.js
-
3apps/settings/templates/settings/personal/personal.info.php
@ -0,0 +1,43 @@ |
|||
<!-- |
|||
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors |
|||
- SPDX-License-Identifier: AGPL-3.0-or-later |
|||
--> |
|||
|
|||
<script setup lang="ts"> |
|||
import { loadState } from '@nextcloud/initial-state' |
|||
import { t } from '@nextcloud/l10n' |
|||
import { ref, watch } from 'vue' |
|||
import NcTimezonePicker from '@nextcloud/vue/components/NcTimezonePicker' |
|||
import HeaderBar from './shared/HeaderBar.vue' |
|||
import { savePrimaryAccountProperty } from '../../service/PersonalInfo/PersonalInfoService.js' |
|||
|
|||
const { timezone: currentTimezone } = loadState<{ timezone: string }>('settings', 'personalInfoParameters') |
|||
|
|||
const inputId = 'account-property-timezone' |
|||
const timezone = ref(currentTimezone) |
|||
watch(timezone, () => { |
|||
savePrimaryAccountProperty('timezone', timezone.value) |
|||
}) |
|||
</script> |
|||
|
|||
<template> |
|||
<section class="timezone-section"> |
|||
<HeaderBar :input-id="inputId" |
|||
:readable="t('settings', 'Timezone')" /> |
|||
|
|||
<NcTimezonePicker v-model="timezone" |
|||
class="timezone-section__picker" |
|||
:input-id="inputId" /> |
|||
</section> |
|||
</template> |
|||
|
|||
<style scoped lang="scss"> |
|||
.timezone-section { |
|||
padding: 10px; |
|||
|
|||
&__picker { |
|||
margin-top: 6px; |
|||
width: 100%; |
|||
} |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue