aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/components/PersonalInfo/shared
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/src/components/PersonalInfo/shared')
-rw-r--r--apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue15
-rw-r--r--apps/settings/src/components/PersonalInfo/shared/FederationControl.vue10
-rw-r--r--apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue13
3 files changed, 21 insertions, 17 deletions
diff --git a/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue b/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue
index 65c9686e36c..d039641ec72 100644
--- a/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue
+++ b/apps/settings/src/components/PersonalInfo/shared/AccountPropertySection.vue
@@ -46,13 +46,13 @@
<script>
import debounce from 'debounce'
-import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
-import NcTextArea from '@nextcloud/vue/dist/Components/NcTextArea.js'
+import NcInputField from '@nextcloud/vue/components/NcInputField'
+import NcTextArea from '@nextcloud/vue/components/NcTextArea'
import HeaderBar from './HeaderBar.vue'
import { savePrimaryAccountProperty } from '../../../service/PersonalInfo/PersonalInfoService.js'
-import { handleError } from '../../../utils/handlers.js'
+import { handleError } from '../../../utils/handlers.ts'
export default {
name: 'AccountPropertySection',
@@ -148,13 +148,14 @@ export default {
return
}
await this.updateProperty(value)
- }, 500)
+ }, 1000)
},
},
methods: {
async updateProperty(value) {
try {
+ this.hasError = false
const responseData = await savePrimaryAccountProperty(
this.name,
value,
@@ -180,10 +181,8 @@ export default {
this.isSuccess = true
setTimeout(() => { this.isSuccess = false }, 2000)
} else {
- this.$emit('update:value', this.initialValue)
handleError(error, errorMessage)
this.hasError = true
- setTimeout(() => { this.hasError = false }, 2000)
}
},
},
@@ -207,7 +206,7 @@ section {
display: flex;
gap: 0 2px;
- margin-right: 5px;
+ margin-inline-end: 5px;
margin-bottom: 5px;
}
}
@@ -218,7 +217,7 @@ section {
align-items: center;
&__icon {
- margin-right: 8px;
+ margin-inline-end: 8px;
align-self: start;
margin-top: 4px;
}
diff --git a/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue b/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue
index ee0aa80d209..e55a50056d3 100644
--- a/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue
+++ b/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue
@@ -30,9 +30,9 @@
</template>
<script>
-import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
-import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
-import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
+import NcActions from '@nextcloud/vue/components/NcActions'
+import NcActionButton from '@nextcloud/vue/components/NcActionButton'
+import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'
import { loadState } from '@nextcloud/initial-state'
import {
@@ -46,7 +46,7 @@ import {
UNPUBLISHED_READABLE_PROPERTIES,
} from '../../../constants/AccountPropertyConstants.js'
import { savePrimaryAccountPropertyScope } from '../../../service/PersonalInfo/PersonalInfoService.js'
-import { handleError } from '../../../utils/handlers.js'
+import { handleError } from '../../../utils/handlers.ts'
const {
federationEnabled,
@@ -146,7 +146,7 @@ export default {
}
// TODO: provide focus method from NcActions
- this.$refs.federationActions.$refs.menuButton.$el.focus()
+ this.$refs.federationActions.$refs?.triggerButton?.$el?.focus?.()
},
async updatePrimaryScope(scope) {
diff --git a/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue b/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue
index ca41db2a454..7c95c2b8f4c 100644
--- a/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue
+++ b/apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue
@@ -5,7 +5,7 @@
<template>
<div class="headerbar-label" :class="{ 'setting-property': isSettingProperty, 'profile-property': isProfileProperty }">
- <h3 v-if="isHeading">
+ <h3 v-if="isHeading" class="headerbar__heading">
<!-- Already translated as required by prop validator -->
{{ readable }}
</h3>
@@ -36,7 +36,7 @@
</template>
<script>
-import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
+import NcButton from '@nextcloud/vue/components/NcButton'
import Plus from 'vue-material-design-icons/Plus.vue'
import FederationControl from './FederationControl.vue'
@@ -130,7 +130,7 @@ export default {
}
&.setting-property {
- height: 44px;
+ height: 34px;
}
label {
@@ -138,11 +138,16 @@ export default {
}
}
+ .headerbar__heading {
+ margin: 0;
+ }
+
.federation-control {
margin: 0;
}
.button-vue {
- margin: 0 0 0 auto !important;
+ margin: 0 !important;
+ margin-inline-start: auto !important;
}
</style>