From 0c5842b78f7d8b93d3b7897c1900afa25bbdf0b1 Mon Sep 17 00:00:00 2001 From: california Date: Thu, 13 Feb 2025 20:45:28 -0800 Subject: [PATCH] move copy btn to top --- src/components/RouteActions.tsx | 57 +++++++++------------------------ 1 file changed, 15 insertions(+), 42 deletions(-) diff --git a/src/components/RouteActions.tsx b/src/components/RouteActions.tsx index 205c2454..6ac733ec 100644 --- a/src/components/RouteActions.tsx +++ b/src/components/RouteActions.tsx @@ -1,8 +1,6 @@ import { createSignal, Show, type VoidComponent, createEffect } from 'solid-js' -import Button from '~/components/material/Button' import Icon from '~/components/material/Icon' import { setRoutePublic, setRoutePreserved } from '~/api/route' -import { USERADMIN_URL } from '~/api/config' interface RouteActionsProps { routeName: string @@ -38,22 +36,6 @@ const ToggleButton: VoidComponent<{ ) -const ActionButton: VoidComponent<{ - onClick: () => void - icon: string - label: string - iconClass?: string -}> = (props) => ( - -) - const RouteActions: VoidComponent = (props) => { const [isPreservedLocal, setIsPreservedLocal] = createSignal(props.initialPreserved) const [isPublicLocal, setIsPublicLocal] = createSignal(props.initialPublic) @@ -98,19 +80,24 @@ const RouteActions: VoidComponent = (props) => { } } - const openInUseradmin = () => { - const url = `${USERADMIN_URL}?${new URLSearchParams({ onebox: props.routeName }).toString()}` - window.open(url, '_blank')?.focus() - } - return ( -
+
-
Route ID:
-
{currentRouteId()}
+

Route ID:

+
@@ -120,7 +107,7 @@ const RouteActions: VoidComponent = (props) => {
-
+
isPreservedLocal()} @@ -132,20 +119,6 @@ const RouteActions: VoidComponent = (props) => { onToggle={() => void toggleRoute('public')} />
- -
- void copyCurrentRouteId()} - icon={copied() ? 'check' : 'file_copy'} - label={copied() ? 'Copied!' : 'Copy \nRoute ID'} - iconClass={copied() ? 'text-green-300' : ''} - /> - -
) }