Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UI dependencies & Dockerfile syntax #69

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ COPY host/hostname.sh linux/hostname.sh
COPY host/host-tailscale darwin/host-tailscale
COPY host/host-tailscale.cmd windows/host-tailscale.cmd
COPY host/host-tailscale.sh linux/host-tailscale.sh
ENV TS_HOST_ENV dde
CMD /app/tailscaled --state=/var/lib/tailscale/tailscaled.state --tun=userspace-networking
ENV TS_HOST_ENV=dde
CMD ["/app/tailscaled", "--state=/var/lib/tailscale/tailscaled.state", "--tun=userspace-networking"]
1 change: 1 addition & 0 deletions ui/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
31 changes: 16 additions & 15 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'"
},
"dependencies": {
"@docker/extension-api-client": "^0.2.2",
"@radix-ui/react-avatar": "^0.1.3",
"@radix-ui/react-dialog": "^0.1.5",
"@radix-ui/react-dropdown-menu": "^0.1.4",
"@radix-ui/react-tooltip": "^0.1.6",
"classnames": "^2.3.1",
"mitt": "^3.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"@docker/extension-api-client": "^0.3.4",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-tooltip": "^1.1.3",
"classnames": "^2.5.1",
"mitt": "^3.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zustand": "^3.6.8"
},
"devDependencies": {
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"prettier": "^2.5.1",
"react-scripts": "^5.0.0",
"tailwindcss": "^3.1.6",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"prettier": "^3.3.3",
"react-scripts": "^5.0.1",
"tailwindcss": "^3.4.14",
"typescript": "^4.5.4"
},
"eslintConfig": {
Expand All @@ -40,5 +40,6 @@
"semi": false,
"printWidth": 80,
"trailingComma": "all"
}
},
"packageManager": "[email protected]"
}
10 changes: 5 additions & 5 deletions ui/src/components/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
asChild?: boolean
trigger: React.ReactNode
} & Pick<
MenuPrimitive.MenuContentProps,
MenuPrimitive.DropdownMenuContentProps,
"side" | "sideOffset" | "align" | "alignOffset" | "onCloseAutoFocus"
> &
Pick<MenuPrimitive.DropdownMenuProps, "open" | "onOpenChange">
Expand Down Expand Up @@ -77,7 +77,7 @@ type CommonMenuItemProps = {
hidden?: boolean
}

type DropdownMenuGroupProps = CommonMenuItemProps & MenuPrimitive.MenuGroupProps
type DropdownMenuGroupProps = CommonMenuItemProps & MenuPrimitive.DropdownMenuGroupProps

function DropdownMenuGroup(props: DropdownMenuGroupProps) {
const { className, ...rest } = props
Expand All @@ -90,7 +90,7 @@ function DropdownMenuGroup(props: DropdownMenuGroupProps) {
type DropdownMenuItemProps = {
intent?: "danger"
} & CommonMenuItemProps &
Omit<MenuPrimitive.MenuItemProps, "onClick">
Omit<MenuPrimitive.DropdownMenuItemProps, "onClick">

function DropdownMenuItem(props: DropdownMenuItemProps) {
const { className, disabled, intent, hidden, ...rest } = props
Expand All @@ -114,7 +114,7 @@ function DropdownMenuItem(props: DropdownMenuItemProps) {
type DropdownMenuLinkProps = {
className?: string
href: string
} & Omit<MenuPrimitive.MenuItemProps, "onClick" | "onSelect" | "asChild">
} & Omit<MenuPrimitive.DropdownMenuItemProps, "onClick" | "onSelect" | "asChild">

function DropdownMenuLink(props: DropdownMenuLinkProps) {
const { className, children, disabled, href, ...rest } = props
Expand Down Expand Up @@ -157,7 +157,7 @@ function DropdownMenuLink(props: DropdownMenuLinkProps) {
}

type DropdownSeparatorProps = Omit<CommonMenuItemProps, "disabled"> &
MenuPrimitive.MenuSeparatorProps
MenuPrimitive.DropdownMenuSeparatorProps

function DropdownSeparator(props: DropdownSeparatorProps) {
const { className, hidden, ...rest } = props
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback } from "react"
import React, { MouseEventHandler, useCallback } from "react"
import * as Primitive from "@radix-ui/react-tooltip"

type Props = {
Expand All @@ -22,8 +22,8 @@ export default function Tooltip(props: Props) {
sideOffset,
} = props

const preventDefault = useCallback((e) => e.preventDefault(), [])
const handler = closeOnClick ? undefined : preventDefault
const preventDefault = useCallback((e: any) => e.preventDefault(), [])
const handler: MouseEventHandler<HTMLButtonElement> | undefined = closeOnClick ? undefined : preventDefault

return (
<Primitive.Root delayDuration={200} open={open} onOpenChange={onOpenChange}>
Expand Down
Loading