chore: code formatting

This commit is contained in:
github-actions[bot]
2022-08-06 04:50:31 +00:00
parent 587ceecc84
commit e437a4da7c
6 changed files with 41 additions and 36 deletions

View File

@@ -65,7 +65,7 @@
computed: {
//URL parameters
params() {
return new URLSearchParams({from:location.href})
return new URLSearchParams({from: location.href})
},
//Is in preview mode
preview() {

View File

@@ -170,17 +170,17 @@
computed: {
//URL parameters
params() {
return new URLSearchParams({from:location.href})
return new URLSearchParams({from: location.href})
},
//Unusable plugins
unusable() {
const plugins = Object.entries(this.plugins.enabled).filter(([key, value]) => (value == true)&&(!this.supports(this.plugins.options.descriptions[key]))).map(([key]) => key)
const plugins = Object.entries(this.plugins.enabled).filter(([key, value]) => (value == true) && (!this.supports(this.plugins.options.descriptions[key]))).map(([key]) => key)
const options = this.edited.filter(option => !this.supports(this.plugins.options.descriptions[option]))
return [...plugins, ...options].sort()
},
//Edited plugins options
edited() {
return Object.keys(this.plugins.enabled).flatMap(plugin => Object.keys(this.options({name:plugin})).filter(key => this.plugins.options[key] !== metadata[plugin]?.web[key]?.defaulted))
return Object.keys(this.plugins.enabled).flatMap(plugin => Object.keys(this.options({name: plugin})).filter(key => this.plugins.options[key] !== metadata[plugin]?.web[key]?.defaulted))
},
//User's avatar
avatar() {
@@ -340,19 +340,19 @@
},
//Get available options from plugin
options({name}) {
return Object.fromEntries(Object.entries(this.plugins.options.descriptions).filter(([key]) => ((key.startsWith(`${name}.`))||(key === name)) && (!(key in metadata.base.web))))
return Object.fromEntries(Object.entries(this.plugins.options.descriptions).filter(([key]) => ((key.startsWith(`${name}.`)) || (key === name)) && (!(key in metadata.base.web))))
},
//Check if option is supported
supports(option) {
if (!option)
return false
const {extras:required = null} = option
const {extras: required = null} = option
if (!Array.isArray(required))
return true
if (!Array.isArray(this.extras))
return this.extras
return required.filter(permission => !this.extras.includes(permission)).length === 0
}
},
},
})
})()

View File

@@ -163,7 +163,7 @@
//Computed properties
computed: {
params() {
return new URLSearchParams({from:location.href})
return new URLSearchParams({from: location.href})
},
stats() {
return this.metrics?.rendered.user ?? null

View File

@@ -55,7 +55,7 @@
//Computed properties
computed: {
params() {
return new URLSearchParams({from:new URLSearchParams(location.search).get("from"), scopes:this.scopes.join(" ")})
return new URLSearchParams({from: new URLSearchParams(location.search).get("from"), scopes: this.scopes.join(" ")})
},
preview() {
return /-preview$/.test(this.version)
@@ -71,7 +71,7 @@
requests: {rest: {limit: 0, used: 0, remaining: 0, reset: NaN}, graphql: {limit: 0, used: 0, remaining: 0, reset: NaN}, search: {limit: 0, used: 0, remaining: 0, reset: NaN}},
palette: "light",
oauth: false,
scopes:[],
scopes: [],
extras: [],
session: null,
},