This commit is contained in:
Henry Jameson 2026-08-04 00:56:04 +03:00
commit 2e039561c9
7 changed files with 18 additions and 26 deletions

View file

@ -109,7 +109,9 @@ export const promisedRequest = async ({
.get('content-type')
.split(';')
.map((x) => x.toLowerCase().trim())
const contentLength = Number.parseInt(response.headers.get('content-length'))
const contentLength = Number.parseInt(
response.headers.get('content-length'),
)
if (contentLength === 0) return null
switch (contentType) {

View file

@ -420,8 +420,7 @@ const getNodeInfo = async ({ store }) => {
})
useInstanceStore().set({
path: 'federating',
value:
federation.enabled === undefined ? true : federation.enabled,
value: federation.enabled === undefined ? true : federation.enabled,
})
const accountActivationRequired = metadata.accountActivationRequired
@ -548,9 +547,7 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
const overrides = window.___pleromafe_dev_overrides || {}
const server =
overrides.target !== undefined
? overrides.target
: window.location.origin
overrides.target !== undefined ? overrides.target : window.location.origin
useInstanceStore().set({ path: 'server', value: server })
await setConfig({ store })

View file

@ -75,7 +75,7 @@ export default {
logoBgStyle() {
const mask = this.enableMask
? {}
: {'background-color': this.enableMask ? '' : 'transparent'}
: { 'background-color': this.enableMask ? '' : 'transparent' }
return {
margin: `${this.logoMargin} 0`,

View file

@ -633,17 +633,11 @@ export default {
if (version === 0) {
if (input.version) version = input.version
// Old v1 naming: fg is text, btn is foreground
if (
colors.text === undefined &&
colors.fg !== undefined
) {
if (colors.text === undefined && colors.fg !== undefined) {
version = 1
}
// New v2 naming: text is text, fg is foreground
if (
colors.text !== undefined &&
colors.fg !== undefined
) {
if (colors.text !== undefined && colors.fg !== undefined) {
version = 2
}
}

View file

@ -125,10 +125,7 @@ const generateTheme = (inputRuleset, callbacks, debug) => {
const processChunk = () => {
const chunk = chunks[counter]
Promise.all(chunk.map((x) => x())).then((result) => {
getCssRules(
result.filter(Boolean),
debug,
).forEach((rule) => {
getCssRules(result.filter(Boolean), debug).forEach((rule) => {
onNewRule(rule, true)
})
// const t1 = performance.now()
@ -253,7 +250,9 @@ const extractStyleConfig = ({
contentColumnWidth,
notifsColumnWidth,
themeEditorMinWidth:
Number.parseInt(themeEditorMinWidth) === 0 ? 'fit-content' : themeEditorMinWidth,
Number.parseInt(themeEditorMinWidth) === 0
? 'fit-content'
: themeEditorMinWidth,
emojiReactionsScale,
emojiSize,
navbarSize,