diff --git a/ui/src/tiles/TileMenu.tsx b/ui/src/tiles/TileMenu.tsx
index 5a811301..e7e827c3 100644
--- a/ui/src/tiles/TileMenu.tsx
+++ b/ui/src/tiles/TileMenu.tsx
@@ -6,6 +6,7 @@ import { Link } from 'react-router-dom';
import { Chad, chadIsRunning } from '@urbit/api';
import useDocketState from '../state/docket';
import { disableDefault, handleDropdownLink } from '../state/util';
+import { useMedia } from '../logic/useMedia';
export interface TileMenuProps {
desk: string;
@@ -32,25 +33,32 @@ const Item = React.forwardRef(({ children, ...props }, ref) => (
{children}
)) as ItemComponent;
-export const TileMenu = ({ desk, chad, menuColor, lightText, className }: TileMenuProps) => {
+export const TileMenu = ({
+ desk,
+ chad,
+ menuColor,
+ lightText,
+ className,
+}: TileMenuProps) => {
const [open, setOpen] = useState(false);
const toggleDocket = useDocketState((s) => s.toggleDocket);
const menuBg = { backgroundColor: menuColor };
const linkOnSelect = useCallback(handleDropdownLink(setOpen), []);
const active = chadIsRunning(chad);
const suspended = 'suspend' in chad;
+ const isMobile = useMedia('(any-pointer: coarse)');
return (
setOpen(isOpen)}>
queryClient.setQueryData(['apps', name], app)}
>
Menu
@@ -72,23 +83,40 @@ export const TileMenu = ({ desk, chad, menuColor, lightText, className }: TileMe
style={menuBg}
>
- -
+
- e.preventDefault() : linkOnSelect}
+ >
App Info
{active && (
- -
+
- e.preventDefault() : linkOnSelect}
+ >
Suspend App
)}
- {suspended && - toggleDocket(desk)}>Resume App
}
- -
+ {suspended && (
+
- toggleDocket(desk)}>Resume App
+ )}
+ - e.preventDefault() : linkOnSelect}
+ >
Uninstall App
-
+
);