Skip to content

Commit 27ac41c

Browse files
author
Ubuntu
committed
feat: Added codeheaan ui
1 parent 2c507c5 commit 27ac41c

File tree

12 files changed

+77
-25
lines changed

12 files changed

+77
-25
lines changed

coderd/userauth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ func (api *API) userOIDCLogoutURL(rw http.ResponseWriter, r *http.Request) {
916916
if oidcClientID != "" {
917917
q.Set("client_id", oidcClientID)
918918
}
919+
// post_logout_redirect_uri?
919920
if logoutURI != "" {
920921
q.Set("logout_uri", logoutURI)
921922
}

site/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@
2525
<meta property="docs-url" content="{{ .DocsURL }}" />
2626
<meta property="logo-url" content="{{ .LogoURL }}" />
2727
<!-- We need to set data-react-helmet to be able to override it in the workspace page -->
28-
<link
28+
<!--<link
2929
rel="alternate icon"
3030
type="image/png"
3131
href="/favicons/favicon-light.png"
3232
media="(prefers-color-scheme: dark)"
3333
data-react-helmet="true"
34-
/>
34+
/>-->
3535
<link
3636
rel="icon"
3737
type="image/svg+xml"
38-
href="/favicons/favicon-light.svg"
38+
href="/favicons/heaan-dark.svg"
3939
media="(prefers-color-scheme: dark)"
4040
data-react-helmet="true"
4141
/>
42-
<link
42+
<!--<link
4343
rel="alternate icon"
4444
type="image/png"
4545
href="/favicons/favicon-dark.png"
4646
media="(prefers-color-scheme: light)"
4747
data-react-helmet="true"
48-
/>
48+
/>-->
4949
<link
5050
rel="icon"
5151
type="image/svg+xml"
52-
href="/favicons/favicon-dark.svg"
52+
href="/favicons/heaan-light.svg"
5353
media="(prefers-color-scheme: light)"
5454
data-react-helmet="true"
5555
/>

site/src/modules/dashboard/Navbar/NavbarView.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { DeploymentDropdown } from "./DeploymentDropdown";
99
import { MobileMenu } from "./MobileMenu";
1010
import { ProxyMenu } from "./ProxyMenu";
1111
import { UserDropdown } from "./UserDropdown/UserDropdown";
12+
import { useTheme } from "@emotion/react";
1213

1314
export interface NavbarViewProps {
1415
logo_url?: string;
@@ -41,14 +42,25 @@ export const NavbarView: FC<NavbarViewProps> = ({
4142
canViewAuditLog,
4243
proxyContextValue,
4344
}) => {
45+
const theme = useTheme();
46+
47+
const colorTheme = theme.palette.mode;
48+
const LogoHEaaNDark = "/favicons/heaan-dark.svg";
49+
const LogoHEaaNLight = "/favicons/heaan-light.svg";
50+
4451
return (
4552
<div className="border-0 border-b border-solid h-[72px] flex items-center leading-none px-6">
4653
<NavLink to="/workspaces">
47-
{logo_url ? (
54+
<img
55+
src={colorTheme === "light" ? LogoHEaaNLight : LogoHEaaNDark}
56+
alt="HEaaN-logo"
57+
className="w-8 h-8"
58+
/>
59+
{/*{logo_url ? (
4860
<ExternalImage className="h-7" src={logo_url} alt="Custom Logo" />
4961
) : (
5062
<CoderIcon className="h-7 w-7 fill-content-primary" />
51-
)}
63+
)}*/}
5264
</NavLink>
5365

5466
<NavItems className="ml-4" />

site/src/modules/dashboard/Navbar/UserDropdown/UserDropdownContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const UserDropdownContent: FC<UserDropdownContentProps> = ({
9595
<span css={styles.menuItemText}>{Language.signOutLabel}</span>
9696
</MenuItem>
9797

98-
{supportLinks && (
98+
{/*{supportLinks && (
9999
<>
100100
<Divider />
101101
{supportLinks.map((link) => (
@@ -113,7 +113,7 @@ export const UserDropdownContent: FC<UserDropdownContentProps> = ({
113113
</a>
114114
))}
115115
</>
116-
)}
116+
)}*/}
117117

118118
<Divider css={{ marginBottom: "0 !important" }} />
119119

site/src/pages/LoginPage/LoginPage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export const LoginPage: FC = () => {
6969
/>
7070
);
7171
}
72-
}
72+
}
73+
//else {
74+
// window.location.replace(`https://heaan.io`);
75+
//}
7376

7477
if (isConfiguringTheFirstUser) {
7578
return <Navigate to="/setup" replace />;

site/src/pages/UserSettingsPage/AccountPage/AccountForm.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const AccountForm: FC<AccountFormProps> = ({
7070
onChange={onChangeTrimmed(form)}
7171
aria-disabled={!editable}
7272
autoComplete="username"
73-
disabled={!editable}
73+
disabled
7474
fullWidth
7575
label={Language.usernameLabel}
7676
/>
@@ -83,13 +83,14 @@ export const AccountForm: FC<AccountFormProps> = ({
8383
}}
8484
label={Language.nameLabel}
8585
helperText='The human-readable name is optional and can be accessed in a template via the "data.coder_workspace_owner.me.full_name" property.'
86+
disabled
8687
/>
8788

88-
<div>
89+
{/*<div>
8990
<LoadingButton loading={isLoading} type="submit" variant="contained">
9091
{Language.updateSettings}
9192
</LoadingButton>
92-
</div>
93+
</div>*/}
9394
</FormFields>
9495
</Form>
9596
);

site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ const WarningDialog: FC<
408408

409409
// You can see the favicon designs here: https://www.figma.com/file/YIGBkXUcnRGz2ZKNmLaJQf/Coder-v2-Design?node-id=560%3A620
410410
type FaviconType =
411+
"heaan"
411412
| "favicon"
412413
| "favicon-success"
413414
| "favicon-error"
@@ -417,26 +418,26 @@ type FaviconType =
417418
const getFaviconByStatus = (build: TypesGen.WorkspaceBuild): FaviconType => {
418419
switch (build.status) {
419420
case undefined:
420-
return "favicon";
421+
return "heaan";
421422
case "running":
422-
return "favicon-success";
423+
return "heaan";
423424
case "starting":
424-
return "favicon-running";
425+
return "heaan";
425426
case "stopping":
426-
return "favicon-running";
427+
return "heaan";
427428
case "stopped":
428-
return "favicon";
429+
return "heaan";
429430
case "deleting":
430-
return "favicon";
431+
return "heaan";
431432
case "deleted":
432-
return "favicon";
433+
return "heaan";
433434
case "canceling":
434-
return "favicon-warning";
435+
return "heaan";
435436
case "canceled":
436-
return "favicon";
437+
return "heaan";
437438
case "failed":
438-
return "favicon-error";
439+
return "heaan";
439440
case "pending":
440-
return "favicon";
441+
return "heaan";
441442
}
442443
};

site/src/theme/icons.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
"go.svg",
5050
"goland.svg",
5151
"google.svg",
52+
"heaan-dark.svg",
53+
"heaan-light.svg",
5254
"image.svg",
5355
"intellij.svg",
5456
"java.svg",

site/static/favicons/heaan-dark.svg

Lines changed: 8 additions & 0 deletions
Loading

site/static/favicons/heaan-light.svg

Lines changed: 8 additions & 0 deletions
Loading

site/static/icon/heaan-dark.svg

Lines changed: 8 additions & 0 deletions
Loading

site/static/icon/heaan-light.svg

Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)