ops(dashboard-v2): publish new dashboard under /v2 prefix

This commit is contained in:
Michał Leszczyk 2022-04-14 18:30:27 +02:00
parent 1e713c61c9
commit e4fe4dd901
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
9 changed files with 28 additions and 13 deletions

View File

@ -3,6 +3,10 @@ listen 443 ssl http2;
include /etc/nginx/conf.d/include/ssl-settings; include /etc/nginx/conf.d/include/ssl-settings;
include /etc/nginx/conf.d/include/init-optional-variables; include /etc/nginx/conf.d/include/init-optional-variables;
location /v2 {
proxy_pass http://dashboard-v2:9000;
}
location / { location / {
proxy_pass http://dashboard:3000; proxy_pass http://dashboard:3000;
} }

View File

@ -11,6 +11,7 @@ module.exports = {
title: `Account Dashboard`, title: `Account Dashboard`,
siteUrl: `https://account.${GATSBY_PORTAL_DOMAIN}`, siteUrl: `https://account.${GATSBY_PORTAL_DOMAIN}`,
}, },
pathPrefix: "/v2",
trailingSlash: "never", trailingSlash: "never",
plugins: [ plugins: [
"gatsby-plugin-image", "gatsby-plugin-image",

View File

@ -11,8 +11,8 @@
"develop": "gatsby develop", "develop": "gatsby develop",
"develop:secure": "dotenv -e .env.development -- gatsby develop --https -p=443", "develop:secure": "dotenv -e .env.development -- gatsby develop --https -p=443",
"start": "gatsby develop", "start": "gatsby develop",
"build": "gatsby build", "build": "gatsby build --prefix-paths",
"serve": "gatsby serve", "serve": "gatsby serve --prefix-paths",
"clean": "gatsby clean", "clean": "gatsby clean",
"lint": "eslint .", "lint": "eslint .",
"prettier": "prettier .", "prettier": "prettier .",

View File

@ -3,14 +3,14 @@ import { useEffect, useState } from "react";
import { useUser } from "../../contexts/user"; import { useUser } from "../../contexts/user";
// import { SimpleUploadIcon } from "../Icons"; // import { SimpleUploadIcon } from "../Icons";
const AVATAR_PLACEHOLDER = "/images/avatar-placeholder.svg"; import avatarPlaceholder from "../../../static/images/avatar-placeholder.svg";
export const AvatarUploader = (props) => { export const AvatarUploader = (props) => {
const { user } = useUser(); const { user } = useUser();
const [imageUrl, setImageUrl] = useState(AVATAR_PLACEHOLDER); const [imageUrl, setImageUrl] = useState(avatarPlaceholder);
useEffect(() => { useEffect(() => {
setImageUrl(user.avatarUrl ?? AVATAR_PLACEHOLDER); setImageUrl(user.avatarUrl ?? avatarPlaceholder);
}, [user]); }, [user]);
return ( return (

View File

@ -3,10 +3,13 @@ import styled from "styled-components";
import { UserProvider } from "../contexts/user"; import { UserProvider } from "../contexts/user";
import skynetLogo from "../../static/images/logo-black-text.svg";
import authBg from "../../static/images/auth-bg.svg";
const Layout = styled.div.attrs({ const Layout = styled.div.attrs({
className: "min-h-screen w-screen bg-black flex", className: "min-h-screen w-screen bg-black flex",
})` })`
background-image: url(/images/auth-bg.svg); background-image: url(${authBg});
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
`; `;
@ -36,7 +39,7 @@ const AuthLayout =
<Content> <Content>
<div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen"> <div className="bg-white px-8 py-10 md:py-32 lg:px-16 xl:px-28 min-h-screen">
<div className="mb-4 md:mb-16"> <div className="mb-4 md:mb-16">
<img src="/images/logo-black-text.svg" alt="Skynet" className="-ml-2" /> <img src={skynetLogo} alt="Skynet" className="-ml-2" />
</div> </div>
{children} {children}
</div> </div>

View File

@ -7,10 +7,12 @@ import { Footer } from "../components/Footer";
import { UserProvider, useUser } from "../contexts/user"; import { UserProvider, useUser } from "../contexts/user";
import { FullScreenLoadingIndicator } from "../components/LoadingIndicator"; import { FullScreenLoadingIndicator } from "../components/LoadingIndicator";
import dashboardBg from "../../static/images/dashboard-bg.svg";
const Wrapper = styled.div.attrs({ const Wrapper = styled.div.attrs({
className: "min-h-screen overflow-hidden", className: "min-h-screen overflow-hidden",
})` })`
background-image: url(/images/dashboard-bg.svg); background-image: url(${dashboardBg});
background-position: center -280px; background-position: center -280px;
background-repeat: no-repeat; background-repeat: no-repeat;
`; `;

View File

@ -10,6 +10,8 @@ import { AddSponsorKeyForm } from "../../components/forms/AddSponsorKeyForm";
import { Metadata } from "../../components/Metadata"; import { Metadata } from "../../components/Metadata";
import HighlightedLink from "../../components/HighlightedLink"; import HighlightedLink from "../../components/HighlightedLink";
import apiKeysImg from "../../../static/images/api-keys.svg";
const DeveloperSettingsPage = () => { const DeveloperSettingsPage = () => {
const { data: allKeys = [], mutate: reloadKeys, error } = useSWR("user/apikeys"); const { data: allKeys = [], mutate: reloadKeys, error } = useSWR("user/apikeys");
const apiKeys = allKeys.filter(({ public: isPublic }) => isPublic === "false"); const apiKeys = allKeys.filter(({ public: isPublic }) => isPublic === "false");
@ -103,7 +105,7 @@ const DeveloperSettingsPage = () => {
</section> </section>
</div> </div>
<div className="hidden xl:block w-full text-right pt-16 pr-5"> <div className="hidden xl:block w-full text-right pt-16 pr-5">
<img src="/images/api-keys.svg" alt="" className="inline-block h-[150px]" /> <img src={apiKeysImg} alt="" className="inline-block h-[150px]" />
</div> </div>
</div> </div>
</> </>

View File

@ -6,6 +6,8 @@ import { Switch } from "../../components/Switch";
import { Button } from "../../components/Button"; import { Button } from "../../components/Button";
import { Metadata } from "../../components/Metadata"; import { Metadata } from "../../components/Metadata";
import exportImg from "../../../static/images/import-export.svg";
const useExportOptions = () => { const useExportOptions = () => {
const [pinnedFiles, setPinnedFiles] = useState(false); const [pinnedFiles, setPinnedFiles] = useState(false);
const [uploadHistory, setUploadHistory] = useState(false); const [uploadHistory, setUploadHistory] = useState(false);
@ -65,7 +67,7 @@ const ExportPage = () => {
</section> </section>
</div> </div>
<div className="hidden xl:block w-full text-right pt-20 pr-6"> <div className="hidden xl:block w-full text-right pt-20 pr-6">
<img src="/images/import-export.svg" alt="" className="inline-block w-[200px]" /> <img src={exportImg} alt="" className="inline-block w-[200px]" />
</div> </div>
</div> </div>
</> </>

View File

@ -1,11 +1,12 @@
import * as React from "react"; import * as React from "react";
import { StaticImage } from "gatsby-plugin-image";
import UserSettingsLayout from "../../layouts/UserSettingsLayout"; import UserSettingsLayout from "../../layouts/UserSettingsLayout";
import { Switch } from "../../components/Switch"; import { Switch } from "../../components/Switch";
import { Metadata } from "../../components/Metadata"; import { Metadata } from "../../components/Metadata";
import inboxImg from "../../../static/images/inbox.svg";
const NotificationsPage = () => { const NotificationsPage = () => {
return ( return (
<> <>
@ -37,8 +38,8 @@ const NotificationsPage = () => {
</ul> </ul>
</section> </section>
</div> </div>
<div className="hidden xl:block text-right w-full pr-14 pt-20"> <div className="hidden xl:block text-right w-full pl-12 pt-20">
<StaticImage src="../../../static/images/inbox.svg" alt="" placeholder="none" /> <img src={inboxImg} alt="" className="w-[200px]" />
</div> </div>
</div> </div>
</> </>