mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 05:49:54 +01:00
revert 6b180d30b3
revert Fix theme apply button so it updates instantly I tried to do this while keeping the CSP changes but it seems like it is impossible, however, the themes do with with these enabled still and the CSP changes still working, so I am not sure why they were even implemented.
This commit is contained in:
parent
6b180d30b3
commit
8c9c6e0f34
5 changed files with 6 additions and 9 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,5 +9,4 @@ selenium-debug.log
|
|||
config/local.json
|
||||
config/local.*.json
|
||||
docs/site/
|
||||
.vscode/
|
||||
*.log
|
||||
.vscode/
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" href="/static/font/css/lato.css">
|
||||
<link rel="stylesheet" href="/static/mfm.css">
|
||||
<link rel="stylesheet" href="/static/custom.css">
|
||||
<link rel="stylesheet" href="/static/theme-holder.css" id="theme-holder">
|
||||
<!--server-generated-meta-->
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
|
|
|
@ -115,8 +115,7 @@ export default {
|
|||
avatarRadiusLocal: '',
|
||||
avatarAltRadiusLocal: '',
|
||||
attachmentRadiusLocal: '',
|
||||
tooltipRadiusLocal: '',
|
||||
chatMessageRadiusLocal: ''
|
||||
tooltipRadiusLocal: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
@ -231,8 +230,7 @@ export default {
|
|||
avatar: this.avatarRadiusLocal,
|
||||
avatarAlt: this.avatarAltRadiusLocal,
|
||||
tooltip: this.tooltipRadiusLocal,
|
||||
attachment: this.attachmentRadiusLocal,
|
||||
chatMessage: this.chatMessageRadiusLocal
|
||||
attachment: this.attachmentRadiusLocal
|
||||
}
|
||||
},
|
||||
preview () {
|
||||
|
|
|
@ -4,12 +4,10 @@ import { getColors, computeDynamicColor, getOpacitySlot } from '../theme_data/th
|
|||
|
||||
export const applyTheme = (input) => {
|
||||
const { rules } = generatePreset(input)
|
||||
const head = document.head
|
||||
const body = document.body
|
||||
body.classList.add('hidden')
|
||||
|
||||
const styleEl = document.createElement('style')
|
||||
head.appendChild(styleEl)
|
||||
const styleEl = document.getElementById('theme-holder')
|
||||
const styleSheet = styleEl.sheet
|
||||
|
||||
styleSheet.toString()
|
||||
|
|
1
static/theme-holder.css
Normal file
1
static/theme-holder.css
Normal file
|
@ -0,0 +1 @@
|
|||
// This file intentionally left blank
|
Loading…
Reference in a new issue