Skip to content

Commit

Permalink
Fix Online Themes tab (#2786)
Browse files Browse the repository at this point in the history
  • Loading branch information
HAHALOSAH authored Aug 17, 2024
1 parent d388aa4 commit eaca14b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/VencordSettings/ThemesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ import { openPluginModal } from "@components/PluginSettings/PluginModal";
import type { UserThemeHeader } from "@main/themes";
import { openInviteModal } from "@utils/discord";
import { Margins } from "@utils/margins";
import { classes } from "@utils/misc";
import { showItemInFolder } from "@utils/native";
import { useAwaiter } from "@utils/react";
import { findByPropsLazy, findLazy } from "@webpack";
import { findLazy } from "@webpack";
import { Card, Forms, React, showToast, TabBar, TextArea, useEffect, useRef, useState } from "@webpack/common";
import type { ComponentType, Ref, SyntheticEvent } from "react";

Expand All @@ -45,9 +44,7 @@ type FileInput = ComponentType<{
filters?: { name?: string; extensions: string[]; }[];
}>;

const InviteActions = findByPropsLazy("resolveInvite");
const FileInput: FileInput = findLazy(m => m.prototype?.activateUploadDialogue && m.prototype.setRef);
const TextAreaProps = findLazy(m => typeof m.textarea === "string");

const cl = classNameFactory("vc-settings-theme-");

Expand Down Expand Up @@ -306,7 +303,7 @@ function ThemesTab() {
<TextArea
value={themeText}
onChange={setThemeText}
className={classes(TextAreaProps.textarea, "vc-settings-theme-links")}
className={"vc-settings-theme-links"}
placeholder="Theme Links"
spellCheck={false}
onBlur={onBlur}
Expand Down
14 changes: 14 additions & 0 deletions src/components/VencordSettings/settingsStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
padding: 0.5em;
border: 1px solid var(--background-modifier-accent);
max-height: unset;
background-color: transparent;
box-sizing: border-box;
font-size: 12px;
line-height: 14px;
resize: none;
width: 100%;
}

.vc-settings-theme-links::placeholder {
color: var(--header-secondary);
}

.vc-settings-theme-links:focus {
background-color: var(--background-tertiary);
}

.vc-cloud-settings-sync-grid {
Expand Down

0 comments on commit eaca14b

Please sign in to comment.