Skip to content

Commit

Permalink
styles(frontend)
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Oct 7, 2024
1 parent 23e50f0 commit c7d09ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
14 changes: 5 additions & 9 deletions agenta-web/src/components/AppSelector/AppSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({
lineHeight: theme.lineHeightHeading4,
fontSize: theme.fontSizeHeading4,
fontWeight: theme.fontWeightMedium,
color: theme.colorText,
},
"& > div": {
color: theme.colorTextSecondary,
},
},
}))
Expand All @@ -101,7 +97,7 @@ const AppSelector: React.FC = () => {
const [isMaxAppModalOpen, setIsMaxAppModalOpen] = useState(false)
const [templates, setTemplates] = useState<Template[]>([])
const {user} = useProfileData()
const [templateMessage, setTemplateMessage] = useState("")
const [noTemplateMessage, setNoTemplateMessage] = useState("")
const [templateId, setTemplateId] = useState<string | undefined>(undefined)
const [statusModalOpen, setStatusModalOpen] = useState(false)
const [fetchingTemplate, setFetchingTemplate] = useState(false)
Expand Down Expand Up @@ -152,7 +148,7 @@ const AppSelector: React.FC = () => {
if (typeof data == "object") {
setTemplates(data)
} else {
setTemplateMessage(data)
setNoTemplateMessage(data)
}
}

Expand Down Expand Up @@ -261,7 +257,7 @@ const AppSelector: React.FC = () => {
hasAvailableApps={hasAvailableApps}
newApp={newApp}
templates={templates}
noTemplateMessage={templateMessage}
noTemplateMessage={noTemplateMessage}
templateId={templateId}
appNameExist={appNameExist}
setCurrent={setCurrent}
Expand Down Expand Up @@ -365,7 +361,7 @@ const AppSelector: React.FC = () => {
height={210}
/>
<Typography.Text>No Results found</Typography.Text>
<Typography.Paragraph>
<Typography.Paragraph type="secondary">
No results match the search criteria.
</Typography.Paragraph>
</div>
Expand Down Expand Up @@ -397,7 +393,7 @@ const AppSelector: React.FC = () => {
</Modal>

<MaxAppModal
open={isMaxAppModalOpen}
open={true}
onCancel={() => {
setIsMaxAppModalOpen(false)
}}
Expand Down
4 changes: 1 addition & 3 deletions agenta-web/src/components/AppSelector/AppTemplateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({
flexDirection: "column",
justifyContent: "space-between",
transition: "all 0.025s ease-in",
boxShadow:
"0px 2px 4px 0px rgba(0, 0, 0, 0.02), 0px 1px 6px -1px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.03)",
boxShadow: theme.boxShadowTertiary,
"& > .ant-card-head": {
minHeight: 0,
padding: theme.paddingSM,

"& .ant-card-head-title": {
fontSize: theme.fontSizeLG,
fontWeight: theme.fontWeightMedium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({
cursor: "pointer",
transitionDuration: "0.3s",
"&:hover": {
boxShadow:
"0px 9px 28px 8px #0000000D, 0px 3px 6px -4px #0000001F, 0px 6px 16px 0px #00000014",
boxShadow: theme.boxShadow,
},
"& > .ant-card-head": {
minHeight: 0,
Expand Down Expand Up @@ -95,7 +94,7 @@ const AddAppFromTemplatedModal = ({
const isError = appNameExist || (newApp.length > 0 && !isAppNameInputValid(newApp))

const handleEnterKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {
if (event.key === "Enter") {
if (event.key === "Enter" && templateId) {
handleCreateApp()
}
}
Expand Down

0 comments on commit c7d09ca

Please sign in to comment.