Update search on all settings routes
This commit is contained in:
parent
f96b5e0a0b
commit
6921d905dc
21 changed files with 232 additions and 2 deletions
|
@ -81,6 +81,18 @@ export default {
|
|||
},
|
||||
pleromaAuthenticatorData() {
|
||||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Auth.Authenticator']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -61,6 +61,18 @@ export default {
|
|||
},
|
||||
loading() {
|
||||
return this.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -179,6 +179,9 @@ export default {
|
|||
remotePacksCount() {
|
||||
return this.$store.state.emojiPacks.remotePacksCount
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
settingsLabelWidth() {
|
||||
if (this.isMobile) {
|
||||
return '120px'
|
||||
|
@ -193,6 +196,17 @@ export default {
|
|||
this.$store.dispatch('GetNodeInfo')
|
||||
this.$store.dispatch('NeedReboot')
|
||||
this.refreshLocalPacks()
|
||||
|
||||
if (this.searchQuery.length > 0) {
|
||||
this.activeTab = 'settings'
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
console.log(selectedSetting)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeLocalTabs() {
|
||||
|
|
|
@ -51,6 +51,18 @@ export default {
|
|||
},
|
||||
loading() {
|
||||
return this.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -106,6 +106,9 @@ export default {
|
|||
preloadData() {
|
||||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Preload']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
staticFe() {
|
||||
return this.settings.description.find(setting => setting.key === ':static_fe')
|
||||
},
|
||||
|
@ -113,6 +116,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', ':static_fe']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -51,6 +51,18 @@ export default {
|
|||
},
|
||||
loading() {
|
||||
return this.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -76,6 +76,9 @@ export default {
|
|||
loading() {
|
||||
return this.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
webCacheTtl() {
|
||||
return this.settings.description.find(setting => setting.key === ':web_cache_ttl')
|
||||
},
|
||||
|
@ -83,6 +86,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', ':web_cache_ttl']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -146,6 +146,9 @@ export default {
|
|||
restrictUnauthenticatedData() {
|
||||
return _.get(this.settings.settings, [':pleroma', ':restrict_unauthenticated']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
scheduledActivity() {
|
||||
return this.$store.state.settings.description.find(setting => setting.key === 'Pleroma.ScheduledActivity')
|
||||
},
|
||||
|
@ -172,6 +175,14 @@ export default {
|
|||
}
|
||||
},
|
||||
async mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
|
||||
await this.$store.dispatch('FetchInstanceDocument', 'instance-panel')
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -96,6 +96,9 @@ export default {
|
|||
poolsData() {
|
||||
return _.get(this.settings.settings, [':pleroma', ':pools']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
workers() {
|
||||
return this.settings.description.find(setting => setting.key === ':workers')
|
||||
},
|
||||
|
@ -103,6 +106,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', ':workers']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -51,6 +51,18 @@ export default {
|
|||
},
|
||||
loading() {
|
||||
return this.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -76,6 +76,9 @@ export default {
|
|||
loggerData() {
|
||||
return _.get(this.settings.settings, [':logger', ':backends']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
quack() {
|
||||
return this.settings.description.find(setting => setting.group === ':quack')
|
||||
},
|
||||
|
@ -83,6 +86,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':quack']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -51,6 +51,18 @@ export default {
|
|||
},
|
||||
mrfSettings() {
|
||||
return this.settings.description.filter(el => el.tab === 'mrf')
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -82,6 +82,9 @@ export default {
|
|||
newUsersDigestEmailData() {
|
||||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Emails.NewUsersDigestEmail']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
swoosh() {
|
||||
return this.settings.description.find(setting => setting.group === ':swoosh')
|
||||
},
|
||||
|
@ -95,6 +98,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Emails.UserEmail']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -76,6 +76,9 @@ export default {
|
|||
mediaProxyData() {
|
||||
return _.get(this.settings.settings, [':pleroma', ':media_proxy']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
scriptInvalidation() {
|
||||
return this.settings.description.find(setting => setting.key === 'Pleroma.Web.MediaProxy.Invalidation.Script')
|
||||
},
|
||||
|
@ -83,6 +86,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.MediaProxy.Invalidation.Script']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -56,6 +56,9 @@ export default {
|
|||
metadataData() {
|
||||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Metadata']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
richMedia() {
|
||||
return this.settings.description.find(setting => setting.key === ':rich_media')
|
||||
},
|
||||
|
@ -63,6 +66,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', ':rich_media']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -110,6 +110,9 @@ export default {
|
|||
remoteIpData() {
|
||||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Plugs.RemoteIp']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
termsOfServicesContent: {
|
||||
get() {
|
||||
return this.$store.state.settings.termsOfServices
|
||||
|
@ -120,6 +123,14 @@ export default {
|
|||
}
|
||||
},
|
||||
async mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
|
||||
await this.$store.dispatch('FetchInstanceDocument', 'terms-of-service')
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -51,6 +51,18 @@ export default {
|
|||
},
|
||||
loading() {
|
||||
return this.$store.state.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -72,6 +72,9 @@ export default {
|
|||
s3Data() {
|
||||
return _.get(this.settings.settings, [':ex_aws', ':s3']) || {}
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
showUploadersS3() {
|
||||
const uploader = _.get(this.settings.settings, [':pleroma', 'Pleroma.Upload', ':uploader'])
|
||||
return uploader === 'Pleroma.Uploaders.S3'
|
||||
|
@ -111,6 +114,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Upload.Filter.AnonymizeFilename']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -46,6 +46,9 @@ export default {
|
|||
loading() {
|
||||
return this.settings.loading
|
||||
},
|
||||
searchQuery() {
|
||||
return this.$store.state.settings.searchQuery
|
||||
},
|
||||
vapidDetails() {
|
||||
return this.settings.description.find(setting => setting.key === ':vapid_details')
|
||||
},
|
||||
|
@ -53,6 +56,15 @@ export default {
|
|||
return _.get(this.settings.settings, [':web_push_encryption', ':vapid_details']) || {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.searchQuery.length > 0) {
|
||||
const selectedSetting = document.querySelector(`[data-search="${this.searchQuery}"]`)
|
||||
if (selectedSetting) {
|
||||
selectedSetting.scrollIntoView({ block: 'start', behavior: 'smooth' })
|
||||
}
|
||||
this.$store.dispatch('SetSearchQuery', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
try {
|
||||
|
|
|
@ -22,7 +22,7 @@ export const tabs = description => {
|
|||
},
|
||||
'frontend': {
|
||||
label: 'settings.frontend',
|
||||
settings: [':assets', ':chat', ':frontends', ':emoji', ':frontend_configurations', ':markup', ':static_fe']
|
||||
settings: [':assets', ':chat', ':frontends', ':emoji', ':frontend_configurations', ':markup', ':static_fe', 'Pleroma.Web.Preload']
|
||||
},
|
||||
'gopher': {
|
||||
label: 'settings.gopher',
|
||||
|
|
|
@ -151,7 +151,9 @@ export default {
|
|||
const tab = Object.keys(this.tabs).find(tab => {
|
||||
return this.tabs[tab].settings.includes(selectedValue.group === ':pleroma' ? selectedValue.key : selectedValue.group)
|
||||
})
|
||||
this.$router.push({ path: `/settings/${tab}` })
|
||||
if (tab) {
|
||||
this.$router.push({ path: `/settings/${tab}` })
|
||||
}
|
||||
},
|
||||
querySearch(queryString, cb) {
|
||||
const results = this.searchData.filter(searchObj => searchObj.search.find(el => el.includes(queryString.toLowerCase())))
|
||||
|
|
Loading…
Reference in a new issue