mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): stack slowmode slider layout (#1582)
This commit is contained in:
1 parent
7be5b0589d
commit
614ee3a54b
3 files changed
+38
-2
No files matched your search
+24
@@ -209,6 +209,12 @@
|
|||||||
padding: 0.25rem 0;
|
padding: 0.25rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settingsControlRowStacked {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
.settingsControlText {
|
.settingsControlText {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -245,6 +251,24 @@
|
|||||||
padding-top: 0.125rem;
|
padding-top: 0.125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settingsControlRowStacked .settingsControlText,
|
||||||
|
.settingsControlRowStacked .settingsSliderControl {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settingsControlRowStacked .settingsControlText {
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settingsControlRowStacked .settingsControlDescription {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settingsControlRowStacked .settingsSliderControl {
|
||||||
|
flex: none;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.selectField {
|
.selectField {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
+13
-2
@@ -1,18 +1,29 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
import styles from '@app/features/channel/components/modals/channel_tabs/ChannelOverviewTab.module.css';
|
import styles from '@app/features/channel/components/modals/channel_tabs/ChannelOverviewTab.module.css';
|
||||||
|
import {clsx} from 'clsx';
|
||||||
import type React from 'react';
|
import type React from 'react';
|
||||||
|
|
||||||
interface SettingsControlRowProps {
|
interface SettingsControlRowProps {
|
||||||
label: string;
|
label: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
dataFlx: string;
|
dataFlx: string;
|
||||||
|
stacked?: boolean;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SettingsControlRow: React.FC<SettingsControlRowProps> = ({label, description, dataFlx, children}) => {
|
export const SettingsControlRow: React.FC<SettingsControlRowProps> = ({
|
||||||
|
label,
|
||||||
|
description,
|
||||||
|
dataFlx,
|
||||||
|
stacked = false,
|
||||||
|
children,
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.settingsControlRow} data-flx={`${dataFlx}.row`}>
|
<div
|
||||||
|
className={clsx(styles.settingsControlRow, stacked && styles.settingsControlRowStacked)}
|
||||||
|
data-flx={`${dataFlx}.row`}
|
||||||
|
>
|
||||||
<div className={styles.settingsControlText} data-flx={`${dataFlx}.text`}>
|
<div className={styles.settingsControlText} data-flx={`${dataFlx}.text`}>
|
||||||
<div className={styles.settingsControlTitleRow} data-flx={`${dataFlx}.title-row`}>
|
<div className={styles.settingsControlTitleRow} data-flx={`${dataFlx}.title-row`}>
|
||||||
<span className={styles.settingsControlLabel} data-flx={`${dataFlx}.label`}>
|
<span className={styles.settingsControlLabel} data-flx={`${dataFlx}.label`}>
|
||||||
|
|||||||
+1
@@ -113,6 +113,7 @@ export const SlowmodeControl: React.FC<SlowmodeControlProps> = ({form, remoteSlo
|
|||||||
<SettingsControlRow
|
<SettingsControlRow
|
||||||
label={slowmodeLabel}
|
label={slowmodeLabel}
|
||||||
description={i18n._(SLOWMODE_DESCRIPTION_DESCRIPTOR, {bypassSlowmodePermissionLabel})}
|
description={i18n._(SLOWMODE_DESCRIPTION_DESCRIPTOR, {bypassSlowmodePermissionLabel})}
|
||||||
|
stacked
|
||||||
dataFlx="channel.channel-tabs.channel-overview-tab.slowmode-control"
|
dataFlx="channel.channel-tabs.channel-overview-tab.slowmode-control"
|
||||||
>
|
>
|
||||||
<div className={styles.settingsSliderControl}>
|
<div className={styles.settingsSliderControl}>
|
||||||
|
|||||||
Reference in new issue
Block a user