Migrate Some BaseText To Paragraph

This commit is contained in:
thororen1234 2025-10-10 21:27:47 -04:00
parent 811781036e
commit fa44f8fccd
No known key found for this signature in database
6 changed files with 39 additions and 40 deletions

View file

@ -20,13 +20,13 @@ import "./themesStyles.css";
import { Settings, useSettings } from "@api/Settings"; import { Settings, useSettings } from "@api/Settings";
import { classNameFactory } from "@api/Styles"; import { classNameFactory } from "@api/Styles";
import { BaseText } from "@components/BaseText";
import { Divider } from "@components/Divider"; import { Divider } from "@components/Divider";
import { ErrorCard } from "@components/ErrorCard"; import { ErrorCard } from "@components/ErrorCard";
import { Flex } from "@components/Flex"; import { Flex } from "@components/Flex";
import { Heading } from "@components/Heading"; import { Heading } from "@components/Heading";
import { CogWheel, DeleteIcon, FolderIcon, PaintbrushIcon, PencilIcon, PluginIcon, PlusIcon, RestartIcon } from "@components/Icons"; import { CogWheel, DeleteIcon, FolderIcon, PaintbrushIcon, PencilIcon, PluginIcon, PlusIcon, RestartIcon } from "@components/Icons";
import { Link } from "@components/Link"; import { Link } from "@components/Link";
import { Paragraph } from "@components/Paragraph";
import { AddonCard, openPluginModal, QuickAction, QuickActionCard, SettingsTab, wrapTab } from "@components/settings"; import { AddonCard, openPluginModal, QuickAction, QuickActionCard, SettingsTab, wrapTab } from "@components/settings";
import { OnlineThemeCard } from "@components/settings/OnlineThemeCard"; import { OnlineThemeCard } from "@components/settings/OnlineThemeCard";
import { CspBlockedUrls, useCspErrors } from "@utils/cspViolations"; import { CspBlockedUrls, useCspErrors } from "@utils/cspViolations";
@ -470,7 +470,7 @@ function ThemesTab() {
<section> <section>
<Heading>Online Themes</Heading> <Heading>Online Themes</Heading>
<Card className="vc-settings-theme-add-card"> <Card className="vc-settings-theme-add-card">
<BaseText>Make sure to use direct links to files (raw or github.io)!</BaseText> <Paragraph>Make sure to use direct links to files (raw or github.io)!</Paragraph>
<Flex flexDirection="row"> <Flex flexDirection="row">
<TextInput placeholder="Theme Link" className="vc-settings-theme-link-input" value={currentThemeLink} onChange={setCurrentThemeLink} /> <TextInput placeholder="Theme Link" className="vc-settings-theme-link-input" value={currentThemeLink} onChange={setCurrentThemeLink} />
<Button onClick={() => addThemeLink(currentThemeLink)} disabled={!themeLinkValid}>Add</Button> <Button onClick={() => addThemeLink(currentThemeLink)} disabled={!themeLinkValid}>Add</Button>
@ -584,11 +584,11 @@ export function CspErrorCard() {
return ( return (
<ErrorCard className="vc-settings-card"> <ErrorCard className="vc-settings-card">
<Heading>Blocked Resources</Heading> <Heading>Blocked Resources</Heading>
<BaseText>Some images, styles, or fonts were blocked because they come from disallowed domains.</BaseText> <Paragraph>Some images, styles, or fonts were blocked because they come from disallowed domains.</Paragraph>
<BaseText>It is highly recommended to move them to GitHub or Imgur. But you may also allow domains if you fully trust them.</BaseText> <Paragraph>It is highly recommended to move them to GitHub or Imgur. But you may also allow domains if you fully trust them.</Paragraph>
<BaseText> <Paragraph>
After allowing a domain, you have to fully close (from tray / task manager) and restart {IS_DISCORD_DESKTOP ? "Discord" : IS_EQUIBOP ? "Equibop" : "Vesktop"} to apply the change. After allowing a domain, you have to fully close (from tray / task manager) and restart {IS_DISCORD_DESKTOP ? "Discord" : IS_EQUIBOP ? "Equibop" : "Vesktop"} to apply the change.
</BaseText> </Paragraph>
<Heading className={classes(Margins.top16, Margins.bottom8)}>Blocked URLs</Heading> <Heading className={classes(Margins.top16, Margins.bottom8)}>Blocked URLs</Heading>
<div className="vc-settings-csp-list"> <div className="vc-settings-csp-list">
@ -608,10 +608,10 @@ export function CspErrorCard() {
{hasImgurHtmlDomain && ( {hasImgurHtmlDomain && (
<> <>
<Divider className={classes(Margins.top8, Margins.bottom16)} /> <Divider className={classes(Margins.top8, Margins.bottom16)} />
<BaseText> <Paragraph>
Imgur links should be direct links in the form of <code>https://i.imgur.com/...</code> Imgur links should be direct links in the form of <code>https://i.imgur.com/...</code>
</BaseText> </Paragraph>
<BaseText>To obtain a direct link, right-click the image and select "Copy image address".</BaseText> <Paragraph>To obtain a direct link, right-click the image and select "Copy image address".</Paragraph>
</> </>
)} )}
</ErrorCard> </ErrorCard>
@ -624,9 +624,9 @@ function UserscriptThemesTab() {
<Card className="vc-settings-card"> <Card className="vc-settings-card">
<Heading>Themes are not supported on the Userscript!</Heading> <Heading>Themes are not supported on the Userscript!</Heading>
<BaseText> <Paragraph>
You can instead install themes with the <Link href={getStylusWebStoreUrl()}>Stylus extension</Link>! You can instead install themes with the <Link href={getStylusWebStoreUrl()}>Stylus extension</Link>!
</BaseText> </Paragraph>
</Card> </Card>
</SettingsTab> </SettingsTab>
); );

View file

@ -6,12 +6,12 @@
import "./styles.css"; import "./styles.css";
import { BaseText } from "@components/BaseText";
import { Divider } from "@components/Divider"; import { Divider } from "@components/Divider";
import { ErrorCard } from "@components/ErrorCard"; import { ErrorCard } from "@components/ErrorCard";
import { Heading } from "@components/Heading"; import { Heading } from "@components/Heading";
import { DeleteIcon } from "@components/Icons"; import { DeleteIcon } from "@components/Icons";
import { Link } from "@components/Link"; import { Link } from "@components/Link";
import { Paragraph } from "@components/Paragraph";
import { SettingsTab, wrapTab } from "@components/settings/tabs/BaseTab"; import { SettingsTab, wrapTab } from "@components/settings/tabs/BaseTab";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
import { useAwaiter } from "@utils/react"; import { useAwaiter } from "@utils/react";
@ -491,13 +491,13 @@ function ChangelogContent() {
return ( return (
<> <>
<BaseText className={Margins.bottom16}> <Paragraph className={Margins.bottom16}>
View the most recent changes to Equicord. This fetches commits View the most recent changes to Equicord. This fetches commits
directly from the repository to show you what's new. directly from the repository to show you what's new.
</BaseText> </Paragraph>
<Heading>Repository</Heading> <Heading>Repository</Heading>
<BaseText className={Margins.bottom16}> <Paragraph className={Margins.bottom16}>
{repoPending ? ( {repoPending ? (
repo repo
) : repoErr ? ( ) : repoErr ? (
@ -512,7 +512,7 @@ function ChangelogContent() {
{shortGitHash()} {shortGitHash()}
</span> </span>
) )
</BaseText> </Paragraph>
<div className="vc-changelog-controls"> <div className="vc-changelog-controls">
<Button <Button
@ -584,14 +584,14 @@ function ChangelogContent() {
{error && ( {error && (
<ErrorCard style={{ padding: "1em", marginBottom: "1em" }}> <ErrorCard style={{ padding: "1em", marginBottom: "1em" }}>
<p>{error}</p> <p>{error}</p>
<BaseText <Paragraph
style={{ style={{
marginTop: "0.5em", marginTop: "0.5em",
color: "var(--text-muted)", color: "var(--text-muted)",
}} }}
> >
Make sure you have an internet connection and try again. Make sure you have an internet connection and try again.
</BaseText> </Paragraph>
</ErrorCard> </ErrorCard>
)} )}
@ -650,11 +650,11 @@ function ChangelogContent() {
!isLoading && !isLoading &&
!error && ( !error && (
<Card className="vc-changelog-empty"> <Card className="vc-changelog-empty">
<BaseText> <Paragraph>
No commits available ahead of your current version. No commits available ahead of your current version.
Click "Fetch from Repository" to check for new Click "Fetch from Repository" to check for new
changes. changes.
</BaseText> </Paragraph>
</Card> </Card>
) )
)} )}
@ -670,10 +670,10 @@ function ChangelogContent() {
Update Logs ({changelogHistory.length}{" "} Update Logs ({changelogHistory.length}{" "}
{changelogHistory.length === 1 ? "log" : "logs"}) {changelogHistory.length === 1 ? "log" : "logs"})
</Heading> </Heading>
<BaseText className={Margins.bottom16}> <Paragraph className={Margins.bottom16}>
Previous update sessions with their commit history and Previous update sessions with their commit history and
plugin changes. plugin changes.
</BaseText> </Paragraph>
<div className="vc-changelog-history-list"> <div className="vc-changelog-history-list">
{changelogHistory.map(log => ( {changelogHistory.map(log => (

View file

@ -18,7 +18,6 @@
import { showNotification } from "@api/Notifications"; import { showNotification } from "@api/Notifications";
import { Settings, useSettings } from "@api/Settings"; import { Settings, useSettings } from "@api/Settings";
import { BaseText } from "@components/BaseText";
import { CheckedTextInput } from "@components/CheckedTextInput"; import { CheckedTextInput } from "@components/CheckedTextInput";
import { Divider } from "@components/Divider"; import { Divider } from "@components/Divider";
import { FormSwitch } from "@components/FormSwitch"; import { FormSwitch } from "@components/FormSwitch";
@ -164,9 +163,9 @@ function CloudTab() {
}} }}
/> />
<Heading>Backend URL</Heading> <Heading>Backend URL</Heading>
<BaseText className={Margins.bottom8}> <Paragraph className={Margins.bottom8}>
Which backend to use when using cloud integrations. Which backend to use when using cloud integrations.
</BaseText> </Paragraph>
<CheckedTextInput <CheckedTextInput
key={`backendUrl-${inputKey}`} key={`backendUrl-${inputKey}`}
value={settings.cloud.url} value={settings.cloud.url}

View file

@ -5,7 +5,7 @@
*/ */
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { BaseText } from "@components/BaseText"; import { Paragraph } from "@components/Paragraph";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { GuildMember } from "@vencord/discord-types"; import { GuildMember } from "@vencord/discord-types";
@ -109,7 +109,7 @@ function isRoleAllBlockedMembers(roleId, guildId) {
function hiddenReplyComponent() { function hiddenReplyComponent() {
switch (settings.store.blockedReplyDisplay) { switch (settings.store.blockedReplyDisplay) {
case "displayText": case "displayText":
return <BaseText size="sm" tag="p" style={{ marginTop: "0px", marginBottom: "0px" }}><i>↓ Replying to blocked message</i></BaseText>; return <Paragraph style={{ marginTop: "0px", marginBottom: "0px" }}><i>↓ Replying to blocked message</i></Paragraph>;
case "hideReply": case "hideReply":
return null; return null;
} }

View file

@ -8,8 +8,8 @@ import "styles.css?managed";
import { DataStore } from "@api/index"; import { DataStore } from "@api/index";
import { addMessagePreSendListener, removeMessagePreSendListener } from "@api/MessageEvents"; import { addMessagePreSendListener, removeMessagePreSendListener } from "@api/MessageEvents";
import { BaseText } from "@components/BaseText";
import { Heart } from "@components/Heart"; import { Heart } from "@components/Heart";
import { Paragraph } from "@components/Paragraph";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { openUserProfile } from "@utils/discord"; import { openUserProfile } from "@utils/discord";
import * as Modal from "@utils/modal"; import * as Modal from "@utils/modal";
@ -246,13 +246,13 @@ class DataUI {
{this.renderUserAvatar(user)} {this.renderUserAvatar(user)}
<Tooltip text={this.userTooltipText(user)}> <Tooltip text={this.userTooltipText(user)}>
{props => {props =>
<BaseText {...props}>{user.tag} {allowExtra.owner && user.extra?.isOwner && "(owner)"}</BaseText> <Paragraph {...props}>{user.tag} {allowExtra.owner && user.extra?.isOwner && "(owner)"}</Paragraph>
} }
</Tooltip> </Tooltip>
</Flex> </Flex>
</span> </span>
<span style={{ height: "min-content" }}><BaseText style={{ opacity: 0.75 }}>{user.id}</BaseText></span> <span style={{ height: "min-content" }}><Paragraph style={{ opacity: 0.75 }}>{user.id}</Paragraph></span>
</Flex>; </Flex>;
} }
@ -280,7 +280,7 @@ class DataUI {
<TextArea value={JSON.stringify(usersCollection, null, "\t")} onChange={() => { }} rows={20} /> <TextArea value={JSON.stringify(usersCollection, null, "\t")} onChange={() => { }} rows={20} />
</Modal.ModalContent> </Modal.ModalContent>
</Modal.ModalRoot>)}> </Modal.ModalRoot>)}>
<BaseText style={{ cursor: "pointer" }}>Open editor</BaseText> <Paragraph style={{ cursor: "pointer" }}>Open editor</Paragraph>
</Clickable> </Clickable>
<Clickable onClick={ <Clickable onClick={

View file

@ -6,7 +6,7 @@
import { Flex } from "@components/Flex"; import { Flex } from "@components/Flex";
import { Heart } from "@components/Heart"; import { Heart } from "@components/Heart";
import { BaseText, DonateButton, ErrorBoundary, HeadingPrimary, VCDonateButton } from "@components/index"; import { DonateButton, ErrorBoundary, HeadingPrimary, Paragraph, VCDonateButton } from "@components/index";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
import { closeModal, ModalContent, ModalFooter, ModalHeader, ModalRoot, openModal } from "@utils/modal"; import { closeModal, ModalContent, ModalFooter, ModalHeader, ModalRoot, openModal } from "@utils/modal";
@ -47,12 +47,12 @@ export function VencordDonorModal() {
/> />
</Flex> </Flex>
<div style={{ padding: "1em" }}> <div style={{ padding: "1em" }}>
<BaseText> <Paragraph>
This Badge is a special perk for Vencord Donors This Badge is a special perk for Vencord Donors
</BaseText> </Paragraph>
<BaseText className={Margins.top20}> <Paragraph className={Margins.top20}>
Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!! Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!
</BaseText> </Paragraph>
</div> </div>
</ModalContent> </ModalContent>
<ModalFooter> <ModalFooter>
@ -103,12 +103,12 @@ export function EquicordDonorModal() {
/> />
</Flex> </Flex>
<div style={{ padding: "1em" }}> <div style={{ padding: "1em" }}>
<BaseText> <Paragraph>
This Badge is a special perk for Equicord (Not Vencord) Donors This Badge is a special perk for Equicord (Not Vencord) Donors
</BaseText> </Paragraph>
<BaseText className={Margins.top20}> <Paragraph className={Margins.top20}>
Please consider supporting the development of Equicord by becoming a donor. It would mean a lot! :3 Please consider supporting the development of Equicord by becoming a donor. It would mean a lot! :3
</BaseText> </Paragraph>
</div> </div>
</ModalContent> </ModalContent>
<ModalFooter> <ModalFooter>