mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 08:34:04 +08:00
dark color theme tweaks
This commit is contained in:
@@ -79,8 +79,8 @@ export default function PageHeaderMenu({ readOnly }: PageHeaderMenuProps) {
|
|||||||
|
|
||||||
<Tooltip label={t("Comments")} openDelay={250} withArrow>
|
<Tooltip label={t("Comments")} openDelay={250} withArrow>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="default"
|
variant="subtle"
|
||||||
style={{ border: "none" }}
|
color="dark"
|
||||||
onClick={() => toggleAside("comments")}
|
onClick={() => toggleAside("comments")}
|
||||||
>
|
>
|
||||||
<IconMessage size={20} stroke={2} />
|
<IconMessage size={20} stroke={2} />
|
||||||
@@ -89,8 +89,8 @@ export default function PageHeaderMenu({ readOnly }: PageHeaderMenuProps) {
|
|||||||
|
|
||||||
<Tooltip label={t("Table of contents")} openDelay={250} withArrow>
|
<Tooltip label={t("Table of contents")} openDelay={250} withArrow>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="default"
|
variant="subtle"
|
||||||
style={{ border: "none" }}
|
color="dark"
|
||||||
onClick={() => toggleAside("toc")}
|
onClick={() => toggleAside("toc")}
|
||||||
>
|
>
|
||||||
<IconList size={20} stroke={2} />
|
<IconList size={20} stroke={2} />
|
||||||
@@ -166,7 +166,7 @@ function PageActionMenu({ readOnly }: PageActionMenuProps) {
|
|||||||
arrowPosition="center"
|
arrowPosition="center"
|
||||||
>
|
>
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<ActionIcon variant="default" style={{ border: "none" }}>
|
<ActionIcon variant="subtle" color="dark">
|
||||||
<IconDots size={20} />
|
<IconDots size={20} />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Menu.Target>
|
</Menu.Target>
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ export default function ShareModal({ readOnly }: ShareModalProps) {
|
|||||||
const { isTrial } = useTrial();
|
const { isTrial } = useTrial();
|
||||||
const [workspace] = useAtom(workspaceAtom);
|
const [workspace] = useAtom(workspaceAtom);
|
||||||
const { data: space } = useSpaceQuery(spaceSlug);
|
const { data: space } = useSpaceQuery(spaceSlug);
|
||||||
const workspaceDisabled =
|
const workspaceDisabled = workspace?.settings?.sharing?.disabled === true;
|
||||||
workspace?.settings?.sharing?.disabled === true;
|
|
||||||
const spaceDisabled = space?.settings?.sharing?.disabled === true;
|
const spaceDisabled = space?.settings?.sharing?.disabled === true;
|
||||||
const sharingDisabled = workspaceDisabled || spaceDisabled;
|
const sharingDisabled = workspaceDisabled || spaceDisabled;
|
||||||
const createShareMutation = useCreateShareMutation();
|
const createShareMutation = useCreateShareMutation();
|
||||||
@@ -134,7 +133,6 @@ export default function ShareModal({ readOnly }: ShareModalProps) {
|
|||||||
<Popover width={350} position="bottom" withArrow shadow="md">
|
<Popover width={350} position="bottom" withArrow shadow="md">
|
||||||
<Popover.Target>
|
<Popover.Target>
|
||||||
<Button
|
<Button
|
||||||
style={{ border: "none" }}
|
|
||||||
size="compact-sm"
|
size="compact-sm"
|
||||||
leftSection={
|
leftSection={
|
||||||
<Indicator
|
<Indicator
|
||||||
@@ -146,7 +144,8 @@ export default function ShareModal({ readOnly }: ShareModalProps) {
|
|||||||
<IconWorld size={20} stroke={1.5} />
|
<IconWorld size={20} stroke={1.5} />
|
||||||
</Indicator>
|
</Indicator>
|
||||||
}
|
}
|
||||||
variant="default"
|
color="dark"
|
||||||
|
variant="subtle"
|
||||||
>
|
>
|
||||||
{t("Share")}
|
{t("Share")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -35,12 +35,35 @@ export const theme = createTheme({
|
|||||||
blue,
|
blue,
|
||||||
red,
|
red,
|
||||||
},
|
},
|
||||||
|
/***
|
||||||
|
components: {
|
||||||
|
ActionIcon: ActionIcon.extend({
|
||||||
|
vars: (_theme, props) => {
|
||||||
|
return {
|
||||||
|
root: {
|
||||||
|
...(props.variant === "subtle" &&
|
||||||
|
props.color === "dark" && {
|
||||||
|
"--ai-color": "var(--mantine-color-default-color)",
|
||||||
|
"--ai-hover": "var(--mantine-color-default-hover)",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
***/
|
||||||
});
|
});
|
||||||
|
|
||||||
export const mantineCssResolver: CSSVariablesResolver = (theme) => ({
|
export const mantineCssResolver: CSSVariablesResolver = (theme) => ({
|
||||||
variables: {
|
variables: {
|
||||||
"--input-error-size": theme.fontSizes.sm,
|
"--input-error-size": theme.fontSizes.sm,
|
||||||
},
|
},
|
||||||
light: {},
|
light: {
|
||||||
dark: {},
|
"--mantine-color-dark-light-color": "var(--mantine-color-default-color)",
|
||||||
|
"--mantine-color-dark-light-hover": "var(--mantine-color-gray-light-hover)",
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
"--mantine-color-dark-light-color": "var(--mantine-color-gray-4)",
|
||||||
|
"--mantine-color-dark-light-hover": "var(--mantine-color-default-hover)",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user