Merge branch 'feature/show-settings-from-whitelist' into 'develop'

Disable tab if its settings are not on the whitelist

Closes #113

See merge request pleroma/admin-fe!130
This commit is contained in:
Angelina Filippova 2020-05-15 22:32:27 +00:00
commit af929419fb
14 changed files with 56 additions and 41 deletions

View file

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Statuses count changes when an instance is selected and shows the amount of statuses from an originating instance - Statuses count changes when an instance is selected and shows the amount of statuses from an originating instance
- Add a dialog window with a confirmation when a remove button is clicked on the Settings page - Add a dialog window with a confirmation when a remove button is clicked on the Settings page
- Disable tab on the Settings page if there are no settings on this tab that can be changed in Admin FE
### Fixed ### Fixed

View file

@ -3,7 +3,7 @@
<el-form ref="activitypubData" :model="activitypubData" :label-position="labelPosition" :label-width="labelWidth" data-search=":activitypub"> <el-form ref="activitypubData" :model="activitypubData" :label-position="labelPosition" :label-width="labelWidth" data-search=":activitypub">
<setting :setting-group="activitypub" :data="activitypubData"/> <setting :setting-group="activitypub" :data="activitypubData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="activitypub" class="divider thick-line"/>
<el-form ref="userData" :model="userData" :label-position="labelPosition" :label-width="labelWidth" data-search=":user"> <el-form ref="userData" :model="userData" :label-position="labelPosition" :label-width="labelWidth" data-search=":user">
<setting :setting-group="user" :data="userData"/> <setting :setting-group="user" :data="userData"/>
</el-form> </el-form>

View file

@ -3,15 +3,15 @@
<el-form ref="pleromaAuthenticatorData" :model="pleromaAuthenticatorData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="pleromaAuthenticatorData" :model="pleromaAuthenticatorData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="pleromaAuthenticator" :data="pleromaAuthenticatorData"/> <setting :setting-group="pleromaAuthenticator" :data="pleromaAuthenticatorData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="pleromaAuthenticator" class="divider thick-line"/>
<el-form ref="authData" :model="authData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="authData" :model="authData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="auth" :data="authData"/> <setting :setting-group="auth" :data="authData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="auth" class="divider thick-line"/>
<el-form ref="ldapData" :model="ldapData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="ldapData" :model="ldapData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="ldap" :data="ldapData"/> <setting :setting-group="ldap" :data="ldapData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="oauth2" class="divider thick-line"/>
<el-form ref="oauth2" :model="oauth2Data" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="oauth2" :model="oauth2Data" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="oauth2" :data="oauth2Data"/> <setting :setting-group="oauth2" :data="oauth2Data"/>
</el-form> </el-form>

View file

@ -3,7 +3,7 @@
<el-form ref="captchaData" :model="captchaData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="captchaData" :model="captchaData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="captcha" :data="captchaData"/> <setting :setting-group="captcha" :data="captchaData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="captcha" class="divider thick-line"/>
<el-form ref="kocaptchaData" :model="kocaptchaData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="kocaptchaData" :model="kocaptchaData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="kocaptcha" :data="kocaptchaData"/> <setting :setting-group="kocaptcha" :data="kocaptchaData"/>
</el-form> </el-form>

View file

@ -6,27 +6,27 @@
<el-form ref="staticFeData" :model="staticFeData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="staticFeData" :model="staticFeData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="staticFe" :data="staticFeData"/> <setting :setting-group="staticFe" :data="staticFeData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="staticFe" class="divider thick-line"/>
<el-form ref="assetsData" :model="assetsData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="assetsData" :model="assetsData" :label-position="labelPosition" :label-width="labelWidth">
<el-form-item class="grouped-settings-header"> <el-form-item v-if="assets" class="grouped-settings-header">
<span class="label-font label-with-margin">{{ $t('settings.assets') }}</span> <span class="label-font label-with-margin">{{ $t('settings.assets') }}</span>
</el-form-item> </el-form-item>
<setting :setting-group="assets" :data="assetsData"/> <setting :setting-group="assets" :data="assetsData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="assets" class="divider thick-line"/>
<el-form ref="emojiData" :model="emojiData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="emojiData" :model="emojiData" :label-position="labelPosition" :label-width="labelWidth">
<el-form-item data-search=":emoji" class="grouped-settings-header"> <el-form-item v-if="emoji" data-search=":emoji" class="grouped-settings-header">
<span class="label-font label-with-margin">{{ $t('settings.emoji') }}</span> <span class="label-font label-with-margin">{{ $t('settings.emoji') }}</span>
</el-form-item> </el-form-item>
<setting :setting-group="emoji" :data="emojiData"/> <setting :setting-group="emoji" :data="emojiData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="emoji" class="divider thick-line"/>
<el-form ref="chatData" :model="chatData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="chatData" :model="chatData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="chat" :data="chatData"/> <setting :setting-group="chat" :data="chatData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="chat" class="divider thick-line"/>
<el-form ref="markupData" :model="markupData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="markupData" :model="markupData" :label-position="labelPosition" :label-width="labelWidth">
<el-form-item data-search=":markup" class="grouped-settings-header"> <el-form-item v-if="markup" data-search=":markup" class="grouped-settings-header">
<span class="label-font label-with-margin">{{ $t('settings.markup') }}</span> <span class="label-font label-with-margin">{{ $t('settings.markup') }}</span>
</el-form-item> </el-form-item>
<setting :setting-group="markup" :data="markupData"/> <setting :setting-group="markup" :data="markupData"/>

View file

@ -4,20 +4,20 @@
<setting :setting-group="http" :data="httpData"/> <setting :setting-group="http" :data="httpData"/>
</el-form> </el-form>
<el-form ref="corsPlugData" :model="corsPlugData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="corsPlugData" :model="corsPlugData" :label-position="labelPosition" :label-width="labelWidth">
<el-form-item data-search=":cors_plug" class="grouped-settings-header"> <el-form-item v-if="corsPlug" data-search=":cors_plug" class="grouped-settings-header">
<span class="label-font label-with-margin">{{ $t('settings.corsPlug') }}</span> <span class="label-font label-with-margin">{{ $t('settings.corsPlug') }}</span>
</el-form-item> </el-form-item>
<setting :setting-group="corsPlug" :data="corsPlugData"/> <setting :setting-group="corsPlug" :data="corsPlugData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="corsPlug" class="divider thick-line"/>
<el-form ref="httpSignatures" :model="httpSignaturesData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="httpSignatures" :model="httpSignaturesData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="httpSignatures" :data="httpSignaturesData"/> <setting :setting-group="httpSignatures" :data="httpSignaturesData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="httpSignatures" class="divider thick-line"/>
<el-form ref="httpSecurityData" :model="httpSecurityData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="httpSecurityData" :model="httpSecurityData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="httpSecurity" :data="httpSecurityData"/> <setting :setting-group="httpSecurity" :data="httpSecurityData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="httpSecurity" class="divider thick-line"/>
<el-form ref="webCacheTtl" :model="webCacheTtlData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="webCacheTtl" :model="webCacheTtlData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="webCacheTtl" :data="webCacheTtlData"/> <setting :setting-group="webCacheTtl" :data="webCacheTtlData"/>
</el-form> </el-form>

View file

@ -3,27 +3,27 @@
<el-form ref="instanceData" :model="instanceData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="instanceData" :model="instanceData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="instance" :data="instanceData"/> <setting :setting-group="instance" :data="instanceData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="instance" class="divider thick-line"/>
<el-form ref="adminToken" :model="adminTokenData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="adminToken" :model="adminTokenData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="adminToken" :data="adminTokenData"/> <setting :setting-group="adminToken" :data="adminTokenData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="adminToken" class="divider thick-line"/>
<el-form ref="scheduledActivity" :model="scheduledActivityData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="scheduledActivity" :model="scheduledActivityData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="scheduledActivity" :data="scheduledActivityData"/> <setting :setting-group="scheduledActivity" :data="scheduledActivityData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="scheduledActivity" class="divider thick-line"/>
<el-form ref="manifest" :model="manifestData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="manifest" :model="manifestData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="manifest" :data="manifestData"/> <setting :setting-group="manifest" :data="manifestData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="manifest" class="divider thick-line"/>
<el-form ref="pleromaUser" :model="pleromaUserData" :label-position="labelPosition" :label-width="labelWidth" data-search="Pleroma.User"> <el-form ref="pleromaUser" :model="pleromaUserData" :label-position="labelPosition" :label-width="labelWidth" data-search="Pleroma.User">
<setting :setting-group="pleromaUser" :data="pleromaUserData"/> <setting :setting-group="pleromaUser" :data="pleromaUserData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="pleromaUser" class="divider thick-line"/>
<el-form ref="uriSchemes" :model="uriSchemesData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="uriSchemes" :model="uriSchemesData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="uriSchemes" :data="uriSchemesData"/> <setting :setting-group="uriSchemes" :data="uriSchemesData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="uriSchemes" class="divider thick-line"/>
<el-form ref="feed" :model="feedData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="feed" :model="feedData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="feed" :data="feedData"/> <setting :setting-group="feed" :data="feedData"/>
</el-form> </el-form>

View file

@ -3,15 +3,15 @@
<el-form ref="loggerData" :model="loggerData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="loggerData" :model="loggerData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="logger" :data="loggerData"/> <setting :setting-group="logger" :data="loggerData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="logger" class="divider thick-line"/>
<el-form ref="consoleData" :model="consoleData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="consoleData" :model="consoleData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="console" :data="consoleData"/> <setting :setting-group="console" :data="consoleData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="console" class="divider thick-line"/>
<el-form ref="exsysloggerData" :model="exsysloggerData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="exsysloggerData" :model="exsysloggerData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="exsyslogger" :data="exsysloggerData"/> <setting :setting-group="exsyslogger" :data="exsysloggerData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="exsyslogger" class="divider thick-line"/>
<el-form ref="quackData" :model="quackData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="quackData" :model="quackData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="quack" :data="quackData"/> <setting :setting-group="quack" :data="quackData"/>
</el-form> </el-form>

View file

@ -3,15 +3,15 @@
<el-form ref="mrfSimple" :model="mrfSimpleData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfSimple" :model="mrfSimpleData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfSimple" :data="mrfSimpleData"/> <setting :setting-group="mrfSimple" :data="mrfSimpleData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfSimple" class="divider thick-line"/>
<el-form ref="mrfRejectnonpublic" :model="mrfRejectnonpublicData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfRejectnonpublic" :model="mrfRejectnonpublicData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfRejectnonpublic" :data="mrfRejectnonpublicData"/> <setting :setting-group="mrfRejectnonpublic" :data="mrfRejectnonpublicData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfRejectnonpublic" class="divider thick-line"/>
<el-form ref="mrfHellthread" :model="mrfHellthreadData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfHellthread" :model="mrfHellthreadData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfHellthread" :data="mrfHellthreadData"/> <setting :setting-group="mrfHellthread" :data="mrfHellthreadData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfHellthread" class="divider thick-line"/>
<el-form ref="mrfKeyword" :model="mrfKeywordData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfKeyword" :model="mrfKeywordData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfKeyword" :data="mrfKeywordData"/> <setting :setting-group="mrfKeyword" :data="mrfKeywordData"/>
</el-form> </el-form>
@ -21,19 +21,19 @@
<el-form ref="mrfMention" :model="mrfMentionData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfMention" :model="mrfMentionData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfMention" :data="mrfMentionData"/> <setting :setting-group="mrfMention" :data="mrfMentionData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfMention" class="divider thick-line"/>
<el-form ref="mrfNormalizeMarkup" :model="mrfNormalizeMarkupData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfNormalizeMarkup" :model="mrfNormalizeMarkupData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfNormalizeMarkup" :data="mrfNormalizeMarkupData"/> <setting :setting-group="mrfNormalizeMarkup" :data="mrfNormalizeMarkupData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfNormalizeMarkup" class="divider thick-line"/>
<el-form ref="mrfVocabulary" :model="mrfVocabularyData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfVocabulary" :model="mrfVocabularyData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfVocabulary" :data="mrfVocabularyData"/> <setting :setting-group="mrfVocabulary" :data="mrfVocabularyData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfVocabulary" class="divider thick-line"/>
<el-form ref="mrfObjectAge" :model="mrfObjectAgeData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mrfObjectAge" :model="mrfObjectAgeData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mrfObjectAge" :data="mrfObjectAgeData"/> <setting :setting-group="mrfObjectAge" :data="mrfObjectAgeData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mrfObjectAge" class="divider thick-line"/>
<el-form ref="modules" :model="modulesData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="modules" :model="modulesData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="modules" :data="modulesData"/> <setting :setting-group="modules" :data="modulesData"/>
</el-form> </el-form>

View file

@ -3,11 +3,11 @@
<el-form ref="mailer" :model="mailerData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="mailer" :model="mailerData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mailer" :data="mailerData"/> <setting :setting-group="mailer" :data="mailerData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="mailer" class="divider thick-line"/>
<el-form ref="swoosh" :model="swooshData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="swoosh" :model="swooshData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="swoosh" :data="swooshData"/> <setting :setting-group="swoosh" :data="swooshData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="swoosh" class="divider thick-line"/>
<el-form ref="emailNotifications" :model="emailNotificationsData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="emailNotifications" :model="emailNotificationsData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="emailNotifications" :data="emailNotificationsData"/> <setting :setting-group="emailNotifications" :data="emailNotificationsData"/>
</el-form> </el-form>

View file

@ -3,7 +3,7 @@
<el-form ref="metadata" :model="metadataData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="metadata" :model="metadataData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="metadata" :data="metadataData"/> <setting :setting-group="metadata" :data="metadataData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="metadata" class="divider thick-line"/>
<el-form ref="richMedia" :model="richMediaData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="richMedia" :model="richMediaData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="richMedia" :data="richMediaData"/> <setting :setting-group="richMedia" :data="richMediaData"/>
</el-form> </el-form>

View file

@ -4,20 +4,20 @@
<setting :setting-group="upload" :data="uploadData"/> <setting :setting-group="upload" :data="uploadData"/>
</el-form> </el-form>
<el-form v-if="showUploadersLocal" ref="uploadersLocal" :model="uploadersLocalData" :label-position="labelPosition" :label-width="labelWidth"> <el-form v-if="showUploadersLocal" ref="uploadersLocal" :model="uploadersLocalData" :label-position="labelPosition" :label-width="labelWidth">
<el-form-item class="grouped-settings-header"> <el-form-item v-if="uploadersLocal" class="grouped-settings-header">
<span class="label-font label-with-margin">Pleroma.Uploaders.Local</span> <span class="label-font label-with-margin">Pleroma.Uploaders.Local</span>
</el-form-item> </el-form-item>
<setting :setting-group="uploadersLocal" :data="uploadersLocalData"/> <setting :setting-group="uploadersLocal" :data="uploadersLocalData"/>
<el-divider class="divider thick-line"/> <el-divider v-if="uploadersLocal" class="divider thick-line"/>
</el-form> </el-form>
<el-form v-if="showUploadersS3" ref="uploadersS3" :model="uploadersS3Data" :label-position="labelPosition" :label-width="labelWidth"> <el-form v-if="showUploadersS3" ref="uploadersS3" :model="uploadersS3Data" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="uploadersS3" :data="uploadersS3Data"/> <setting :setting-group="uploadersS3" :data="uploadersS3Data"/>
<el-divider class="divider thick-line"/> <el-divider v-if="uploadersS3" class="divider thick-line"/>
</el-form> </el-form>
<el-form ref="uploadFilterMogrify" :model="uploadFilterMogrifyData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="uploadFilterMogrify" :model="uploadFilterMogrifyData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="uploadFilterMogrify" :data="uploadFilterMogrifyData"/> <setting :setting-group="uploadFilterMogrify" :data="uploadFilterMogrifyData"/>
</el-form> </el-form>
<el-divider class="divider thick-line"/> <el-divider v-if="uploadFilterMogrify" class="divider thick-line"/>
<el-form ref="uploadAnonymizeFilename" :model="uploadAnonymizeFilenameData" :label-position="labelPosition" :label-width="labelWidth"> <el-form ref="uploadAnonymizeFilename" :model="uploadAnonymizeFilenameData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="uploadAnonymizeFilename" :data="uploadAnonymizeFilenameData"/> <setting :setting-group="uploadAnonymizeFilename" :data="uploadAnonymizeFilenameData"/>
</el-form> </el-form>

View file

@ -65,7 +65,7 @@ export const tabs = {
}, },
'relays': { 'relays': {
label: 'settings.relays', label: 'settings.relays',
settings: [] settings: ['relays']
}, },
'web-push': { 'web-push': {
label: 'settings.webPush', label: 'settings.webPush',

View file

@ -33,7 +33,7 @@
<el-tab-pane <el-tab-pane
v-for="(value, componentName) in tabs" v-for="(value, componentName) in tabs"
:label="$t(value.label)" :label="$t(value.label)"
:disabled="configDisabled" :disabled="configDisabled || settingsCantBeChanged(value.settings)"
:key="componentName" :key="componentName"
:name="componentName" :name="componentName"
lazy> lazy>
@ -227,6 +227,20 @@ export default {
: { value: `${searchObj.label} in ${searchObj.groupLabel}`, group: searchObj.groupKey, key: searchObj.key } : { value: `${searchObj.label} in ${searchObj.groupLabel}`, group: searchObj.groupKey, key: searchObj.key }
}) })
cb(results) cb(results)
},
settingsCantBeChanged(settings) {
const existingSettings = settings.filter(setting => {
if ([':esshd', ':cors_plug', ':http_signatures', ':quack', ':logger', ':swoosh', ':mime'].includes(setting)) {
return this.$store.state.settings.description.findIndex(el => el.group === setting) !== -1
} else if (setting === 'Pleroma.Web.Auth.Authenticator' || setting === ':admin_token') {
return this.$store.state.settings.description.findIndex(el => el.children[0].key === setting) !== -1
} else if (setting === 'relays') {
return [setting]
} else {
return this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1
}
})
return existingSettings.length === 0
} }
} }
} }