mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-10 23:23:04 -04:00
Merge upstream/dev
This commit is contained in:
commit
9dabf4b201
15 changed files with 337 additions and 228 deletions
|
@ -433,14 +433,22 @@ function ThemesTab() {
|
|||
</Card>
|
||||
|
||||
<div className={cl("grid")}>
|
||||
{onlineThemes?.map(theme => {
|
||||
{onlineThemes?.map(rawLink => {
|
||||
const { label, link } = (() => {
|
||||
const match = /^@(light|dark) (.*)/.exec(rawLink.link);
|
||||
if (!match) return { label: rawLink, link: rawLink };
|
||||
|
||||
const [, mode, link] = match;
|
||||
return { label: `[${mode} mode only] ${link}`, link };
|
||||
})();
|
||||
|
||||
return <OtherThemeCard
|
||||
key={theme.fileName}
|
||||
enabled={settings.enabledThemeLinks.includes(theme.link)}
|
||||
onChange={enabled => onThemeLinkEnabledChange(theme.link, enabled)}
|
||||
onDelete={() => deleteThemeLink(theme.link)}
|
||||
key={rawLink.fileName}
|
||||
enabled={settings.enabledThemeLinks.includes(rawLink.link)}
|
||||
onChange={enabled => onThemeLinkEnabledChange(rawLink.link, enabled)}
|
||||
onDelete={() => deleteThemeLink(rawLink.link)}
|
||||
showDeleteButton
|
||||
theme={theme}
|
||||
theme={rawLink}
|
||||
/>;
|
||||
})}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue