Skip to content

Commit

Permalink
fix(ui): adjust provider card image padding; link to new issue template
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbreuninger committed May 16, 2023
1 parent 8324755 commit 66a5b45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
18 changes: 3 additions & 15 deletions desktop/src/components/Layout/StatusBar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { StarIcon } from "@chakra-ui/icons"
import {
BoxProps,
Checkbox,
Expand All @@ -11,30 +12,17 @@ import {
Text,
Tooltip,
} from "@chakra-ui/react"
import { useCallback } from "react"
import { FaBug } from "react-icons/fa"
import { HiDocumentMagnifyingGlass } from "react-icons/hi2"
import { version } from "../../../package.json"
import { client, DEVPOD_GIT_REPOSITORY } from "../../client"
import { client } from "../../client"
import { Debug, useArch, useDebug, usePlatform } from "../../lib"
import { StarIcon } from "@chakra-ui/icons"

export function StatusBar(boxProps: BoxProps) {
const arch = useArch()
const platform = usePlatform()
const debug = useDebug()

const handleReportIssueClicked = useCallback(() => {
const body = encodeURIComponent(`TODO: Describe the Issue here
---
**Version**: ${version}
**Platform**: ${platform ?? "Unknown Platform"}
**Arch**: ${arch ?? "Unknown Arch"}
`)
const link = `${DEVPOD_GIT_REPOSITORY}/issues/new?body=${body}`
client.openLink(link)
}, [arch, platform])

return (
<HStack justify="space-between" paddingX="6" fontSize="sm" zIndex="overlay" {...boxProps}>
<Text>
Expand Down Expand Up @@ -65,7 +53,7 @@ export function StatusBar(boxProps: BoxProps) {
rounded="full"
icon={<Icon as={FaBug} color="gray.700" />}
aria-label="Report an Issue"
onClick={handleReportIssueClicked}
onClick={() => client.openLink("https://github.com/loft-sh/devpod/issues/new/choose")}
/>
</Tooltip>
{debug.isEnabled && (
Expand Down
6 changes: 3 additions & 3 deletions desktop/src/views/Providers/ProviderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ export function ProviderCard({ id, provider, remove }: TProviderCardProps) {
{exists(providerIcon) ? (
<Image
objectFit="cover"
padding="8"
padding="4"
borderRadius="md"
height="48"
height="44"
src={providerIcon}
alt="Provider Image"
/>
) : (
<Center height="48">
<Center height="44">
<ProviderPlaceholder boxSize={24} color="chakra-body-text" />
</Center>
)}
Expand Down

0 comments on commit 66a5b45

Please sign in to comment.