remove counter

This commit is contained in:
Philipinho
2026-02-01 19:05:58 +00:00
parent f2bc0b5049
commit ba9e58ede9
2 changed files with 22 additions and 47 deletions
@@ -1,6 +1,5 @@
import { import {
ActionIcon, ActionIcon,
Badge,
Group, Group,
Paper, Paper,
ScrollArea, ScrollArea,
@@ -76,16 +75,6 @@ export default function HistoryModalBody({ pageId }: Props) {
}} }}
> >
<Group gap="md"> <Group gap="md">
{diffCounts && (
<Group gap="xs">
<Badge variant="filled" color="green" size="sm">
+{diffCounts.added}
</Badge>
<Badge variant="filled" color="red" size="sm">
-{diffCounts.deleted}
</Badge>
</Group>
)}
<Switch <Switch
label={t("Highlight changes")} label={t("Highlight changes")}
checked={highlightChanges} checked={highlightChanges}
@@ -1,6 +1,5 @@
import { import {
ActionIcon, ActionIcon,
Badge,
Box, Box,
Button, Button,
Group, Group,
@@ -119,43 +118,30 @@ export default function HistoryModalMobile({ pageId, pageTitle }: Props) {
return ( return (
<Box className={classes.container}> <Box className={classes.container}>
<Box className={classes.selectorWrapper}> <Box className={classes.selectorWrapper}>
<Group gap="sm" wrap="nowrap"> <Select
<Select data={selectData}
data={selectData} value={activeHistoryId}
value={activeHistoryId} onChange={handleSelectVersion}
onChange={handleSelectVersion} placeholder={t("Select version")}
placeholder={t("Select version")} checkIconPosition="right"
checkIconPosition="right" maxDropdownHeight={300}
maxDropdownHeight={300} renderOption={({ option, checked }) => (
renderOption={({ option, checked }) => ( <Group justify="space-between" wrap="nowrap" w="100%">
<Group justify="space-between" wrap="nowrap" w="100%"> <div>
<div> <Text size="sm">{option.label}</Text>
<Text size="sm">{option.label}</Text> <Text size="xs" c="dimmed">
<Text size="xs" c="dimmed"> {(option as { userName?: string }).userName}
{(option as { userName?: string }).userName} </Text>
</Text> </div>
</div> {checked && <IconCheck size={16} />}
{checked && <IconCheck size={16} />}
</Group>
)}
comboboxProps={{ withinPortal: false }}
scrollAreaProps={{
viewportRef: dropdownViewportRef,
onScrollPositionChange: handleDropdownScroll,
}}
style={{ flex: 1 }}
/>
{diffCounts && (
<Group gap={4} wrap="nowrap">
<Badge variant="filled" color="green" size="sm">
+{diffCounts.added}
</Badge>
<Badge variant="filled" color="red" size="sm">
-{diffCounts.deleted}
</Badge>
</Group> </Group>
)} )}
</Group> comboboxProps={{ withinPortal: false }}
scrollAreaProps={{
viewportRef: dropdownViewportRef,
onScrollPositionChange: handleDropdownScroll,
}}
/>
</Box> </Box>
<ScrollArea <ScrollArea