Skip to content

Commit 0eb0d51

Browse files
committed
fix: subnets & pods page
1 parent 3f484f7 commit 0eb0d51

File tree

14 files changed

+443
-156
lines changed

14 files changed

+443
-156
lines changed

apps/ui/src/modals/AIChatModal/components/ChatMessageList/components/AiMessageMarkdown.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled, { css } from 'styled-components'
22
import ReactMarkdown from 'react-markdown'
33
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
4-
import { atomDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
4+
import { atomDark, prism } from 'react-syntax-highlighter/dist/esm/styles/prism'
55
import remarkGfm from 'remark-gfm'
66
import { useModal } from 'hooks'
77
import { memo, useEffect, useState } from 'react'
@@ -133,7 +133,7 @@ const AiMessageMarkdown = ({ isReply = false, children }: { isReply?: boolean; c
133133
return !inline && match ? (
134134
<SyntaxHighlighter
135135
children={String(children).replace(/\n$/, '')}
136-
style={atomDark as any}
136+
style={prism as any}
137137
language={match[1]}
138138
PreTag='div'
139139
{...props}

apps/ui/src/pages/ApiKeys/ApiKeys.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ const ApiKeys = () => {
5656

5757
<ButtonPrimary
5858
onClick={() => navigate('/api-key/create-api-key')}
59-
leftIcon={Add}
60-
size={Button.sizes?.SMALL}
59+
size={Button.sizes?.MEDIUM}
6160
>
6261
{t('create-api-key')}
6362
</ButtonPrimary>

apps/ui/src/pages/ApiKeys/CreateApiKey/CreateApikeysForm.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@ function CreateApiKeyForm() {
2323
<FormikProvider value={formik}>
2424
<StyledSectionWrapper>
2525
<StyledHeaderGroup className='header_group'>
26-
<div>
26+
<div style={{ width: '100%' }}>
2727
<StyledSectionTitle>Add API Key</StyledSectionTitle>
28-
<StyledSectionDescription>Here is your API Key.</StyledSectionDescription>
2928
</div>
3029

3130
<StyledButtonWrapper>
3231
<BackButton />
3332
<ButtonPrimary
3433
onClick={formik?.handleSubmit}
35-
size={Button.sizes?.SMALL}
34+
size={Button.sizes?.MEDIUM}
3635
disabled={isLoading}
3736
>
3837
{isLoading ? <Loader size={32} /> : 'Save'}

apps/ui/src/pages/Navigation/MainNavigation.tsx

+30-15
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import Integrations from 'share-ui/components/Icon/Icons/components/integrations
3737
import FineTuning from 'share-ui/components/Icon/Icons/components/FineTuning'
3838
// eslint-disable-next-line import/no-named-as-default
3939
import Cloud from 'share-ui/components/Icon/Icons/components/Cloud'
40+
import { API } from 'share-ui/components/Icon/Icons'
4041

4142
const MainNavigation = ({ user }: { user: any }) => {
4243
const domainEnv = import.meta.env
@@ -177,22 +178,10 @@ const MainNavigation = ({ user }: { user: any }) => {
177178
</StyledLi>
178179
)} */}
179180

180-
{isModel && (
181-
<Tooltip content={t('model')} position={Tooltip.positions.LEFT}>
182-
<StyledLi
183-
isActive={includes(active, 'models')}
184-
onClick={() => onHandleClick('/models')}
185-
>
186-
<FineTuning size={30} />
187-
{includes(active, 'models') && <StyledCorner />}
188-
</StyledLi>
189-
</Tooltip>
190-
)}
191-
192181
<Tooltip content={'Pods'} position={Tooltip.positions.LEFT}>
193182
<StyledLi
194183
isActive={includes(active, 'pods')}
195-
onClick={() => onHandleClick('/pods')}
184+
onClick={() => onHandleClick('/pods/create-pod')}
196185
>
197186
<Cloud size={30} fill={includes(active, 'pods') ? '#ffffff' : '#000000'} />
198187
{includes(active, 'pods') && <StyledCorner />}
@@ -214,6 +203,27 @@ const MainNavigation = ({ user }: { user: any }) => {
214203
</Tooltip>
215204
)}
216205

206+
{isModel && (
207+
<Tooltip content={t('model')} position={Tooltip.positions.LEFT}>
208+
<StyledLi
209+
isActive={includes(active, 'models')}
210+
onClick={() => onHandleClick('/models')}
211+
>
212+
<FineTuning size={30} />
213+
{includes(active, 'models') && <StyledCorner />}
214+
</StyledLi>
215+
</Tooltip>
216+
)}
217+
218+
<Tooltip content={t('api-keys')} position={Tooltip.positions.LEFT}>
219+
<StyledLi
220+
isActive={includes(active, 'api-key')}
221+
onClick={() => onHandleClick('/api-key')}
222+
>
223+
<StyledAPIIcon size={40} />
224+
</StyledLi>
225+
</Tooltip>
226+
217227
{/* {isDiscover && (
218228
<Tooltip content={t('discover')} position={Tooltip.positions.LEFT}>
219229
<StyledLi
@@ -293,14 +303,14 @@ const StyledLi = styled.li<{ isActive?: boolean }>`
293303
border-radius: 100px;
294304
background: #000;
295305
296-
297-
298306
span{
299307
color: #FFF;
300308
}
309+
301310
302311
path {
303312
stroke: #FFF;
313+
304314
}
305315
`}
306316
`
@@ -410,3 +420,8 @@ const StyledCorner = styled.div`
410420
top: 8px; /* Adjust this value based on your design */
411421
right: -16px; /* Position the left corner */
412422
`
423+
const StyledAPIIcon = styled(API)`
424+
path {
425+
fill: ${({ theme }) => theme.body.iconColor};
426+
}
427+
`

apps/ui/src/pages/Pods/FilterPods.tsx

+110-112
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)