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 {
|
||||
ActionIcon,
|
||||
Badge,
|
||||
Box,
|
||||
Button,
|
||||
Group,
|
||||
@@ -191,26 +192,39 @@ export default function HistoryModalMobile({ pageId, pageTitle }: Props) {
|
||||
return (
|
||||
<Box className={classes.container}>
|
||||
<Box className={classes.selectorWrapper}>
|
||||
<Select
|
||||
data={selectData}
|
||||
value={activeHistoryId}
|
||||
onChange={handleSelectVersion}
|
||||
placeholder={t("Select version")}
|
||||
checkIconPosition="right"
|
||||
maxDropdownHeight={300}
|
||||
renderOption={({ option, checked }) => (
|
||||
<Group justify="space-between" wrap="nowrap" w="100%">
|
||||
<div>
|
||||
<Text size="sm">{option.label}</Text>
|
||||
<Text size="xs" c="dimmed">
|
||||
{(option as { userName?: string }).userName}
|
||||
</Text>
|
||||
</div>
|
||||
{checked && <IconCheck size={16} />}
|
||||
<Group gap="sm" wrap="nowrap">
|
||||
<Select
|
||||
data={selectData}
|
||||
value={activeHistoryId}
|
||||
onChange={handleSelectVersion}
|
||||
placeholder={t("Select version")}
|
||||
checkIconPosition="right"
|
||||
maxDropdownHeight={300}
|
||||
renderOption={({ option, checked }) => (
|
||||
<Group justify="space-between" wrap="nowrap" w="100%">
|
||||
<div>
|
||||
<Text size="sm">{option.label}</Text>
|
||||
<Text size="xs" c="dimmed">
|
||||
{(option as { userName?: string }).userName}
|
||||
</Text>
|
||||
</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>
|
||||
)}
|
||||
comboboxProps={{ withinPortal: false }}
|
||||
/>
|
||||
</Group>
|
||||
</Box>
|
||||
|
||||
<ScrollArea
|
||||
|
||||
Reference in New Issue
Block a user