From 41d943a538350eb1d92a5439a5eb3ea666b17170 Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Thu, 23 May 2024 19:05:34 +0200 Subject: [PATCH] refactor: move EmptyScreen/FilteredEmptyScreen to ui package (#7278) * refactor: move EmptyScreen/FilteredEmptyScreen to ui package Fixes #6919 Signed-off-by: Jeff MAURY --- .../src/lib/compose/ComposeDetailsLogs.svelte | 2 +- .../lib/container/ContainerDetailsLogs.svelte | 2 +- .../container/ContainerDetailsTerminal.svelte | 2 +- .../ContainerDetailsTtyTerminal.svelte | 2 +- .../lib/container/ContainerEmptyScreen.svelte | 10 +++++++--- .../src/lib/container/ContainerList.svelte | 3 +-- .../deployments/DeploymentEmptyScreen.svelte | 3 ++- .../src/lib/deployments/DeploymentsList.svelte | 2 +- .../src/lib/extensions/ExtensionDetails.svelte | 3 +-- .../extensions/ExtensionDetailsReadme.svelte | 2 +- .../src/lib/extensions/ExtensionList.svelte | 3 +-- .../src/lib/image/ImageEmptyScreen.svelte | 8 ++++++-- .../renderer/src/lib/image/ImagesList.svelte | 11 +++++++++-- .../image/NoContainerEngineEmptyScreen.svelte | 4 +--- .../IngressRouteEmptyScreen.svelte | 3 ++- .../ingresses-routes/IngressesRoutesList.svelte | 11 +++++++++-- .../lib/pod/KubernetesTerminalBrowser.svelte | 2 +- .../renderer/src/lib/pod/PodDetailsLogs.svelte | 2 +- .../renderer/src/lib/pod/PodEmptyScreen.svelte | 8 ++++++-- packages/renderer/src/lib/pod/PodsList.svelte | 3 +-- ...encesAuthenticationProvidersRendering.svelte | 3 +-- .../PreferencesCliToolsRendering.svelte | 3 ++- ...ncesConnectionCreationOrEditRendering.svelte | 3 +-- .../PreferencesConnectionDetailsLogs.svelte | 2 +- ...referencesKubernetesContextsRendering.svelte | 3 +-- .../PreferencesResourcesRendering.svelte | 3 +-- .../src/lib/service/ServiceEmptyScreen.svelte | 3 ++- .../src/lib/service/ServicesList.svelte | 2 +- .../src/lib/volume/VolumeEmptyScreen.svelte | 8 ++++++-- .../renderer/src/lib/volume/VolumesList.svelte | 11 +++++++++-- packages/ui/package.json | 8 ++++++++ packages/ui/src/lib/index.ts | 4 ++++ .../src/lib/screen}/EmptyScreen.spec.ts | 6 +++--- .../ui => ui/src/lib/screen}/EmptyScreen.svelte | 17 +++++++++++------ .../src/lib/screen}/FilteredEmptyScreen.spec.ts | 9 ++++----- .../src/lib/screen}/FilteredEmptyScreen.svelte | 9 +++++---- 36 files changed, 114 insertions(+), 66 deletions(-) rename packages/{renderer/src/lib/ui => ui/src/lib/screen}/EmptyScreen.spec.ts (86%) rename packages/{renderer/src/lib/ui => ui/src/lib/screen}/EmptyScreen.svelte (79%) rename packages/{renderer/src/lib/ui => ui/src/lib/screen}/FilteredEmptyScreen.spec.ts (89%) rename packages/{renderer/src/lib/ui => ui/src/lib/screen}/FilteredEmptyScreen.svelte (69%) diff --git a/packages/renderer/src/lib/compose/ComposeDetailsLogs.svelte b/packages/renderer/src/lib/compose/ComposeDetailsLogs.svelte index 9cd5b8b38d662..bec6385dfcff2 100644 --- a/packages/renderer/src/lib/compose/ComposeDetailsLogs.svelte +++ b/packages/renderer/src/lib/compose/ComposeDetailsLogs.svelte @@ -1,6 +1,7 @@ - + diff --git a/packages/renderer/src/lib/container/ContainerList.svelte b/packages/renderer/src/lib/container/ContainerList.svelte index 5229d87af1a18..e743cde9e80d6 100644 --- a/packages/renderer/src/lib/container/ContainerList.svelte +++ b/packages/renderer/src/lib/container/ContainerList.svelte @@ -1,6 +1,6 @@ -import { Button } from '@podman-desktop/ui-svelte'; +import { Button, EmptyScreen } from '@podman-desktop/ui-svelte'; import { derived, type Readable } from 'svelte/store'; import extensionIcon from '/@/lib/images/ExtensionIcon.svelte'; @@ -9,7 +9,6 @@ import { catalogExtensionInfos } from '/@/stores/catalog-extensions'; import FeaturedExtensionDownload from '../featured/FeaturedExtensionDownload.svelte'; import DetailsPage from '../ui/DetailsPage.svelte'; -import EmptyScreen from '../ui/EmptyScreen.svelte'; import ExtensionStatus from '../ui/ExtensionStatus.svelte'; import type { ExtensionDetailsUI } from './extension-details-ui'; import ExtensionBadge from './ExtensionBadge.svelte'; diff --git a/packages/renderer/src/lib/extensions/ExtensionDetailsReadme.svelte b/packages/renderer/src/lib/extensions/ExtensionDetailsReadme.svelte index ac5fdbefba28d..e1c8583565c38 100644 --- a/packages/renderer/src/lib/extensions/ExtensionDetailsReadme.svelte +++ b/packages/renderer/src/lib/extensions/ExtensionDetailsReadme.svelte @@ -1,9 +1,9 @@ + commandline="{commandLine}" + on:click="{() => window.clipboardWriteText(commandLine)}" /> diff --git a/packages/renderer/src/lib/image/ImagesList.svelte b/packages/renderer/src/lib/image/ImagesList.svelte index c51eb941cbf96..80d17802d5391 100644 --- a/packages/renderer/src/lib/image/ImagesList.svelte +++ b/packages/renderer/src/lib/image/ImagesList.svelte @@ -1,6 +1,14 @@ import { faTrash } from '@fortawesome/free-solid-svg-icons'; -import { Button, NavPage, Table, TableColumn, TableRow, TableSimpleColumn } from '@podman-desktop/ui-svelte'; +import { + Button, + FilteredEmptyScreen, + NavPage, + Table, + TableColumn, + TableRow, + TableSimpleColumn, +} from '@podman-desktop/ui-svelte'; import { onDestroy, onMount } from 'svelte'; import type { Unsubscriber } from 'svelte/store'; @@ -15,7 +23,6 @@ import type { V1Route } from '/@api/openshift-types'; import IngressRouteIcon from '../images/IngressRouteIcon.svelte'; import KubeApplyYamlButton from '../kube/KubeApplyYAMLButton.svelte'; -import FilteredEmptyScreen from '../ui/FilteredEmptyScreen.svelte'; import { IngressRouteUtils } from './ingress-route-utils'; import IngressRouteColumnActions from './IngressRouteColumnActions.svelte'; import IngressRouteColumnBackend from './IngressRouteColumnBackend.svelte'; diff --git a/packages/renderer/src/lib/pod/KubernetesTerminalBrowser.svelte b/packages/renderer/src/lib/pod/KubernetesTerminalBrowser.svelte index 8c812538740a1..9ff916c450a6b 100644 --- a/packages/renderer/src/lib/pod/KubernetesTerminalBrowser.svelte +++ b/packages/renderer/src/lib/pod/KubernetesTerminalBrowser.svelte @@ -1,7 +1,7 @@ + commandline="{commandLine}" + on:click="{() => window.clipboardWriteText(commandLine)}" /> diff --git a/packages/renderer/src/lib/pod/PodsList.svelte b/packages/renderer/src/lib/pod/PodsList.svelte index 7859a684e36f8..9912c3d50cebc 100644 --- a/packages/renderer/src/lib/pod/PodsList.svelte +++ b/packages/renderer/src/lib/pod/PodsList.svelte @@ -1,6 +1,6 @@ diff --git a/packages/renderer/src/lib/preferences/PreferencesCliToolsRendering.svelte b/packages/renderer/src/lib/preferences/PreferencesCliToolsRendering.svelte index f7e20b4904ce2..0a872aa2e1665 100644 --- a/packages/renderer/src/lib/preferences/PreferencesCliToolsRendering.svelte +++ b/packages/renderer/src/lib/preferences/PreferencesCliToolsRendering.svelte @@ -1,6 +1,7 @@ diff --git a/packages/renderer/src/lib/service/ServicesList.svelte b/packages/renderer/src/lib/service/ServicesList.svelte index 589bd15da76b3..6b5f769704c69 100644 --- a/packages/renderer/src/lib/service/ServicesList.svelte +++ b/packages/renderer/src/lib/service/ServicesList.svelte @@ -2,6 +2,7 @@ import { faTrash } from '@fortawesome/free-solid-svg-icons'; import { Button, + FilteredEmptyScreen, NavPage, Table, TableColumn, @@ -17,7 +18,6 @@ import { kubernetesCurrentContextServicesFiltered, serviceSearchPattern } from ' import ServiceIcon from '../images/ServiceIcon.svelte'; import KubeApplyYamlButton from '../kube/KubeApplyYAMLButton.svelte'; -import FilteredEmptyScreen from '../ui/FilteredEmptyScreen.svelte'; import { ServiceUtils } from './service-utils'; import ServiceColumnActions from './ServiceColumnActions.svelte'; import ServiceColumnName from './ServiceColumnName.svelte'; diff --git a/packages/renderer/src/lib/volume/VolumeEmptyScreen.svelte b/packages/renderer/src/lib/volume/VolumeEmptyScreen.svelte index e72025e7ee7d7..2e8dfa473114e 100644 --- a/packages/renderer/src/lib/volume/VolumeEmptyScreen.svelte +++ b/packages/renderer/src/lib/volume/VolumeEmptyScreen.svelte @@ -1,10 +1,14 @@ + commandline="{commandLine}" + on:click="{() => window.clipboardWriteText(commandLine)}" /> diff --git a/packages/renderer/src/lib/volume/VolumesList.svelte b/packages/renderer/src/lib/volume/VolumesList.svelte index c8d01007bef62..6043134c97256 100644 --- a/packages/renderer/src/lib/volume/VolumesList.svelte +++ b/packages/renderer/src/lib/volume/VolumesList.svelte @@ -1,6 +1,14 @@