lint
This commit is contained in:
parent
62e8bc58c6
commit
2e039561c9
7 changed files with 18 additions and 26 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
|
import fs from 'node:fs'
|
||||||
import emojis from '@kazvmoe-infra/unicode-emoji-json/data-by-group.json' with {
|
import emojis from '@kazvmoe-infra/unicode-emoji-json/data-by-group.json' with {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
}
|
}
|
||||||
import fs from 'node:fs'
|
|
||||||
|
|
||||||
Object.keys(emojis).map((k) => {
|
Object.keys(emojis).map((k) => {
|
||||||
emojis[k].forEach((e) => {
|
emojis[k].forEach((e) => {
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,9 @@ export const promisedRequest = async ({
|
||||||
.get('content-type')
|
.get('content-type')
|
||||||
.split(';')
|
.split(';')
|
||||||
.map((x) => x.toLowerCase().trim())
|
.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
|
if (contentLength === 0) return null
|
||||||
|
|
||||||
switch (contentType) {
|
switch (contentType) {
|
||||||
|
|
|
||||||
|
|
@ -420,8 +420,7 @@ const getNodeInfo = async ({ store }) => {
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'federating',
|
path: 'federating',
|
||||||
value:
|
value: federation.enabled === undefined ? true : federation.enabled,
|
||||||
federation.enabled === undefined ? true : federation.enabled,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const accountActivationRequired = metadata.accountActivationRequired
|
const accountActivationRequired = metadata.accountActivationRequired
|
||||||
|
|
@ -548,9 +547,7 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
|
||||||
|
|
||||||
const overrides = window.___pleromafe_dev_overrides || {}
|
const overrides = window.___pleromafe_dev_overrides || {}
|
||||||
const server =
|
const server =
|
||||||
overrides.target !== undefined
|
overrides.target !== undefined ? overrides.target : window.location.origin
|
||||||
? overrides.target
|
|
||||||
: window.location.origin
|
|
||||||
useInstanceStore().set({ path: 'server', value: server })
|
useInstanceStore().set({ path: 'server', value: server })
|
||||||
|
|
||||||
await setConfig({ store })
|
await setConfig({ store })
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export default {
|
||||||
logoBgStyle() {
|
logoBgStyle() {
|
||||||
const mask = this.enableMask
|
const mask = this.enableMask
|
||||||
? {}
|
? {}
|
||||||
: {'background-color': this.enableMask ? '' : 'transparent'}
|
: { 'background-color': this.enableMask ? '' : 'transparent' }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
margin: `${this.logoMargin} 0`,
|
margin: `${this.logoMargin} 0`,
|
||||||
|
|
|
||||||
|
|
@ -633,17 +633,11 @@ export default {
|
||||||
if (version === 0) {
|
if (version === 0) {
|
||||||
if (input.version) version = input.version
|
if (input.version) version = input.version
|
||||||
// Old v1 naming: fg is text, btn is foreground
|
// Old v1 naming: fg is text, btn is foreground
|
||||||
if (
|
if (colors.text === undefined && colors.fg !== undefined) {
|
||||||
colors.text === undefined &&
|
|
||||||
colors.fg !== undefined
|
|
||||||
) {
|
|
||||||
version = 1
|
version = 1
|
||||||
}
|
}
|
||||||
// New v2 naming: text is text, fg is foreground
|
// New v2 naming: text is text, fg is foreground
|
||||||
if (
|
if (colors.text !== undefined && colors.fg !== undefined) {
|
||||||
colors.text !== undefined &&
|
|
||||||
colors.fg !== undefined
|
|
||||||
) {
|
|
||||||
version = 2
|
version = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,7 @@ const generateTheme = (inputRuleset, callbacks, debug) => {
|
||||||
const processChunk = () => {
|
const processChunk = () => {
|
||||||
const chunk = chunks[counter]
|
const chunk = chunks[counter]
|
||||||
Promise.all(chunk.map((x) => x())).then((result) => {
|
Promise.all(chunk.map((x) => x())).then((result) => {
|
||||||
getCssRules(
|
getCssRules(result.filter(Boolean), debug).forEach((rule) => {
|
||||||
result.filter(Boolean),
|
|
||||||
debug,
|
|
||||||
).forEach((rule) => {
|
|
||||||
onNewRule(rule, true)
|
onNewRule(rule, true)
|
||||||
})
|
})
|
||||||
// const t1 = performance.now()
|
// const t1 = performance.now()
|
||||||
|
|
@ -253,7 +250,9 @@ const extractStyleConfig = ({
|
||||||
contentColumnWidth,
|
contentColumnWidth,
|
||||||
notifsColumnWidth,
|
notifsColumnWidth,
|
||||||
themeEditorMinWidth:
|
themeEditorMinWidth:
|
||||||
Number.parseInt(themeEditorMinWidth) === 0 ? 'fit-content' : themeEditorMinWidth,
|
Number.parseInt(themeEditorMinWidth) === 0
|
||||||
|
? 'fit-content'
|
||||||
|
: themeEditorMinWidth,
|
||||||
emojiReactionsScale,
|
emojiReactionsScale,
|
||||||
emojiSize,
|
emojiSize,
|
||||||
navbarSize,
|
navbarSize,
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ const makeMockUserMasto = (overrides = {}) => {
|
||||||
return {
|
return {
|
||||||
acct: 'hj',
|
acct: 'hj',
|
||||||
avatar:
|
avatar:
|
||||||
'https://shigusegubu.club/media/1657b945-8d5b-4ce6-aafb-4c3fc5772120/8ce851029af84d55de9164e30cc7f46d60cbf12eee7e96c5c0d35d9038ddade1.png',
|
'https://shigusegubu.club/media/1657b945-8d5b-4ce6-aafb-4c3fc5772120/8ce851029af84d55de9164e30cc7f46d60cbf12eee7e96c5c0d35d9038ddade1.png',
|
||||||
avatar_static:
|
avatar_static:
|
||||||
'https://shigusegubu.club/media/1657b945-8d5b-4ce6-aafb-4c3fc5772120/8ce851029af84d55de9164e30cc7f46d60cbf12eee7e96c5c0d35d9038ddade1.png',
|
'https://shigusegubu.club/media/1657b945-8d5b-4ce6-aafb-4c3fc5772120/8ce851029af84d55de9164e30cc7f46d60cbf12eee7e96c5c0d35d9038ddade1.png',
|
||||||
bot: false,
|
bot: false,
|
||||||
created_at: '2017-12-17T21:54:14.000Z',
|
created_at: '2017-12-17T21:54:14.000Z',
|
||||||
display_name: 'whatever whatever whatever witch',
|
display_name: 'whatever whatever whatever witch',
|
||||||
|
|
@ -21,9 +21,9 @@ const makeMockUserMasto = (overrides = {}) => {
|
||||||
followers_count: 705,
|
followers_count: 705,
|
||||||
following_count: 326,
|
following_count: 326,
|
||||||
header:
|
header:
|
||||||
'https://shigusegubu.club/media/7ab024d9-2a8a-4fbc-9ce8-da06756ae2db/6aadefe4e264133bc377ab450e6b045b6f5458542a5c59e6c741f86107f0388b.png',
|
'https://shigusegubu.club/media/7ab024d9-2a8a-4fbc-9ce8-da06756ae2db/6aadefe4e264133bc377ab450e6b045b6f5458542a5c59e6c741f86107f0388b.png',
|
||||||
header_static:
|
header_static:
|
||||||
'https://shigusegubu.club/media/7ab024d9-2a8a-4fbc-9ce8-da06756ae2db/6aadefe4e264133bc377ab450e6b045b6f5458542a5c59e6c741f86107f0388b.png',
|
'https://shigusegubu.club/media/7ab024d9-2a8a-4fbc-9ce8-da06756ae2db/6aadefe4e264133bc377ab450e6b045b6f5458542a5c59e6c741f86107f0388b.png',
|
||||||
id: '1',
|
id: '1',
|
||||||
locked: false,
|
locked: false,
|
||||||
note: 'Volatile Internet Weirdo. Name pronounced as Hee Jay. JS and Java dark arts mage, Elixir trainee. I love sampo and lain. Matrix is <span><a data-user="1" href="https://shigusegubu.club/users/hj">@<span>hj</span></a></span>:matrix.heldscal.la Pronouns are whatever. Do not DM me unless it\'s truly private matter and you\'re instance\'s admin or you risk your DM to be reposted publicly.Wish i was Finnish girl.',
|
note: 'Volatile Internet Weirdo. Name pronounced as Hee Jay. JS and Java dark arts mage, Elixir trainee. I love sampo and lain. Matrix is <span><a data-user="1" href="https://shigusegubu.club/users/hj">@<span>hj</span></a></span>:matrix.heldscal.la Pronouns are whatever. Do not DM me unless it\'s truly private matter and you\'re instance\'s admin or you risk your DM to be reposted publicly.Wish i was Finnish girl.',
|
||||||
|
|
@ -41,7 +41,7 @@ const makeMockStatusMasto = (overrides = {}) => {
|
||||||
account: makeMockUserMasto(),
|
account: makeMockUserMasto(),
|
||||||
application: { name: 'Web', website: null },
|
application: { name: 'Web', website: null },
|
||||||
content:
|
content:
|
||||||
'<span><a data-user="14660" href="https://pleroma.soykaf.com/users/sampo">@<span>sampo</span></a></span> god i wish i was there',
|
'<span><a data-user="14660" href="https://pleroma.soykaf.com/users/sampo">@<span>sampo</span></a></span> god i wish i was there',
|
||||||
created_at: '2019-01-17T16:29:23.000Z',
|
created_at: '2019-01-17T16:29:23.000Z',
|
||||||
emojis: [],
|
emojis: [],
|
||||||
favourited: false,
|
favourited: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue