mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-13 15:14:40 +00:00
feat(ThemePreview): update to follow blob format
This commit is contained in:
@@ -1,17 +1,5 @@
|
||||
import { base64toblobURL } from '@/seqta/utils/imageConversions';
|
||||
|
||||
export const imageData: Record<string, { url: string; variableName: string }> = {};
|
||||
|
||||
export const UpdateImageData = (image: { id: string; base64: string }) => {
|
||||
const { id, base64 } = image;
|
||||
|
||||
if (imageData[id]) {
|
||||
imageData[id].url = base64toblobURL(base64);
|
||||
const { variableName } = imageData[id];
|
||||
document.documentElement.style.setProperty('--' + variableName, `url(${imageData[id].url})`);
|
||||
}
|
||||
};
|
||||
|
||||
export function applyCustomCSS(customCSS: string) {
|
||||
let styleElement = document.getElementById('custom-theme');
|
||||
if (!styleElement) {
|
||||
|
||||
Reference in New Issue
Block a user