From 1a1ddf34097ff5b174d6e4e4bb438b1240109f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeremy=20M=C3=B6glich?= Date: Tue, 17 Jan 2023 02:32:14 +0100 Subject: [PATCH] Desktop - Add more tooltips (#519) --- .../components/explorer/ExplorerTopBar.tsx | 86 +++++++++++-------- .../src/components/explorer/FileItem.tsx | 1 + .../src/components/jobs/JobManager.tsx | 20 +++-- .../src/components/layout/Sidebar.tsx | 13 ++- .../components/location/LocationListItem.tsx | 9 +- .../screens/settings/library/TagsSettings.tsx | 5 +- .../settings/node/LibrariesSettings.tsx | 16 ++-- 7 files changed, 96 insertions(+), 54 deletions(-) diff --git a/packages/interface/src/components/explorer/ExplorerTopBar.tsx b/packages/interface/src/components/explorer/ExplorerTopBar.tsx index 675132b39..acc12291a 100644 --- a/packages/interface/src/components/explorer/ExplorerTopBar.tsx +++ b/packages/interface/src/components/explorer/ExplorerTopBar.tsx @@ -265,20 +265,22 @@ export const TopBar: React.FC = (props) => {
- - - - - // - } - > -
- -
-
+ + + + + + // + } + > +
+ +
+ + (getExplorerStore().tagAssignMode = !store.tagAssignMode)} @@ -303,31 +305,39 @@ export const TopBar: React.FC = (props) => {
- - - - - // - } + + + + + + // + } + > +
+ +
+
+ + + -
- -
- - (getExplorerStore().showInspector = !store.showInspector)} - className="my-2" - > - {store.showInspector ? ( - - ) : ( - - )} - + (getExplorerStore().showInspector = !store.showInspector)} + className="my-2" + > + {store.showInspector ? ( + + ) : ( + + )} + +
{/*
@@ -152,16 +156,22 @@ function Job({ job }: { job: JobReport }) {
{job.status === 'Running' && ( )} {job.status === 'Failed' && ( )}
diff --git a/packages/interface/src/components/layout/Sidebar.tsx b/packages/interface/src/components/layout/Sidebar.tsx index fdde60ea5..3d31bd7dd 100644 --- a/packages/interface/src/components/layout/Sidebar.tsx +++ b/packages/interface/src/components/layout/Sidebar.tsx @@ -25,15 +25,16 @@ import clsx from 'clsx'; import { CheckCircle, CirclesFour, Gear, Lock, Planet, Plus, ShareNetwork } from 'phosphor-react'; import React, { PropsWithChildren, useState } from 'react'; import { NavLink, NavLinkProps } from 'react-router-dom'; - import { useOperatingSystem } from '~/hooks/useOperatingSystem'; import { usePlatform } from '~/util/Platform'; + import AddLocationDialog from '../dialog/AddLocationDialog'; import CreateLibraryDialog from '../dialog/CreateLibraryDialog'; import { Folder } from '../icons/Folder'; import { JobsManager } from '../jobs/JobManager'; import { MacTrafficLights } from '../os/TrafficLights'; import { InputContainer } from '../primitive/InputContainer'; +import { Tooltip } from '../tooltip/Tooltip'; const SidebarBody = tw.div`flex relative flex-col flex-grow-0 flex-shrink-0 w-44 min-h-full border-r border-sidebar-divider bg-sidebar`; @@ -123,7 +124,9 @@ export function Sidebar() { variant="outline" className="text-ink-faint ring-offset-sidebar" > - + + + - {library && } + {library && ( + + + + )} } > diff --git a/packages/interface/src/components/location/LocationListItem.tsx b/packages/interface/src/components/location/LocationListItem.tsx index 2030cdc3c..58da9b121 100644 --- a/packages/interface/src/components/location/LocationListItem.tsx +++ b/packages/interface/src/components/location/LocationListItem.tsx @@ -6,6 +6,7 @@ import { Repeat, Trash } from 'phosphor-react'; import { useState } from 'react'; import { Folder } from '../icons/Folder'; +import { Tooltip } from '../tooltip/Tooltip'; import { useZodForm, z } from '@sd/ui/src/forms'; @@ -70,7 +71,9 @@ export default function LocationListItem({ location }: LocationListItemProps) { ctaLabel="Delete" trigger={ } /> @@ -82,7 +85,9 @@ export default function LocationListItem({ location }: LocationListItemProps) { locRescan(location.id); }} > - + + + {/* } /> diff --git a/packages/interface/src/screens/settings/node/LibrariesSettings.tsx b/packages/interface/src/screens/settings/node/LibrariesSettings.tsx index a9eb07e7a..c35d67ff6 100644 --- a/packages/interface/src/screens/settings/node/LibrariesSettings.tsx +++ b/packages/interface/src/screens/settings/node/LibrariesSettings.tsx @@ -3,11 +3,11 @@ import { LibraryConfigWrapped } from '@sd/client'; import { Button, ButtonLink, Card, tw } from '@sd/ui'; import { Database, DotsSixVertical, Link, Pen, Pencil, Trash } from 'phosphor-react'; import { useState } from 'react'; - import CreateLibraryDialog from '~/components/dialog/CreateLibraryDialog'; import DeleteLibraryDialog from '~/components/dialog/DeleteLibraryDialog'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; +import { Tooltip } from '~/components/tooltip/Tooltip'; const Pill = tw.span`px-1.5 ml-2 py-[2px] rounded text-xs font-medium bg-accent`; @@ -31,15 +31,21 @@ function LibraryListItem(props: { library: LibraryConfigWrapped; current: boolea

{props.library.uuid}

- - + + +