Skip to content

Commit

Permalink
Merge branch 'testing/robot' of https://github.com/DeCenter-AI/app.de…
Browse files Browse the repository at this point in the history
…centerai.com into testing/robot
  • Loading branch information
RedValis committed Nov 30, 2023
2 parents 3d0ad55 + 4270dfb commit 13fb7d4
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 37 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
check-latest: true

- name: Write environment #TODO: add coachroach ssl certificate
shell: bash
run: |
echo $envfile > .env.tmp
sed 's/ /\n/g' .env.tmp > .env
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cross[hardhat].yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
max-parallel: 2
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest, ubuntu-latest, macos-latest]
node_version: [18, 19, 20]
architecture: [x64]

Expand All @@ -54,6 +54,7 @@ jobs:
check-latest: true

- name: Write environment
shell: bash
run: |
echo $envfile > .env.tmp
sed 's/ /\n/g' .env.tmp > .env
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.next/
pnpm-lock.yaml
prisma/generated
hardhat/
70 changes: 37 additions & 33 deletions src/app/dashboard/repository/components/repository.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
import useModelStore, { IModel } from '@/state/modelStore'
import React from 'react'
import { BiLike } from 'react-icons/bi'
import { GoDownload } from 'react-icons/go'

export default function Repository({ repository }) {
export default function Repository() {
const { models } = useModelStore()

return (
<div>
<div className="">
{repository.map((item) => (
<div
key={item.id}
className=" border border-primary_9 flex px-5 mb-5 py-3 items-center rounded-xl h-[170px] min-h-[170px]"
>
<div className="w-[80%] h-full">
<div className=" flex h-[25%] items-start ">
<span className="bg-primary_11 rounded-full text-primary_8 py-1 px-3">
{item.label}
</span>
</div>
<div className="h-[20%]">
<span className="text-lg ">{item.title}</span>

{/* extract the values of the object */}
{models && Object.values(models).map(model => (
<div
key={model.id}
className=" border border-primary_9 flex px-5 mb-5 py-3 items-center rounded-xl h-[170px] min-h-[170px]"
>
<div className="w-[80%] h-full">
<div className=" flex h-[25%] items-start ">
<span className="bg-primary_11 rounded-full text-primary_8 py-1 px-3">
{'Text Generation'}
</span>
</div>
<div className="h-[20%]">
<span className="text-lg ">{model.name}</span>
</div>
<div className="flex items-center h-[40%]">
<p className="text-xs">{model.description} </p>
</div>
<div className=" h-[15%] text-xs text-primary_8 flex gap-4">
<div>
<span>Updated {"12 2023"}</span>
</div>
<div className="flex items-center h-[40%]">
<p className="text-xs">{item.description} </p>
<div className="flex">
<GoDownload />
<span>{'12k'}</span>
</div>
<div className=" h-[15%] text-xs text-primary_8 flex gap-4">
<div>
<span>Updated {item.time}</span>
</div>
<div className="flex">
<GoDownload />
<span>{item.dowloaded}</span>
</div>
<div className="flex">
<BiLike />
<span>{item.likes}</span>
</div>
<div className="flex">
<BiLike />
<span>{'50'}</span>
</div>
</div>

<div className="w-[20%] h-full bg-primary_11 "></div>
</div>
))}
</div>

<div className="w-[20%] h-full bg-primary_11 "></div>
</div>
))}

</div>
)
}
2 changes: 1 addition & 1 deletion src/app/dashboard/repository/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function Page() {

<div className=" w-[85%] h-full ">
<div className="w-full h-[80%] flex flex-col gap-6 overflow-y-scroll">
<Repository repository={repositoryList} />
<Repository />
</div>

<div className="flex h-[20%] justify-center gap-x-3 text-primary_7 items-center ">
Expand Down
4 changes: 2 additions & 2 deletions src/state/modelStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { devtools, persist } from 'zustand/middleware'
import { upsert_user } from '@app/explore/upsert_user'
import { Model, TrainingRequest } from '@prisma/client'

type IModel = Omit<Omit<Model, 'createdAt'>, 'updatedAt'>
export type IModel = Omit<Omit<Model, 'createdAt'>, 'updatedAt'>

interface Models {
export interface Models {
[modelId: string]: IModel
}

Expand Down

0 comments on commit 13fb7d4

Please sign in to comment.