Skip to content

Commit

Permalink
✨ Add icon on login page
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone committed May 6, 2024
1 parent 77dbddd commit 58da045
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pkg/inits/baseimage.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ func pushImage(config configs.Configuration, path, name, version string) error {
if err != nil {
return err
}
cmd := exec.Command("skopeo", "--insecure-policy", "copy", "--dest-registry-token", authorization, "--dest-tls-verify=false", "-a", fmt.Sprintf("oci-archive:%s", path), fmt.Sprintf("docker://%s/library/%s:%s", utils.TrimHTTP(config.HTTP.InternalEndpoint), name, version)) // nolint: gosec
fmt.Println(cmd.String())
cmd := exec.Command("skopeo", "--insecure-policy", "copy", "--dest-registry-token", authorization, "--dest-tls-verify=false", "-a", fmt.Sprintf("oci-archive:%s", path), fmt.Sprintf("docker://%s/library/%s:latest", utils.TrimHTTP(config.HTTP.InternalEndpoint), name)) // nolint: gosec

Check warning on line 134 in pkg/inits/baseimage.go

View check run for this annotation

Codecov / codecov/patch

pkg/inits/baseimage.go#L134

Added line #L134 was not covered by tests
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
Expand Down
3 changes: 1 addition & 2 deletions web/src/components/svg/docker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

export default function () {
return (
<svg version="1.1" fill="#8052FD" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
<svg version="1.1" fill="#8052FD" xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="25"
Expand All @@ -37,6 +37,5 @@ export default function () {
M236.8,204.1h-44.2v44.2h44.2V204.1L236.8,204.1z M183.7,204.1h-44.2v44.2h44.2V204.1L183.7,204.1z M130.6,204.1H86.3v44.2h44.2
V204.1L130.6,204.1z"/>
</svg>

);
}
26 changes: 26 additions & 0 deletions web/src/components/svg/sigma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Copyright 2023 sigma
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export default function () {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 190">
<circle cx="95" cy="95" r="95" fill="#f99d1c" />
<circle cx="95" cy="95" r="85" fill="#cd4b27" />
<circle cx="95" cy="95" r="75" fill="#5c2e0e" />
<path d="m71.32,125.88v-5.28l23.52-29.09v4.99l-22.56-31.58v-3.36h7.01l21.6,30.24-23.71,29.95-2.5-3.55h39.55l-5.28,4.8,3.65-17.28h5.76l-.77,20.16h-46.27Zm36-64.32l5.28,4.8h-37.05v-4.8h40.41l.77,17.09h-5.76l-3.65-17.09Z" fill="#f99d1c" />
</svg>
);
}
6 changes: 5 additions & 1 deletion web/src/pages/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { Helmet, HelmetProvider } from "react-helmet-async";

import SigmaSvg from "../../components/svg/sigma";
import Notification from "../../components/Notification";
import { IEndpoint, IHTTPError, IOauth2ClientID, ISystemConfig, IUserLoginResponse } from "../../interfaces";

Expand Down Expand Up @@ -119,7 +120,10 @@ export default function Login({ localServer }: { localServer: string }) {
</HelmetProvider>
<div className="flex min-h-full flex-1 flex-col justify-center py-12 sm:px-6 lg:px-8">
<div className="mt-10 sm:mx-auto sm:w-full sm:max-w-[480px]">
<div className="bg-white px-6 py-12 shadow sm:rounded-lg sm:px-12">
<div className="w-40 mx-auto">
<SigmaSvg />
</div>
<div className="bg-white px-6 py-12 shadow sm:rounded-lg sm:px-12 mt-6">
<div className="space-y-6" >
<div>
<label htmlFor="username" className="block text-sm font-medium leading-6 text-gray-900">
Expand Down

0 comments on commit 58da045

Please sign in to comment.