mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
add diff to mobile
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
|
Badge,
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
Group,
|
Group,
|
||||||
@@ -191,26 +192,39 @@ 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}>
|
||||||
<Select
|
<Group gap="sm" wrap="nowrap">
|
||||||
data={selectData}
|
<Select
|
||||||
value={activeHistoryId}
|
data={selectData}
|
||||||
onChange={handleSelectVersion}
|
value={activeHistoryId}
|
||||||
placeholder={t("Select version")}
|
onChange={handleSelectVersion}
|
||||||
checkIconPosition="right"
|
placeholder={t("Select version")}
|
||||||
maxDropdownHeight={300}
|
checkIconPosition="right"
|
||||||
renderOption={({ option, checked }) => (
|
maxDropdownHeight={300}
|
||||||
<Group justify="space-between" wrap="nowrap" w="100%">
|
renderOption={({ option, checked }) => (
|
||||||
<div>
|
<Group justify="space-between" wrap="nowrap" w="100%">
|
||||||
<Text size="sm">{option.label}</Text>
|
<div>
|
||||||
<Text size="xs" c="dimmed">
|
<Text size="sm">{option.label}</Text>
|
||||||
{(option as { userName?: string }).userName}
|
<Text size="xs" c="dimmed">
|
||||||
</Text>
|
{(option as { userName?: string }).userName}
|
||||||
</div>
|
</Text>
|
||||||
{checked && <IconCheck size={16} />}
|
</div>
|
||||||
|
{checked && <IconCheck size={16} />}
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
comboboxProps={{ withinPortal: false }}
|
||||||
|
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>
|
||||||
)}
|
)}
|
||||||
comboboxProps={{ withinPortal: false }}
|
</Group>
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<ScrollArea
|
<ScrollArea
|
||||||
|
|||||||
Reference in New Issue
Block a user