mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 20:55:13 +00:00
fix regression that broke some ui spacing
This commit is contained in:
parent
a824452333
commit
5f1a4db7e1
12 changed files with 16 additions and 17 deletions
|
|
@ -23,9 +23,10 @@ export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
|
|||
gap?: CSSProperties["gap"];
|
||||
justifyContent?: CSSProperties["justifyContent"];
|
||||
alignItems?: CSSProperties["alignItems"];
|
||||
flexWrap?: CSSProperties["flexWrap"];
|
||||
}
|
||||
|
||||
export function Flex({ flexDirection, gap = "1em", justifyContent, alignItems, children, style, ...restProps }: FlexProps) {
|
||||
export function Flex({ flexDirection, gap = "1em", justifyContent, alignItems, flexWrap, children, style, ...restProps }: FlexProps) {
|
||||
style ??= {};
|
||||
Object.assign(style, {
|
||||
display: "flex",
|
||||
|
|
@ -33,6 +34,7 @@ export function Flex({ flexDirection, gap = "1em", justifyContent, alignItems, c
|
|||
gap,
|
||||
justifyContent,
|
||||
alignItems,
|
||||
flexWrap
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export function ThemeCard({ theme, enabled, onChange, onDelete }: ThemeCardProps
|
|||
)
|
||||
}
|
||||
footer={
|
||||
<Flex flexDirection="row" style={{ gap: "0.2em" }}>
|
||||
<Flex flexDirection="row" gap="0.2em">
|
||||
{!!theme.website && <Link href={theme.website}>Website</Link>}
|
||||
{!!(theme.website && theme.invite) && " • "}
|
||||
{!!theme.invite && (
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ export default definePlugin({
|
|||
margin: 0
|
||||
}}
|
||||
>
|
||||
<Flex style={{ justifyContent: "center", alignItems: "center", gap: "0.5em" }}>
|
||||
<Flex justifyContent="center" alignItems="center" gap="0.5em">
|
||||
<Heart />
|
||||
Vencord Donor
|
||||
</Flex>
|
||||
|
|
@ -244,7 +244,7 @@ export default definePlugin({
|
|||
</div>
|
||||
</ModalContent>
|
||||
<ModalFooter>
|
||||
<Flex style={{ width: "100%", justifyContent: "center" }}>
|
||||
<Flex justifyContent="center" style={{ width: "100%" }}>
|
||||
<DonateButton />
|
||||
</Flex>
|
||||
</ModalFooter>
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ export default definePlugin({
|
|||
</ErrorCard>
|
||||
)}
|
||||
|
||||
<Flex flexDirection="column" style={{ gap: ".5em" }} className={Margins.top16}>
|
||||
<Flex flexDirection="column" gap=".5em" className={Margins.top16}>
|
||||
<Forms.FormText>
|
||||
Go to the <Link href="https://discord.com/developers/applications">Discord Developer Portal</Link> to create an application and
|
||||
get the application ID.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default function DecorSection({ hideTitle = false, hideDivider = false, n
|
|||
hideDivider={hideDivider}
|
||||
className={noMargin && cl("section-remove-margin")}
|
||||
>
|
||||
<Flex style={{ gap: "4px " }}>
|
||||
<Flex gap="4px">
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (!authorization.isAuthorized()) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ function GuidelinesModal(props: ModalProps) {
|
|||
</Forms.FormText>
|
||||
</ModalContent>
|
||||
<ModalFooter className={cl("modal-footer")}>
|
||||
<Flex style={{ gap: "4px" }}>
|
||||
<Flex gap="4px">
|
||||
<Button
|
||||
onClick={() => {
|
||||
settings.store.agreedToGuidelines = true;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ function RolesAndUsersPermissionsComponent({ permissions, guild, modalProps, hea
|
|||
: permission.type === PermissionType.User
|
||||
? (user != null && getUniqueUsername(user)) ?? "Unknown User"
|
||||
: (
|
||||
<Flex style={{ gap: "0.2em", justifyItems: "center" }}>
|
||||
<Flex gap="0.2em">
|
||||
@owner
|
||||
<OwnerCrownIcon height={18} width={18} aria-hidden="true" />
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ function makeSearchItem(src: string) {
|
|||
key={key}
|
||||
id={key}
|
||||
label={
|
||||
<Flex style={{ alignItems: "center", gap: "0.5em" }}>
|
||||
<Flex alignItems="center" gap="0.5em">
|
||||
<img
|
||||
style={{
|
||||
borderRadius: "50%",
|
||||
|
|
@ -72,7 +72,7 @@ function makeSearchItem(src: string) {
|
|||
key="search-image-all"
|
||||
id="search-image-all"
|
||||
label={
|
||||
<Flex style={{ alignItems: "center", gap: "0.5em" }}>
|
||||
<Flex alignItems="center" gap="0.5em">
|
||||
<OpenExternalIcon height={16} width={16} />
|
||||
All
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -88,10 +88,7 @@ function ConnectionsComponent({ id, theme }: { id: string, theme: string; }) {
|
|||
return null;
|
||||
|
||||
return (
|
||||
<Flex style={{
|
||||
gap: getSpacingPx(settings.store.iconSpacing),
|
||||
flexWrap: "wrap"
|
||||
}}>
|
||||
<Flex gap={getSpacingPx(settings.store.iconSpacing)} flexWrap="wrap">
|
||||
{connections.map(connection => <CompactConnectionComponent connection={connection} theme={theme} key={connection.id} />)}
|
||||
</Flex>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ function Controls() {
|
|||
|
||||
// the 1 is using position absolute so it does not make the button jump around
|
||||
return (
|
||||
<Flex className={cl("button-row")} style={{ gap: 0 }}>
|
||||
<Flex className={cl("button-row")} gap="0">
|
||||
<Button
|
||||
className={classes(cl("button"), cl("shuffle"), cl(shuffle ? "shuffle-on" : "shuffle-off"))}
|
||||
onClick={() => SpotifyStore.setShuffle(!shuffle)}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ function ServerTrace({ trace }: ServerTraceProps) {
|
|||
<section>
|
||||
<Forms.FormTitle tag="h3">Server Trace</Forms.FormTitle>
|
||||
<code>
|
||||
<Flex flexDirection="column" style={{ color: "var(--header-primary)", gap: 5, userSelect: "text" }}>
|
||||
<Flex flexDirection="column" gap="5px" style={{ color: "var(--header-primary)", userSelect: "text" }}>
|
||||
{lines.map((line, idx) => (
|
||||
<span key={idx}>{line}</span>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ function TextReplace({ title, rulesArray }: TextReplaceProps) {
|
|||
{
|
||||
rulesArray.map((rule, index) =>
|
||||
<React.Fragment key={`${rule.find}-${index}`}>
|
||||
<Flex flexDirection="row" style={{ flexGrow: 1, gap: "0.5em" }}>
|
||||
<Flex gap="0.5em" flexDirection="row" style={{ flexGrow: 1 }}>
|
||||
<Input
|
||||
placeholder="Find"
|
||||
initialValue={rule.find}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue