fix(app): improve responsive styles (#2537)
This commit is contained in:
@@ -18,7 +18,7 @@ import classes from "./app.module.css";
|
|||||||
import { PingDot } from "./ping/ping-dot";
|
import { PingDot } from "./ping/ping-dot";
|
||||||
import { PingIndicator } from "./ping/ping-indicator";
|
import { PingIndicator } from "./ping/ping-indicator";
|
||||||
|
|
||||||
export default function AppWidget({ options, isEditMode }: WidgetComponentProps<"app">) {
|
export default function AppWidget({ options, isEditMode, height, width }: WidgetComponentProps<"app">) {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
const settings = useSettings();
|
const settings = useSettings();
|
||||||
const board = useRequiredBoard();
|
const board = useRequiredBoard();
|
||||||
@@ -56,6 +56,8 @@ export default function AppWidget({ options, isEditMode }: WidgetComponentProps<
|
|||||||
[app, options.openInNewTab],
|
[app, options.openInNewTab],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const tinyText = height < 100 || width < 100;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppLink
|
<AppLink
|
||||||
href={app.href ?? undefined}
|
href={app.href ?? undefined}
|
||||||
@@ -78,7 +80,7 @@ export default function AppWidget({ options, isEditMode }: WidgetComponentProps<
|
|||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
{options.showTitle && (
|
{options.showTitle && (
|
||||||
<Text className="app-title" fw={700} ta="center">
|
<Text className="app-title" fw={700} size={tinyText ? "8px" : "sm"} ta="center">
|
||||||
{app.name}
|
{app.name}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -15,17 +15,17 @@ export const PingDot = ({ color, tooltip, ...props }: PingDotProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box bottom={10} right={10} pos="absolute" display={"flex"}>
|
<Box bottom={10} right={10} pos="absolute" display={"flex"}>
|
||||||
<Tooltip label={tooltip}>
|
<Tooltip multiline label={tooltip} maw={350}>
|
||||||
{pingIconsEnabled ? (
|
{pingIconsEnabled ? (
|
||||||
<props.icon style={{ width: 20, height: 20 }} strokeWidth={5} color={color} />
|
<props.icon style={{ width: 12, height: 12 }} strokeWidth={4} color={color} />
|
||||||
) : (
|
) : (
|
||||||
<Box
|
<Box
|
||||||
bg={color}
|
bg={color}
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "100%",
|
borderRadius: "100%",
|
||||||
}}
|
}}
|
||||||
w={16}
|
w={10}
|
||||||
h={16}
|
h={10}
|
||||||
></Box>
|
></Box>
|
||||||
)}
|
)}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
Reference in New Issue
Block a user