Skip to content

Commit

Permalink
chore: adopt Button UI component (#1174)
Browse files Browse the repository at this point in the history
Fixes #962

Signed-off-by: Jeff MAURY <[email protected]>
  • Loading branch information
jeffmaury authored Jun 6, 2024
1 parent 2fb66df commit ee78fb4
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 162 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/lib/RecipeDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { router } from 'tinro';
import { applicationStates } from '../stores/application-states';
import type { ApplicationState } from '@shared/src/models/IApplicationState';
import ApplicationActions from './ApplicationActions.svelte';
import Button from './button/Button.svelte';
import VSCodeIcon from '/@/lib/images/VSCodeIcon.svelte';
import { localRepositories } from '../stores/localRepositories';
import { findLocalRepositoryByRecipeId } from '/@/utils/localRepositoriesUtils';
Expand All @@ -21,6 +20,7 @@ import StatusIcon from '/@/lib/StatusIcon.svelte';
import type { ModelInfo } from '@shared/src/models/IModelInfo';
import { getApplicationStatus, getApplicationStatusText } from '../pages/applications';
import Spinner from './button/Spinner.svelte';
import { Button } from '@podman-desktop/ui-svelte';
export let recipeId: string;
export let modelId: string;
Expand Down
38 changes: 0 additions & 38 deletions packages/frontend/src/lib/button/Button.spec.ts

This file was deleted.

85 changes: 0 additions & 85 deletions packages/frontend/src/lib/button/Button.svelte

This file was deleted.

27 changes: 0 additions & 27 deletions packages/frontend/src/lib/button/Button.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import Fa from 'svelte-fa';
import { faTriangleExclamation } from '@fortawesome/free-solid-svg-icons';
import Button from '../button/Button.svelte';
import { filesize } from 'filesize';
import { studioClient } from '/@/utils/client';
import type { ContainerConnectionInfo } from '@shared/src/models/IContainerConnectionInfo';
import { Button } from '@podman-desktop/ui-svelte';
export let connectionInfo: ContainerConnectionInfo;
type BannerBackgroundColor = 'light' | 'dark';
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/CreateService.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import NavPage from '/@/lib/NavPage.svelte';
import Button from '/@/lib/button/Button.svelte';
import { faExclamationCircle, faLocationArrow, faPlus, faPlusCircle } from '@fortawesome/free-solid-svg-icons';
import { modelsInfo } from '/@/stores/modelsInfo';
import type { ModelInfo } from '@shared/src/models/IModelInfo';
Expand All @@ -17,6 +16,7 @@ import { inferenceServers } from '/@/stores/inferenceServers';
import ContainerConnectionStatusInfo from '../lib/notification/ContainerConnectionStatusInfo.svelte';
import type { ContainerConnectionInfo } from '@shared/src/models/IContainerConnectionInfo';
import { checkContainerConnectionStatus } from '../utils/connectionUtils';
import { Button } from '@podman-desktop/ui-svelte';
// List of the models available locally
let localModels: ModelInfo[];
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/Dashboard.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import NavPage from '/@/lib/NavPage.svelte';
import { router } from 'tinro';
import Button from '/@/lib/button/Button.svelte';
import { faGithub } from '@fortawesome/free-brands-svg-icons';
import { studioClient } from '/@/utils/client';
import DashboardBanner from '/@/lib/images/DashboardBanner.svelte';
import { Button } from '@podman-desktop/ui-svelte';
const openRecipesCatalog = () => {
router.goto('/recipes');
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/ImportModels.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { faMinusCircle, faPlusCircle, faUpload } from '@fortawesome/free-solid-s
import { router } from 'tinro';
import { studioClient } from '../utils/client';
import { Uri } from '@shared/src/uri/Uri';
import Button from '../lib/button/Button.svelte';
import ErrorMessage from '../lib/ErrorMessage.svelte';
import NavPage from '../lib/NavPage.svelte';
import type { LocalModelImportInfo } from '@shared/src/models/ILocalModelInfo';
import { Button } from '@podman-desktop/ui-svelte';
let modelsToImport: LocalModelImportInfo[] = [];
let importError: string = '';
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/InferenceServerDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import type { LanguageVariant } from 'postman-code-generators';
import { studioClient } from '/@/utils/client';
import { onMount } from 'svelte';
import { router } from 'tinro';
import Button from '/@/lib/button/Button.svelte';
import Badge from '/@/lib/Badge.svelte';
import { Button } from '@podman-desktop/ui-svelte';
export let containerId: string | undefined = undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/InferenceServers.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { inferenceServers } from '/@/stores/inferenceServers';
import ServiceStatus from '/@/lib/table/service/ServiceStatus.svelte';
import ServiceAction from '/@/lib/table/service/ServiceAction.svelte';
import ServiceColumnModelName from '/@/lib/table/service/ServiceColumnModelName.svelte';
import Button from '/@/lib/button/Button.svelte';
import { faTrash } from '@fortawesome/free-solid-svg-icons';
import { studioClient } from '/@/utils/client';
import { router } from 'tinro';
import { onMount } from 'svelte';
import { Button } from '@podman-desktop/ui-svelte';
const columns: Column<InferenceServer>[] = [
new Column<InferenceServer>('Status', { width: '70px', renderer: ServiceStatus, align: 'center' }),
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/Models.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { Tab } from '@podman-desktop/ui-svelte';
import Route from '/@/Route.svelte';
import { tasks } from '/@/stores/tasks';
import ModelColumnIcon from '../lib/table/model/ModelColumnIcon.svelte';
import Button from '../lib/button/Button.svelte';
import { router } from 'tinro';
import { Button } from '@podman-desktop/ui-svelte';
const columns: Column<ModelInfo>[] = [
new Column<ModelInfo>('', { width: '40px', renderer: ModelColumnIcon }),
Expand Down
3 changes: 1 addition & 2 deletions packages/frontend/src/pages/Playground.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { studioClient } from '/@/utils/client';
import { isAssistantChat, isPendingChat, isUserChat, isSystemPrompt } from '@shared/src/models/IPlaygroundMessage';
import NavPage from '../lib/NavPage.svelte';
import { catalog } from '../stores/catalog';
import Button from '../lib/button/Button.svelte';
import { afterUpdate } from 'svelte';
import ContentDetailsLayout from '../lib/ContentDetailsLayout.svelte';
import ContainerIcon from '/@/lib/images/ContainerIcon.svelte';
Expand All @@ -15,7 +14,7 @@ import ChatMessage from '../lib/conversation/ChatMessage.svelte';
import SystemPromptBanner from '/@/lib/conversation/SystemPromptBanner.svelte';
import { inferenceServers } from '/@/stores/inferenceServers';
import { faCircleInfo, faMicrochip, faPaperPlane } from '@fortawesome/free-solid-svg-icons';
import { Tooltip } from '@podman-desktop/ui-svelte';
import { Button, Tooltip } from '@podman-desktop/ui-svelte';
import StatusIcon from '../lib/StatusIcon.svelte';
import Badge from '../lib/Badge.svelte';
import { router } from 'tinro';
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/PlaygroundCreate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import NavPage from '../lib/NavPage.svelte';
import type { ModelInfo } from '@shared/src/models/IModelInfo';
import { modelsInfo } from '/@/stores/modelsInfo';
import Fa from 'svelte-fa';
import Button from '../lib/button/Button.svelte';
import { studioClient } from '../utils/client';
import { router } from 'tinro';
import { onDestroy, onMount } from 'svelte';
Expand All @@ -14,6 +13,7 @@ import { tasks } from '../stores/tasks';
import { filterByLabel } from '../utils/taskUtils';
import type { Unsubscriber } from 'svelte/store';
import ErrorMessage from '../lib/ErrorMessage.svelte';
import { Button } from '@podman-desktop/ui-svelte';
let localModels: ModelInfo[];
$: localModels = $modelsInfo.filter(model => model.file);
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/Playgrounds.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import { router } from 'tinro';
import NavPage from '../lib/NavPage.svelte';
import Button from '../lib/button/Button.svelte';
import Table from '../lib/table/Table.svelte';
import PlaygroundColumnModel from '../lib/table/playground/PlaygroundColumnModel.svelte';
import PlaygroundColumnName from '../lib/table/playground/PlaygroundColumnName.svelte';
Expand All @@ -10,6 +9,7 @@ import type { PlaygroundV2 } from '@shared/src/models/IPlaygroundV2';
import ConversationColumnAction from '/@/lib/table/playground/ConversationColumnAction.svelte';
import { conversations } from '/@/stores/conversations';
import PlaygroundColumnIcon from '/@/lib/table/playground/PlaygroundColumnIcon.svelte';
import { Button } from '@podman-desktop/ui-svelte';
const columns: Column<PlaygroundV2>[] = [
new Column<PlaygroundV2>('', { width: '40px', renderer: PlaygroundColumnIcon }),
Expand Down

0 comments on commit ee78fb4

Please sign in to comment.