Skip to content

Commit

Permalink
fix: types for TableColumn
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Martin <[email protected]>
  • Loading branch information
feloy committed Jun 19, 2024
1 parent 63fd01a commit 8d3683f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script lang="ts">
import PlaygroundWhite from '../../icons/PlaygroundWhite.svelte';
// svelte-ignore unused-export-let
export let object: {};
</script>

<PlaygroundWhite />
14 changes: 7 additions & 7 deletions packages/frontend/src/pages/Playgrounds.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import { router } from 'tinro';
import NavPage from '../lib/NavPage.svelte';
import PlaygroundColumnModel from '../lib/table/playground/PlaygroundColumnModel.svelte';
import PlaygroundColumnName from '../lib/table/playground/PlaygroundColumnName.svelte';
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';
import { Table, TableColumn, TableRow } from '@podman-desktop/ui-svelte';
import type { Conversation } from '@shared/src/models/IPlaygroundMessage';
const columns: TableColumn<PlaygroundV2>[] = [
new TableColumn<PlaygroundV2>('', { width: '40px', renderer: PlaygroundColumnIcon }),
new TableColumn<PlaygroundV2>('Name', { width: '1fr', renderer: PlaygroundColumnName }),
new TableColumn<PlaygroundV2>('Model', { width: '1fr', renderer: PlaygroundColumnModel }),
new TableColumn<PlaygroundV2>('Actions', { width: '40px', renderer: ConversationColumnAction, align: 'center' }),
const columns = [
new TableColumn<{}>('', { width: '40px', renderer: PlaygroundColumnIcon }),
new TableColumn<Conversation>('Name', { width: '1fr', renderer: PlaygroundColumnName }),
new TableColumn<Conversation>('Model', { width: '1fr', renderer: PlaygroundColumnModel }),
new TableColumn<Conversation>('Actions', { width: '40px', renderer: ConversationColumnAction, align: 'center' }),
];
const row = new TableRow<PlaygroundV2>({});
const row = new TableRow<Conversation>({});
function createNewPlayground() {
router.goto('/playground/create');
Expand Down
3 changes: 2 additions & 1 deletion packages/frontend/src/pages/RecipeModels.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ModelColumnRecipeRecommended from '../lib/table/model/ModelColumnRecipeRe
import ModelColumnIcon from '/@/lib/table/model/ModelColumnIcon.svelte';
import { Table, TableColumn, TableRow } from '@podman-desktop/ui-svelte';
import type { ModelInfo } from '@shared/src/models/IModelInfo';
import type { RecipeModelInfo } from '../models/RecipeModelInfo';
export let models: ModelInfo[];
export let recommended: string[];
Expand All @@ -19,7 +20,7 @@ $: models = models.map((m, i) => {
});
const columns = [
new TableColumn<ModelInfo>('', { width: '20px', renderer: ModelColumnRecipeSelection }),
new TableColumn<RecipeModelInfo>('', { width: '20px', renderer: ModelColumnRecipeSelection }),
new TableColumn<ModelInfo, boolean>('', {
width: '20px',
renderer: ModelColumnRecipeRecommended,
Expand Down

0 comments on commit 8d3683f

Please sign in to comment.