diff --git a/src/components/settings_modal/admin_tabs/auth_tab.js b/src/components/settings_modal/admin_tabs/auth_tab.js
new file mode 100644
index 000000000..0e0c082e8
--- /dev/null
+++ b/src/components/settings_modal/admin_tabs/auth_tab.js
@@ -0,0 +1,39 @@
+import BooleanSetting from '../helpers/boolean_setting.vue'
+import ChoiceSetting from '../helpers/choice_setting.vue'
+import IntegerSetting from '../helpers/integer_setting.vue'
+import StringSetting from '../helpers/string_setting.vue'
+import TupleSetting from '../helpers/tuple_setting.vue'
+import GroupSetting from '../helpers/group_setting.vue'
+import AttachmentSetting from '../helpers/attachment_setting.vue'
+import ListSetting from '../helpers/list_setting.vue'
+import ListTupleSetting from '../helpers/list_tuple_setting.vue'
+
+import SharedComputedObject from '../helpers/shared_computed_object.js'
+
+const AuthTab = {
+ provide () {
+ return {
+ defaultDraftMode: true,
+ defaultSource: 'admin'
+ }
+ },
+ components: {
+ BooleanSetting,
+ ChoiceSetting,
+ IntegerSetting,
+ StringSetting,
+ TupleSetting,
+ AttachmentSetting,
+ GroupSetting,
+ ListSetting,
+ ListTupleSetting
+ },
+ computed: {
+ ...SharedComputedObject(),
+ LDAPEnabled () {
+ return this.$store.state.adminSettings.draft[':pleroma'][':ldap'][':enabled']
+ },
+ }
+}
+
+export default AuthTab
diff --git a/src/components/settings_modal/admin_tabs/auth_tab.vue b/src/components/settings_modal/admin_tabs/auth_tab.vue
new file mode 100644
index 000000000..9b128a320
--- /dev/null
+++ b/src/components/settings_modal/admin_tabs/auth_tab.vue
@@ -0,0 +1,70 @@
+
+
+
+
{{ $t('admin_dash.auth.OAuth') }}
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
{{ $t('admin_dash.auth.LDAP') }}
+
+ -
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
diff --git a/src/components/settings_modal/helpers/list_setting.js b/src/components/settings_modal/helpers/list_setting.js
index 38783b213..c679f3dfa 100644
--- a/src/components/settings_modal/helpers/list_setting.js
+++ b/src/components/settings_modal/helpers/list_setting.js
@@ -53,6 +53,7 @@ export default {
},
suggestionsSet () {
const suggestions = this.backendDescriptionSuggestions
+ console.log(suggestions)
if (suggestions) {
return new Set(suggestions)
} else {
@@ -93,6 +94,7 @@ export default {
}
case 'add': {
+ if (!this.newValue) return this.visibleState
const res = [...this.visibleState, this.newValue]
this.newValue = ''
return res
@@ -108,7 +110,8 @@ export default {
case 'edit': {
const pre = this.visibleState.slice(0, index)
const post = this.visibleState.slice(index + 1)
- const string = event?.target?.value
+ const string = event.target.value
+ if (!string) return this.visibleState
return [...pre, string, ...post]
}
diff --git a/src/components/settings_modal/helpers/list_tuple_setting.js b/src/components/settings_modal/helpers/list_tuple_setting.js
new file mode 100644
index 000000000..2cbd93788
--- /dev/null
+++ b/src/components/settings_modal/helpers/list_tuple_setting.js
@@ -0,0 +1,44 @@
+import ListSetting from './list_setting.js'
+
+export default {
+ ...ListSetting,
+ data () {
+ return {
+ newValue: ['','']
+ }
+ },
+ methods: {
+ ...ListSetting.methods,
+ getValue ({ event, index, eventType, tuple }) {
+ switch (eventType) {
+ case 'add': {
+ if (!this.newValue[0] || !this.newValue[1]) return this.visibleState
+ const res = [...this.visibleState, this.newValue]
+ this.newValue = ['', '']
+ return res
+ }
+
+ case 'remove': {
+ const pre = this.visibleState.slice(0, index)
+ const post = this.visibleState.slice(index + 1)
+
+ return [...pre, ...post]
+ }
+
+ case 'edit': {
+ const pre = this.visibleState.slice(0, index)
+ const post = this.visibleState.slice(index + 1)
+ const item = this.visibleState[index]
+ const string = event.target.value
+ if (!string) return this.visibleState
+
+ if (tuple === 0) {
+ return [...pre, [string, item[1]], ...post]
+ } else {
+ return [...pre, [item[0], string], ...post]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/components/settings_modal/helpers/list_tuple_setting.vue b/src/components/settings_modal/helpers/list_tuple_setting.vue
new file mode 100644
index 000000000..a41fb09b0
--- /dev/null
+++ b/src/components/settings_modal/helpers/list_tuple_setting.vue
@@ -0,0 +1,109 @@
+
+
+
+
+ {{ backendDescriptionDescription + ' ' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss
index 30276c459..a9f560048 100644
--- a/src/components/settings_modal/settings_modal.scss
+++ b/src/components/settings_modal/settings_modal.scss
@@ -31,6 +31,11 @@
margin-top: 0;
}
+ p {
+ width: 40em;
+ line-height: 1.5;
+ }
+
.setting-list,
.option-list {
list-style-type: none;
diff --git a/src/components/settings_modal/settings_modal_admin_content.js b/src/components/settings_modal/settings_modal_admin_content.js
index f07fce6ac..568733abc 100644
--- a/src/components/settings_modal/settings_modal_admin_content.js
+++ b/src/components/settings_modal/settings_modal_admin_content.js
@@ -10,6 +10,7 @@ import UploadsTab from './admin_tabs/uploads_tab.vue'
import MailerTab from './admin_tabs/mailer_tab.vue'
import MonitoringTab from './admin_tabs/monitoring_tab.vue'
import RegistrationsTab from './admin_tabs/registrations_tab.vue'
+import AuthTab from './admin_tabs/auth_tab.vue'
import JobQueuesTab from './admin_tabs/job_queues_tab.vue'
import { useInterfaceStore } from 'src/stores/interface'
@@ -24,6 +25,7 @@ import {
faChartLine,
faDoorOpen,
faGears,
+ faKey,
faUpload
} from '@fortawesome/free-solid-svg-icons'
@@ -37,6 +39,7 @@ library.add(
faChartLine,
faDoorOpen,
faGears,
+ faKey,
faUpload
)
@@ -54,6 +57,7 @@ const SettingsModalAdminContent = {
MediaProxyTab,
LinksTab,
JobQueuesTab,
+ AuthTab,
MonitoringTab,
},
computed: {
diff --git a/src/components/settings_modal/settings_modal_admin_content.vue b/src/components/settings_modal/settings_modal_admin_content.vue
index 681633067..176e0167f 100644
--- a/src/components/settings_modal/settings_modal_admin_content.vue
+++ b/src/components/settings_modal/settings_modal_admin_content.vue
@@ -57,6 +57,14 @@
+
+