mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
reduce spacing between buttons to fix toolbar not fitting on a single line on mobile
This commit is contained in:
5
commafeed-client/src/components/ButtonToolbar.tsx
Normal file
5
commafeed-client/src/components/ButtonToolbar.tsx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { Group } from "@mantine/core"
|
||||||
|
|
||||||
|
export function ButtonToolbar(props: { children: React.ReactNode }) {
|
||||||
|
return <Group spacing={14}>{props.children}</Group>
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import { markEntriesUpToEntry, markEntry, starEntry, tagEntry } from "app/slices
|
|||||||
import { useAppDispatch, useAppSelector } from "app/store"
|
import { useAppDispatch, useAppSelector } from "app/store"
|
||||||
import { Entry } from "app/types"
|
import { Entry } from "app/types"
|
||||||
import { ActionButton } from "components/ActionButtton"
|
import { ActionButton } from "components/ActionButtton"
|
||||||
|
import { ButtonToolbar } from "components/ButtonToolbar"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import { TbArrowBarToDown, TbExternalLink, TbEyeCheck, TbEyeOff, TbShare, TbStar, TbStarOff, TbTag } from "react-icons/tb"
|
import { TbArrowBarToDown, TbExternalLink, TbEyeCheck, TbEyeOff, TbShare, TbStar, TbStarOff, TbTag } from "react-icons/tb"
|
||||||
import { ShareButtons } from "./ShareButtons"
|
import { ShareButtons } from "./ShareButtons"
|
||||||
@@ -43,7 +44,7 @@ export function FeedEntryFooter(props: FeedEntryFooterProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Group position="apart">
|
<Group position="apart">
|
||||||
<Group>
|
<ButtonToolbar>
|
||||||
{props.entry.markable && (
|
{props.entry.markable && (
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon={props.entry.read ? <TbEyeOff size={18} /> : <TbEyeCheck size={18} />}
|
icon={props.entry.read ? <TbEyeOff size={18} /> : <TbEyeCheck size={18} />}
|
||||||
@@ -93,7 +94,7 @@ export function FeedEntryFooter(props: FeedEntryFooterProps) {
|
|||||||
<a href={props.entry.url} target="_blank" rel="noreferrer">
|
<a href={props.entry.url} target="_blank" rel="noreferrer">
|
||||||
<ActionButton icon={<TbExternalLink size={18} />} label={t`Open link`} />
|
<ActionButton icon={<TbExternalLink size={18} />} label={t`Open link`} />
|
||||||
</a>
|
</a>
|
||||||
</Group>
|
</ButtonToolbar>
|
||||||
|
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon={<TbArrowBarToDown size={18} />}
|
icon={<TbArrowBarToDown size={18} />}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { t } from "@lingui/macro"
|
import { t } from "@lingui/macro"
|
||||||
import { ActionIcon, Center, Divider, Group, Indicator, Popover, TextInput } from "@mantine/core"
|
import { ActionIcon, Center, Divider, Indicator, Popover, TextInput } from "@mantine/core"
|
||||||
import { useForm } from "@mantine/form"
|
import { useForm } from "@mantine/form"
|
||||||
import { reloadEntries, search } from "app/slices/entries"
|
import { reloadEntries, search } from "app/slices/entries"
|
||||||
import { changeReadingMode, changeReadingOrder } from "app/slices/user"
|
import { changeReadingMode, changeReadingOrder } from "app/slices/user"
|
||||||
import { useAppDispatch, useAppSelector } from "app/store"
|
import { useAppDispatch, useAppSelector } from "app/store"
|
||||||
import { ActionButton } from "components/ActionButtton"
|
import { ActionButton } from "components/ActionButtton"
|
||||||
|
import { ButtonToolbar } from "components/ButtonToolbar"
|
||||||
import { Loader } from "components/Loader"
|
import { Loader } from "components/Loader"
|
||||||
import { useEffect } from "react"
|
import { useEffect } from "react"
|
||||||
import { TbArrowDown, TbArrowUp, TbEye, TbEyeOff, TbRefresh, TbSearch, TbUser, TbX } from "react-icons/tb"
|
import { TbArrowDown, TbArrowUp, TbEye, TbEyeOff, TbRefresh, TbSearch, TbUser, TbX } from "react-icons/tb"
|
||||||
@@ -38,7 +39,7 @@ export function Header() {
|
|||||||
if (!settings) return <Loader />
|
if (!settings) return <Loader />
|
||||||
return (
|
return (
|
||||||
<Center>
|
<Center>
|
||||||
<Group>
|
<ButtonToolbar>
|
||||||
<ActionButton icon={<TbRefresh size={iconSize} />} label={t`Refresh`} onClick={() => dispatch(reloadEntries())} />
|
<ActionButton icon={<TbRefresh size={iconSize} />} label={t`Refresh`} onClick={() => dispatch(reloadEntries())} />
|
||||||
<MarkAllAsReadButton iconSize={iconSize} />
|
<MarkAllAsReadButton iconSize={iconSize} />
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ export function Header() {
|
|||||||
<HeaderDivider />
|
<HeaderDivider />
|
||||||
|
|
||||||
<ProfileMenu control={<ActionButton icon={<TbUser size={iconSize} />} label={profile?.name} />} />
|
<ProfileMenu control={<ActionButton icon={<TbUser size={iconSize} />} label={profile?.name} />} />
|
||||||
</Group>
|
</ButtonToolbar>
|
||||||
</Center>
|
</Center>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user