Skip to content

Commit 702f3b7

Browse files
committed
fix(AdminSettings): migrate to NcSettingsSection
Signed-off-by: Grigorii K. Shartsev <[email protected]>
1 parent 534fb29 commit 702f3b7

12 files changed

+73
-76
lines changed

src/components/AdminSettings/AllowedGroups.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
-->
55

66
<template>
7-
<section id="allowed_groups" class="videocalls section">
8-
<h2>{{ t('spreed', 'Limit to groups') }}</h2>
7+
<NcSettingsSection id="allowed_groups" :name="t('spreed', 'Limit to groups')">
98
<p class="settings-hint">
109
{{ t('spreed', 'When at least one group is selected, only people of the listed groups can be part of conversations.') }}
1110
</p>
@@ -82,7 +81,7 @@
8281
<p>
8382
<em>{{ t('spreed', 'When a call has started, everyone with access to the conversation can join the call.') }}</em>
8483
</p>
85-
</section>
84+
</NcSettingsSection>
8685
</template>
8786

8887
<script>
@@ -95,6 +94,7 @@ import { generateOcsUrl } from '@nextcloud/router'
9594
9695
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
9796
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
97+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
9898
9999
const startCallOptions = [
100100
{ value: 0, label: t('spreed', 'Everyone') },
@@ -109,6 +109,7 @@ export default {
109109
components: {
110110
NcButton,
111111
NcSelect,
112+
NcSettingsSection,
112113
},
113114
114115
data() {

src/components/AdminSettings/BotsSettings.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
-->
55

66
<template>
7-
<section id="bots_settings" class="bots-settings section">
8-
<h2>{{ t('spreed', 'Bots settings') }}</h2>
9-
7+
<NcSettingsSection id="bots_settings"
8+
class="bots-settings"
9+
:name="t('spreed', 'Bots settings')"
10+
doc-url="https://nextcloud-talk.readthedocs.io/en/latest/bot-list/">
1011
<!-- eslint-disable-next-line vue/no-v-html -->
1112
<p class="settings-hint" v-html="botsSettingsDescription" />
1213

@@ -74,7 +75,7 @@
7475
rel="noreferrer nofollow">
7576
{{ t('spreed', 'Find more bots') }} ↗
7677
</NcButton>
77-
</section>
78+
</NcSettingsSection>
7879
</template>
7980

8081
<script>
@@ -88,6 +89,7 @@ import moment from '@nextcloud/moment'
8889
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
8990
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
9091
import NcPopover from '@nextcloud/vue/dist/Components/NcPopover.js'
92+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
9193
9294
import { BOT } from '../../constants.js'
9395
import { getAllBots } from '../../services/botsService.ts'
@@ -99,6 +101,7 @@ export default {
99101
NcPopover,
100102
NcButton,
101103
NcCheckboxRadioSwitch,
104+
NcSettingsSection,
102105
},
103106
104107
data() {

src/components/AdminSettings/Federation.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
-->
55

66
<template>
7-
<section id="federation_settings" class="federation section">
8-
<h2>
9-
{{ t('spreed', 'Federation') }}
10-
<small>{{ t('spreed', 'Beta') }}</small>
11-
</h2>
7+
<NcSettingsSection id="federation_settings"
8+
class="federation"
9+
:name="t('spreed', 'Federation')"
10+
doc-url="https://docs.nextcloud.com/server/latest/user_manual/en/talk/advanced_features.html#federated-conversation">
11+
<!-- <small>{{ t('spreed', 'Beta') }}</small> -->
1212

1313
<NcCheckboxRadioSwitch :checked="isFederationEnabled"
1414
:disabled="loading"
@@ -76,7 +76,7 @@
7676
</NcButton>
7777
</div>
7878
</template>
79-
</section>
79+
</NcSettingsSection>
8080
</template>
8181

8282
<script>
@@ -90,6 +90,7 @@ import { generateOcsUrl, generateUrl } from '@nextcloud/router'
9090
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
9191
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
9292
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
93+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
9394
9495
const FEDERATION_ENABLED = loadState('spreed', 'federation_enabled', false)
9596
const FEDERATION_INCOMING_ENABLED = loadState('spreed', 'federation_incoming_enabled', true)
@@ -104,6 +105,7 @@ export default {
104105
NcButton,
105106
NcCheckboxRadioSwitch,
106107
NcSelect,
108+
NcSettingsSection,
107109
},
108110
109111
data() {

src/components/AdminSettings/GeneralSettings.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
-->
55

66
<template>
7-
<section id="general_settings" class="videocalls section">
8-
<h2>{{ t('spreed', 'General settings') }}</h2>
9-
7+
<NcSettingsSection id="general_settings" :name="t('spreed', 'General settings')">
108
<h3>{{ t('spreed', 'Default notification settings') }}</h3>
119

1210
<NcSelect v-model="defaultGroupNotification"
@@ -36,7 +34,7 @@
3634
@update:checked="saveConversationsFilesPublicShares">
3735
{{ t('spreed', 'Allow conversations on public shares for files') }}
3836
</NcCheckboxRadioSwitch>
39-
</section>
37+
</NcSettingsSection>
4038
</template>
4139

4240
<script>
@@ -45,6 +43,7 @@ import { t } from '@nextcloud/l10n'
4543
4644
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
4745
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
46+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
4847
4948
const defaultGroupNotificationOptions = [
5049
{ value: 1, label: t('spreed', 'All messages') },
@@ -57,6 +56,7 @@ export default {
5756
components: {
5857
NcCheckboxRadioSwitch,
5958
NcSelect,
59+
NcSettingsSection,
6060
},
6161
6262
data() {

src/components/AdminSettings/HostedSignalingServer.vue

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,12 @@
44
-->
55

66
<template>
7-
<section v-if="showForm"
7+
<NcSettingsSection v-if="showForm"
88
id="hosted_signaling_server"
9-
class="hosted-signaling section">
10-
<h2>
11-
{{ t('spreed', 'Hosted high-performance backend') }}
12-
</h2>
13-
14-
<p class="settings-hint">
15-
{{ t('spreed', 'Our partner Struktur AG provides a service where a hosted signaling server can be requested. For this you only need to fill out the form below and your Nextcloud will request it. Once the server is set up for you the credentials will be filled automatically. This will overwrite the existing signaling server settings.') }}
16-
</p>
17-
9+
class="hosted-signaling"
10+
:name="t('spreed', 'Hosted high-performance backend')"
11+
:description="t('spreed', 'Our partner Struktur AG provides a service where a hosted signaling server can be requested. For this you only need to fill out the form below and your Nextcloud will request it. Once the server is set up for you the credentials will be filled automatically. This will overwrite the existing signaling server settings.')"
12+
doc-url="https://www.spreed.eu/nextcloud-talk-high-performance-backend/">
1813
<template v-if="!trialAccount.status">
1914
<NcTextField :value.sync="hostedHPBNextcloudUrl"
2015
class="form__textfield"
@@ -115,7 +110,7 @@
115110
{{ t('spreed', 'Delete the signaling server account') }}
116111
</NcButton>
117112
</template>
118-
</section>
113+
</NcSettingsSection>
119114
</template>
120115

121116
<script>
@@ -127,6 +122,7 @@ import { generateOcsUrl } from '@nextcloud/router'
127122
128123
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
129124
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
125+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
130126
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
131127
132128
import { EventBus } from '../../services/EventBus.js'
@@ -138,6 +134,7 @@ export default {
138134
NcButton,
139135
NcSelect,
140136
NcTextField,
137+
NcSettingsSection,
141138
},
142139
143140
data() {

src/components/AdminSettings/MatterbridgeIntegration.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
-->
55

66
<template>
7-
<section id="matterbridge_settings" class="matterbridge section">
8-
<h2>
9-
{{ t('spreed', 'Matterbridge integration') }}
10-
<small>{{ t('spreed', 'Beta') }}</small>
11-
</h2>
7+
<NcSettingsSection id="matterbridge_settings"
8+
class="matterbridge"
9+
:name="t('spreed', 'Matterbridge integration')"
10+
doc-url="https://nextcloud-talk.readthedocs.io/en/latest/matterbridge/">
11+
<!-- <small>{{ t('spreed', 'Beta') }}</small> -->
1212

1313
<template v-if="matterbridgeVersion">
1414
<p class="settings-hint">
@@ -40,7 +40,7 @@
4040
{{ installButtonText }}
4141
</NcButton>
4242
</template>
43-
</section>
43+
</NcSettingsSection>
4444
</template>
4545

4646
<script>
@@ -50,6 +50,7 @@ import { t } from '@nextcloud/l10n'
5050
5151
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
5252
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
53+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
5354
5455
import {
5556
enableMatterbridgeApp,
@@ -63,6 +64,7 @@ export default {
6364
components: {
6465
NcButton,
6566
NcCheckboxRadioSwitch,
67+
NcSettingsSection,
6668
},
6769
6870
data() {

src/components/AdminSettings/RecordingServers.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
-->
66

77
<template>
8-
<section id="recording_server" class="recording-servers section">
9-
<h2>
10-
{{ t('spreed', 'Recording backend') }}
11-
</h2>
12-
8+
<NcSettingsSection id="recording_server"
9+
class="recording-servers"
10+
:name="t('spreed', 'Recording backend')"
11+
doc-url="https://github.com/nextcloud/nextcloud-talk-recording/blob/main/docs/installation.md">
1312
<NcNoteCard v-if="!showForm" type="warning">
1413
{{ t('spreed', 'Recording backend configuration is only possible with a high-performance backend.') }}
1514
</NcNoteCard>
@@ -75,7 +74,7 @@
7574
</template>
7675
</template>
7776
</template>
78-
</section>
77+
</NcSettingsSection>
7978
</template>
8079

8180
<script>
@@ -92,6 +91,7 @@ import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
9291
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
9392
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
9493
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
94+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
9595
9696
import RecordingServer from '../../components/AdminSettings/RecordingServer.vue'
9797
import TransitionWrapper from '../UIShared/TransitionWrapper.vue'
@@ -115,6 +115,7 @@ export default {
115115
NcCheckboxRadioSwitch,
116116
NcNoteCard,
117117
NcPasswordField,
118+
NcSettingsSection,
118119
Plus,
119120
RecordingServer,
120121
TransitionWrapper,

src/components/AdminSettings/SIPBridge.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
-->
55

66
<template>
7-
<div id="sip-bridge" class="sip-bridge section">
8-
<h2>{{ t('spreed', 'SIP configuration') }}</h2>
9-
7+
<NcSettingsSection id="sip-bridge" class="sip-bridge" :name="t('spreed', 'SIP configuration')">
108
<NcNoteCard v-if="!showForm" type="warning">
119
{{ t('spreed', 'SIP configuration is only possible with a high-performance backend.') }}
1210
</NcNoteCard>
@@ -75,7 +73,7 @@
7573
{{ t('spreed', 'Save changes') }}
7674
</NcButton>
7775
</template>
78-
</div>
76+
</NcSettingsSection>
7977
</template>
8078

8179
<script>
@@ -92,6 +90,7 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadi
9290
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
9391
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
9492
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
93+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
9594
import NcTextArea from '@nextcloud/vue/dist/Components/NcTextArea.js'
9695
9796
import { EventBus } from '../../services/EventBus.js'
@@ -108,6 +107,7 @@ export default {
108107
NcSelect,
109108
NcTextArea,
110109
NcPasswordField,
110+
NcSettingsSection,
111111
},
112112
113113
data() {

src/components/AdminSettings/SignalingServers.vue

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44
-->
55

66
<template>
7-
<section id="signaling_server" class="signaling-servers section">
8-
<h2>
9-
{{ t('spreed', 'High-performance backend') }}
10-
</h2>
11-
12-
<p class="settings-hint">
13-
{{ t('spreed', 'An external signaling server should optionally be used for larger installations. Leave empty to use the internal signaling server.') }}
14-
</p>
15-
7+
<NcSettingsSection id="signaling_server"
8+
class="signaling-servers"
9+
:name="t('spreed', 'High-performance backend')"
10+
:description="t('spreed', 'An external signaling server should optionally be used for larger installations. Leave empty to use the internal signaling server.')"
11+
doc-url="https://nextcloud.com/talk/">
1612
<NcNoteCard v-if="!isCacheConfigured" type="warning">
1713
{{ t('spreed', 'It is highly recommended to set up a distributed cache when using Nextcloud Talk together with a High Performance Back-end.') }}
1814
</NcNoteCard>
@@ -63,7 +59,7 @@
6359
:label="t('spreed', 'Shared secret')"
6460
label-visible
6561
@update:value="updateSecret" />
66-
</section>
62+
</NcSettingsSection>
6763
</template>
6864

6965
<script>
@@ -79,6 +75,7 @@ import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
7975
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
8076
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
8177
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
78+
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
8279
8380
import SignalingServer from '../../components/AdminSettings/SignalingServer.vue'
8481
import TransitionWrapper from '../UIShared/TransitionWrapper.vue'
@@ -94,6 +91,7 @@ export default {
9491
NcCheckboxRadioSwitch,
9592
NcNoteCard,
9693
NcPasswordField,
94+
NcSettingsSection,
9795
Plus,
9896
SignalingServer,
9997
TransitionWrapper,

0 commit comments

Comments
 (0)