fix(theme): do not display api version badge for the default built-in theme
This commit is contained in:
1 parent
7332618e85
commit
e861cda23d
2 files changed
+5
-2
No files matched your search
+1
-1
@@ -233,7 +233,7 @@ export const getThemes = async (): Promise<Theme[]> => {
|
|||||||
author: 'EZPPFarm',
|
author: 'EZPPFarm',
|
||||||
name: 'Default',
|
name: 'Default',
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
apiVersion: '1.0',
|
apiVersion: '',
|
||||||
description: 'The default EZPPLauncher look.',
|
description: 'The default EZPPLauncher look.',
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
scriptUrl: '',
|
scriptUrl: '',
|
||||||
|
|||||||
@@ -345,7 +345,8 @@
|
|||||||
if (themeFilter === 'updates' && !theme.updateAvailable) return false;
|
if (themeFilter === 'updates' && !theme.updateAvailable) return false;
|
||||||
if (!query) return true;
|
if (!query) return true;
|
||||||
|
|
||||||
return `${theme.name} ${theme.author} ${theme.description} ${theme.apiVersion}`
|
const apiPart = theme.name === 'Default' ? '' : theme.apiVersion;
|
||||||
|
return `${theme.name} ${theme.author} ${theme.description} ${apiPart}`
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(query);
|
.includes(query);
|
||||||
});
|
});
|
||||||
@@ -3778,12 +3779,14 @@
|
|||||||
{#if isActive}
|
{#if isActive}
|
||||||
<Badge class="absolute top-1.5 left-1.5 text-[9px]">In use</Badge>
|
<Badge class="absolute top-1.5 left-1.5 text-[9px]">In use</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if theme.name !== 'Default' && theme.folder_name !== 'default' && theme.apiVersion}
|
||||||
<Badge
|
<Badge
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
class="absolute top-1.5 right-1.5 bg-black/50 px-1.5 py-0 text-[9px] backdrop-blur-sm"
|
class="absolute top-1.5 right-1.5 bg-black/50 px-1.5 py-0 text-[9px] backdrop-blur-sm"
|
||||||
>
|
>
|
||||||
API {theme.apiVersion.startsWith('2') ? '2.0' : '1.0'}
|
API {theme.apiVersion.startsWith('2') ? '2.0' : '1.0'}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
{/if}
|
||||||
{#if theme.nsfw && !revealedNsfw.includes(theme.name)}
|
{#if theme.nsfw && !revealedNsfw.includes(theme.name)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
Reference in new issue
Block a user