Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/modules/reduced_motion/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import effects from '@/common/styles/UsernameEffects.module.css';
import {onReducedMotionChange, shouldReduceMotion} from '@/common/utils/reduced-motion';
import watcher from '@/watcher';

class ReducedMotionModule {
constructor() {
onReducedMotionChange(() => this.load());
watcher.on('load.chat', () => this.load());
this.load();
}

Expand Down
4 changes: 2 additions & 2 deletions src/modules/settings/components/SettingCheckbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from 'react';
import styles from './SettingCheckbox.module.css';
import SettingWrapper from './SettingWrapper';

function SettingCheckbox({name, description, value, onChange, showProBadge = false, showNewBadge = false, ...props}) {
function SettingCheckbox({name, description, value, onChange, showProBadge = false, ...props}) {
return (
<SettingWrapper name={name} description={description} showProBadge={showProBadge} showNewBadge={showNewBadge}>
<SettingWrapper name={name} description={description} showProBadge={showProBadge}>
<Checkbox
{...props}
value={String(value)}
Expand Down
8 changes: 4 additions & 4 deletions src/modules/settings/components/SettingKeywords.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '@mantine/core';
import {useDisclosure, useFocusTrap} from '@mantine/hooks';
import classNames from 'classnames';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
import Icon from '@/common/components/Icon';
import useBadgeOptions from '@/common/hooks/BadgeOptions';
import useCurrentChannel from '@/common/hooks/CurrentChannel';
Expand Down Expand Up @@ -274,7 +274,7 @@ function KeywordsTable({
</ActionIcon>
</div>
</TableTh>
<TableTh className={styles.channelsColumn}>{formatMessage({defaultMessage: 'Channels'})}</TableTh>
<TableTh>{formatMessage({defaultMessage: 'Channels'})}</TableTh>
<TableTh className={tableStyles.actionsColumn} />
</TableTr>
</TableThead>
Expand Down Expand Up @@ -361,7 +361,7 @@ function SettingKeywords({value, setValue, colorColumn = null}) {
{formatMessage({defaultMessage: 'New Entry'})}
</Button>
}
className={styles.settingGroupContent}>
className={tableStyles.settingGroupContent}>
{filteredEntryList.length > 0 ? (
<KeywordsTable
entryList={filteredEntryList}
Expand All @@ -374,7 +374,7 @@ function SettingKeywords({value, setValue, colorColumn = null}) {
onPaste={handlePaste}
/>
) : entryList.length > 0 ? (
<Text className={styles.noKeywordsText} c="dimmed">
<Text className={tableStyles.emptyText} c="dimmed">
{formatMessage({defaultMessage: 'No keywords match your search.'})}
</Text>
) : (
Expand Down
70 changes: 1 addition & 69 deletions src/modules/settings/components/SettingKeywords.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
.settingGroupContent {
padding: 0;
overflow: hidden;
}

.newEntryButton {
margin-left: auto;
}

.searchInputRoot {
width: 100%;
max-width: 240px;
Expand All @@ -16,63 +7,20 @@
height: 32px;
}

.table {
font-size: var(--mantine-font-size-md);

th {
font-weight: 500;
}

th,
td {
padding: 8px 12px;
height: 36px;
}

--table-border-color: var(--mantine-color-default-border);

td:hover {
background-color: var(--table-hover-color);
}
}

.targetDataCell,
.keywordDataCell,
.colorDataCell,
.actionsDataCell {
padding: 0 !important;
}

.targetColumn {
width: 128px;
}

.targetSelectInput,
.keywordInput {
font-size: var(--mantine-font-size-md);
padding-left: 12px;
}

.keywordInput:focus {
box-shadow: unset;
}

.keywordRoot {
min-width: 192px;
}

.keywordRoot,
.keywordInput,
.keywordWrapper {
height: 100%;
}

.keywordColumn {
width: 1px;
}

.colorPicker,
.actionIcon {
.colorPicker {
width: 36px;
height: 36px;
padding: 8px;
Expand All @@ -82,11 +30,6 @@
justify-content: center;
}

.actionIconIcon {
width: 12px;
height: 12px;
}

.channelsContainer {
all: unset;
cursor: pointer;
Expand All @@ -109,12 +52,6 @@
vertical-align: middle;
}

.settingGroupHeader {
display: flex;
justify-content: space-between;
align-items: center;
}

.channelsInputHidden {
display: none;
}
Expand Down Expand Up @@ -144,11 +81,6 @@
flex-shrink: 0;
}

.noKeywordsText {
padding: 20px;
text-align: center;
}

.keywordHeader {
display: flex;
align-items: center;
Expand Down
4 changes: 1 addition & 3 deletions src/modules/settings/components/SettingPrimaryColorRadio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function SettingPrimaryColorRadio({
description,
colors = PRIMARY_COLOR_PALETTE,
showProBadge = false,
showNewBadge = false,
}) {
const normalizedValue = useMemo(() => normalizePrimaryColor(value, colors), [value, colors]);
const colorLabels = useMemo(() => buildPrimaryColorLabels(colors), [colors]);
Expand All @@ -61,8 +60,7 @@ function SettingPrimaryColorRadio({
reverse
description={description}
controlClassName={groupStyles.radioGroup}
showProBadge={showProBadge}
showNewBadge={showNewBadge}>
showProBadge={showProBadge}>
<SettingRadioCardGroup value={normalizedValue} onChange={handleChange}>
{colors.map((color) => (
<SettingRadioCard
Expand Down
2 changes: 1 addition & 1 deletion src/modules/settings/components/SettingSelfBotCommands.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
TextInput,
} from '@mantine/core';
import classNames from 'classnames';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
import {useShallow} from 'zustand/react/shallow';
import Icon from '@/common/components/Icon';
import useEntryListState from '@/common/hooks/EntryListState';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/settings/components/SettingSelfBotTimers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TextInput,
} from '@mantine/core';
import classNames from 'classnames';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import React, {useCallback, useMemo, useState} from 'react';
import {useShallow} from 'zustand/react/shallow';
import Icon from '@/common/components/Icon';
import ProBadge from '@/common/components/ProBadge';
Expand Down
11 changes: 0 additions & 11 deletions src/modules/settings/components/SettingWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function SettingWrapper({
children,
showProBadge = false,
showNewBadge = false,
showComingSoonBadge = false,
reverse = false,
wrap = false,
controlClassName = '',
Expand Down Expand Up @@ -59,16 +58,6 @@ function SettingWrapper({
</Badge>
</Tooltip>
) : null}
{showComingSoonBadge ? (
<Tooltip
withArrow
label={<Text size="md">{formatMessage({defaultMessage: 'This feature is not available yet.'})}</Text>}
portalProps={{target: portalRef.current}}>
<Badge color="green" variant="elevated" size="lg">
{formatMessage({defaultMessage: 'Coming Soon'})}
</Badge>
</Tooltip>
) : null}
</Title>
) : null}
{description != null ? (
Expand Down
10 changes: 0 additions & 10 deletions src/modules/settings/components/SettingWrapper.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
flex-wrap: wrap;
}

.vertical {
flex-direction: column-reverse;
align-items: flex-start;
}

.reverse {
flex-direction: row-reverse;
flex-wrap: wrap;
}

.text {
display: flex;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/settings/components/SideNavigation.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
transform: none;
}

/* top-level nav items for each individual setting (also used by the Changelog button). These use
/* top-level nav items for each individual setting. These use
Mantine's transparent variant, so there's no background fill in any state (rest, hover, or
active) — hovering only undims the label (see the hover rule below), Discord-style, and the
pill treatment stays exclusive to the category rows. */
Expand Down
Loading