update models source and hide old models

This commit is contained in:
josc146
2023-05-29 22:50:46 +08:00
parent 53b6a5ffe0
commit cbb249725d
2 changed files with 84 additions and 16 deletions

View File

@@ -34,6 +34,7 @@ export type ModelSourceItem = {
downloadUrl?: string;
isLocal?: boolean;
lastUpdatedMs?: number;
hide?: boolean;
};
const columns: TableColumnDefinition<ModelSourceItem>[] = [
@@ -203,6 +204,7 @@ export const Models: FC = observer(() => {
<div className="overflow-y-auto overflow-x-hidden">
<DataGridBody<ModelSourceItem>>
{({ item, rowId }) => (
(!item.hide || item.isLocal) &&
<DataGridRow<ModelSourceItem> key={rowId}>
{({ renderCell }) => (
<DataGridCell>{renderCell(item)}</DataGridCell>