Skip to content

Commit

Permalink
Update product icon (gitpod-io#19315)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 authored Jan 12, 2024
1 parent 7d2c34e commit 36d89c6
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/dashboard/src/app/AppLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import { FunctionComponent, useEffect, useState } from "react";
import { Heading3, Subheading } from "../components/typography/headings";
import gitpodIcon from "../icons/gitpod.svg";
import { Delayed } from "@podkit/loading/Delayed";
import { ProductLogo } from "../components/ProductLogo";

function useDelay(wait: number) {
const [done, setDone] = useState(false);
Expand All @@ -25,7 +25,7 @@ export const AppLoading: FunctionComponent = () => {
return (
<Delayed wait={3000}>
<div className="flex flex-col justify-center items-center w-full h-screen space-y-4">
<img src={gitpodIcon} alt="Gitpod's logo" className={"h-16 flex-shrink-0 animate-fade-in"} />
<ProductLogo className={"h-16 flex-shrink-0 animate-fade-in"} />
{connectionProblems ? (
<Heading3 className={done ? "" : "invisible"}>This is taking longer than it should</Heading3>
) : (
Expand Down
26 changes: 26 additions & 0 deletions components/dashboard/src/components/ProductLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright (c) 2024 Gitpod GmbH. All rights reserved.
* Licensed under the GNU Affero General Public License (AGPL).
* See License.AGPL.txt in the project root for license information.
*/

import { useContext } from "react";
import { useIsDataOps } from "../data/featureflag-query";
import { ThemeContext } from "../theme-context";
import gitpodIcon from "../icons/gitpod.svg";
import dataOpsIconLight from "../icons/dataops-light.svg";
import dataOpsIconDark from "../icons/dataops-dark.svg";

export function ProductLogo(props: { className: string }) {
const { isDark } = useContext(ThemeContext);
const isDataOps = useIsDataOps();
return (
<>
{isDataOps ? (
<img src={isDark ? dataOpsIconDark : dataOpsIconLight} alt="Dataops logo" className={props.className} />
) : (
<img src={gitpodIcon} alt="Gitpod's logo" className={props.className} />
)}
</>
);
}
93 changes: 93 additions & 0 deletions components/dashboard/src/icons/dataops-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 36d89c6

Please sign in to comment.