diff --git a/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx b/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx index ce5d2652..1c116d3e 100644 --- a/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx +++ b/src/equicordplugins/themeLibrary/components/ThemeInfoModal.tsx @@ -8,7 +8,7 @@ import { CodeBlock } from "@components/CodeBlock"; import { Heart } from "@components/Heart"; import { openInviteModal } from "@utils/discord"; import { Margins } from "@utils/margins"; -import { ModalContent, ModalFooter, ModalHeader, ModalRoot, openModal } from "@utils/modal"; +import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { findComponentByCodeLazy } from "@webpack"; import { Button, Clipboard, Forms, React, showToast, Toasts } from "@webpack/common"; @@ -51,7 +51,7 @@ export const ThemeInfoModal: React.FC = ({ author, theme, . Source @@ -276,7 +299,7 @@ function ThemeTab() { overflowWrap: "break-word", marginTop: 8, }} - className="vce-theme-text"> + className="vce-theme-text"> {theme.name} @@ -285,7 +308,8 @@ function ThemeTab() { Theme Preview Image
@@ -303,10 +327,10 @@ function ThemeTab() { )}
- {themeLinks.includes("https://themes-delta.vercel.app/api/" + theme.name) ? ( + {themeLinks.includes(API_TYPE(theme)) ? (
diff --git a/src/equicordplugins/themeLibrary/components/styles.css b/src/equicordplugins/themeLibrary/components/styles.css index b9c03b64..1f148dd6 100644 --- a/src/equicordplugins/themeLibrary/components/styles.css +++ b/src/equicordplugins/themeLibrary/components/styles.css @@ -1,5 +1,5 @@ -/* stylelint-disable property-no-vendor-prefix */ [data-tab-id="ThemeLibrary"]::before { + /* stylelint-disable-next-line property-no-vendor-prefix */ -webkit-mask: var(--si-widget) center/contain no-repeat !important; mask: var(--si-widget) center/contain no-repeat !important; } @@ -23,8 +23,8 @@ } .vce-theme-info-preview img { - width: 1080px; - height: 1920px; + width: 1080px !important; + height: 1920px !important; object-fit: cover; } diff --git a/src/equicordplugins/themeLibrary/index.ts b/src/equicordplugins/themeLibrary/index.ts index 919bfe09..e0370fe5 100644 --- a/src/equicordplugins/themeLibrary/index.ts +++ b/src/equicordplugins/themeLibrary/index.ts @@ -4,13 +4,32 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -import { EquicordDevs } from "@utils/constants"; -import definePlugin from "@utils/types"; +import { definePluginSettings } from "@api/Settings"; +import definePlugin, { OptionType } from "@utils/types"; +import { SettingsRouter } from "@webpack/common"; + +const settings = definePluginSettings({ + domain: { + type: OptionType.BOOLEAN, + default: false, + description: "Use Github instead of the default domain for themes", + restartNeeded: false + }, +}); export default definePlugin({ - name: "Theme Library", + name: "ThemeLibrary", description: "A library of themes for Vencord.", - authors: [EquicordDevs.Fafa], + authors: [{ + name: "Fafa", + id: 428188716641812481n, + }], + settings, + toolboxActions: { + "Open Theme Library": () => { + SettingsRouter.open("ThemeLibrary"); + } + }, start() { const customSettingsSections = ( @@ -35,5 +54,5 @@ export default definePlugin({ const i = customSettingsSections.findIndex(section => section({}).id === "ThemeSection"); if (i !== -1) customSettingsSections.splice(i, 1); - } + }, }); diff --git a/src/equicordplugins/themeLibrary/types.ts b/src/equicordplugins/themeLibrary/types.ts index c8f6c390..81968987 100644 --- a/src/equicordplugins/themeLibrary/types.ts +++ b/src/equicordplugins/themeLibrary/types.ts @@ -33,6 +33,7 @@ export interface Theme { invite_link: string; avatar_hash: string; }; + source?: string; } export interface ThemeInfoModalProps extends ModalProps {