eslint imrpovements and instant hide for image and video splotches

This commit is contained in:
SethBurkart123
2023-11-02 19:59:05 +11:00
parent 1d58334e4e
commit 80ceb28923
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -11,8 +11,7 @@
"sourceType": "module" // add this line to allow 'import' and 'export' statements
},
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"indent": ["warning", 2],
"quotes": ["error", "double"],
"semi": ["error", "always"]
}
@@ -138,7 +138,7 @@ export default function BackgroundSelector({ selectedType, setSelectedType, isEd
{backgrounds.concat(presetBackgrounds as Background[]).filter(bg => bg.type === 'image' && bg.isPreset && !bg.isDownloaded && !downloadedPresetIds.includes(bg.id)).map(bg => (
<div key={bg.id}
onClick={() => handlePresetClick(bg)}
className={`relative w-16 h-16 transition cursor-pointer rounded-xl duration-300 ${ isEditMode ? 'opacity-0 pointer-events-none' : 'opacity-100'}`}>
className={`relative w-16 h-16 transition cursor-pointer rounded-xl duration-300 ${ isEditMode ? 'opacity-0 pointer-events-none hidden' : 'opacity-100'}`}>
{bg.isPreset && downloadProgress[bg.id] !== undefined && (
<div className="absolute top-0 left-0 z-20 flex items-center justify-center w-full h-full">
<svg className="w-full h-full text-zinc-100 dark:text-zinc-700" viewBox="0 0 36 36">
@@ -184,7 +184,7 @@ export default function BackgroundSelector({ selectedType, setSelectedType, isEd
{backgrounds.concat(presetBackgrounds as Background[]).filter(bg => bg.type === 'video' && bg.isPreset && !bg.isDownloaded && !downloadedPresetIds.includes(bg.id)).map(bg => (
<div key={bg.id}
onClick={() => handlePresetClick(bg)}
className={`relative w-16 h-16 transition cursor-pointer rounded-xl duration-300 ${ isEditMode ? 'opacity-0 pointer-events-none' : 'opacity-100'}`}>
className={`relative w-16 h-16 transition cursor-pointer rounded-xl duration-300 ${ isEditMode ? 'opacity-0 pointer-events-none hidden' : 'opacity-100'}`}>
{bg.isPreset && downloadProgress[bg.id] !== undefined && (
<div className="absolute top-0 left-0 z-20 flex items-center justify-center w-full h-full">
<svg className="w-full h-full text-zinc-100 dark:text-zinc-700" viewBox="0 0 36 36">