Skip to content

Commit

Permalink
feat license page
Browse files Browse the repository at this point in the history
Signed-off-by: jingyang <3161362058@qq.com>
  • Loading branch information
zjy365 committed Oct 16, 2023
1 parent 4b52494 commit b44816f
Show file tree
Hide file tree
Showing 34 changed files with 363 additions and 842 deletions.
27 changes: 27 additions & 0 deletions service/license/.env.template
@@ -0,0 +1,27 @@
PUBLIC_URL=.
NEXT_PUBLIC_SERVICE=/service/
SEALOS_CLOUD_DOMAIN="cloud.sealos.io"

# GITHUB_CLIENT_ID=
# GITHUB_CLIENT_SECRET=
# WECHAT_CLIENT_ID=
# WECHAT_CLIENT_SECRET=
# KUBECONFIG=
# MONGODB_URI=
# JWT_SECRET=
# ALI_ACCESS_KEY_ID=
# ALI_ACCESS_KEY_SECRET=
# ALI_TEMPLATE_CODE=
# ALI_SIGN_NAME=
# PRIVATE_PROTOCOL=
# SERVICE_PROTOCOL=
# CALLBACK_URL=
# PASSWORD_SALT=
# WECHAT_ENABLED=
# GITHUB_ENABLED=
# PASSWORD_ENABLED=
# SMS_ENABLED=

# costcenter
STRIPE_ENABLED=
STRIPE_PUB=
178 changes: 178 additions & 0 deletions service/license/public/images/background.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions service/license/src/components/icons/LockIcon.tsx
Expand Up @@ -2,10 +2,7 @@ import { Icon, IconProps } from '@chakra-ui/react';
export const LocklIcon = (props: IconProps) => {
return (
<Icon viewBox="0 0 17 17" fill="#000" {...props}>
<path
fill-opacity=".7"
d="M3.99935 15.2117C3.63268 15.2117 3.31879 15.0811 3.05768 14.82C2.79657 14.5589 2.66602 14.245 2.66602 13.8783V7.21167C2.66602 6.845 2.79657 6.53111 3.05768 6.27C3.31879 6.00889 3.63268 5.87834 3.99935 5.87834H4.66602V4.545C4.66602 3.62278 4.99102 2.83667 5.64102 2.18667C6.29102 1.53667 7.07713 1.21167 7.99935 1.21167C8.92157 1.21167 9.70768 1.53667 10.3577 2.18667C11.0077 2.83667 11.3327 3.62278 11.3327 4.545V5.87834H11.9993C12.366 5.87834 12.6799 6.00889 12.941 6.27C13.2021 6.53111 13.3327 6.845 13.3327 7.21167V13.8783C13.3327 14.245 13.2021 14.5589 12.941 14.82C12.6799 15.0811 12.366 15.2117 11.9993 15.2117H3.99935ZM3.99935 13.8783H11.9993V7.21167H3.99935V13.8783ZM7.99935 11.8783C8.36602 11.8783 8.6799 11.7478 8.94102 11.4867C9.20213 11.2256 9.33268 10.9117 9.33268 10.545C9.33268 10.1783 9.20213 9.86445 8.94102 9.60334C8.6799 9.34223 8.36602 9.21167 7.99935 9.21167C7.63268 9.21167 7.31879 9.34223 7.05768 9.60334C6.79657 9.86445 6.66602 10.1783 6.66602 10.545C6.66602 10.9117 6.79657 11.2256 7.05768 11.4867C7.31879 11.7478 7.63268 11.8783 7.99935 11.8783ZM5.99935 5.87834H9.99935V4.545C9.99935 3.98945 9.8049 3.51723 9.41602 3.12834C9.02713 2.73945 8.5549 2.545 7.99935 2.545C7.44379 2.545 6.97157 2.73945 6.58268 3.12834C6.19379 3.51723 5.99935 3.98945 5.99935 4.545V5.87834Z"
/>
<path d="M3.99935 15.2117C3.63268 15.2117 3.31879 15.0811 3.05768 14.82C2.79657 14.5589 2.66602 14.245 2.66602 13.8783V7.21167C2.66602 6.845 2.79657 6.53111 3.05768 6.27C3.31879 6.00889 3.63268 5.87834 3.99935 5.87834H4.66602V4.545C4.66602 3.62278 4.99102 2.83667 5.64102 2.18667C6.29102 1.53667 7.07713 1.21167 7.99935 1.21167C8.92157 1.21167 9.70768 1.53667 10.3577 2.18667C11.0077 2.83667 11.3327 3.62278 11.3327 4.545V5.87834H11.9993C12.366 5.87834 12.6799 6.00889 12.941 6.27C13.2021 6.53111 13.3327 6.845 13.3327 7.21167V13.8783C13.3327 14.245 13.2021 14.5589 12.941 14.82C12.6799 15.0811 12.366 15.2117 11.9993 15.2117H3.99935ZM3.99935 13.8783H11.9993V7.21167H3.99935V13.8783ZM7.99935 11.8783C8.36602 11.8783 8.6799 11.7478 8.94102 11.4867C9.20213 11.2256 9.33268 10.9117 9.33268 10.545C9.33268 10.1783 9.20213 9.86445 8.94102 9.60334C8.6799 9.34223 8.36602 9.21167 7.99935 9.21167C7.63268 9.21167 7.31879 9.34223 7.05768 9.60334C6.79657 9.86445 6.66602 10.1783 6.66602 10.545C6.66602 10.9117 6.79657 11.2256 7.05768 11.4867C7.31879 11.7478 7.63268 11.8783 7.99935 11.8783ZM5.99935 5.87834H9.99935V4.545C9.99935 3.98945 9.8049 3.51723 9.41602 3.12834C9.02713 2.73945 8.5549 2.545 7.99935 2.545C7.44379 2.545 6.97157 2.73945 6.58268 3.12834C6.19379 3.51723 5.99935 3.98945 5.99935 4.545V5.87834Z" />
</Icon>
);
};
8 changes: 8 additions & 0 deletions service/license/src/components/icons/PersonIcon.tsx
@@ -0,0 +1,8 @@
import { Icon, IconProps } from '@chakra-ui/react';
export const PersonIcon = (props: IconProps) => {
return (
<Icon w="16px" h="16px" viewBox="0 0 17 17" fill="#000" {...props}>
<path d="M7.99935 8.67074C7.26602 8.67074 6.63824 8.40963 6.11602 7.8874C5.59379 7.36518 5.33268 6.7374 5.33268 6.00407C5.33268 5.27074 5.59379 4.64296 6.11602 4.12074C6.63824 3.59851 7.26602 3.3374 7.99935 3.3374C8.73268 3.3374 9.36046 3.59851 9.88268 4.12074C10.4049 4.64296 10.666 5.27074 10.666 6.00407C10.666 6.7374 10.4049 7.36518 9.88268 7.8874C9.36046 8.40963 8.73268 8.67074 7.99935 8.67074ZM2.66602 14.0041V12.1374C2.66602 11.7596 2.76324 11.4124 2.95768 11.0957C3.15213 10.7791 3.41046 10.5374 3.73268 10.3707C4.42157 10.0263 5.12157 9.76796 5.83268 9.59574C6.54379 9.42351 7.26602 9.3374 7.99935 9.3374C8.73268 9.3374 9.4549 9.42351 10.166 9.59574C10.8771 9.76796 11.5771 10.0263 12.266 10.3707C12.5882 10.5374 12.8466 10.7791 13.041 11.0957C13.2355 11.4124 13.3327 11.7596 13.3327 12.1374V14.0041H2.66602ZM3.99935 12.6707H11.9993V12.1374C11.9993 12.0152 11.9688 11.9041 11.9077 11.8041C11.8466 11.7041 11.766 11.6263 11.666 11.5707C11.066 11.2707 10.4605 11.0457 9.84935 10.8957C9.23824 10.7457 8.62157 10.6707 7.99935 10.6707C7.37713 10.6707 6.76046 10.7457 6.14935 10.8957C5.53824 11.0457 4.93268 11.2707 4.33268 11.5707C4.23268 11.6263 4.15213 11.7041 4.09102 11.8041C4.0299 11.9041 3.99935 12.0152 3.99935 12.1374V12.6707ZM7.99935 7.3374C8.36602 7.3374 8.6799 7.20685 8.94102 6.94574C9.20213 6.68462 9.33268 6.37074 9.33268 6.00407C9.33268 5.6374 9.20213 5.32351 8.94102 5.0624C8.6799 4.80129 8.36602 4.67074 7.99935 4.67074C7.63268 4.67074 7.31879 4.80129 7.05768 5.0624C6.79657 5.32351 6.66602 5.6374 6.66602 6.00407C6.66602 6.37074 6.79657 6.68462 7.05768 6.94574C7.31879 7.20685 7.63268 7.3374 7.99935 7.3374Z" />
</Icon>
);
};
9 changes: 9 additions & 0 deletions service/license/src/components/icons/SafetyIcon.tsx
@@ -0,0 +1,9 @@
import { Icon, IconProps } from '@chakra-ui/react';
export const SafetyIcon = (props: IconProps) => {
return (
<Icon w={'16px'} h="16px" viewBox="0 0 17 17" fill="#000" {...props}>
<path d="M8.5 1.18118L2.5 3.18118V9.18118C2.5 12.4952 5.18594 15.1812 8.5 15.1812C11.8141 15.1812 14.5 12.4952 14.5 9.18118V3.18118L8.5 1.18118ZM13.375 9.18118C13.375 11.8734 11.1922 14.0562 8.5 14.0562C5.80781 14.0562 3.625 11.8734 3.625 9.18118V4.02493L8.5 2.30618L13.375 4.02493V9.18118Z" />
<path d="M6.41173 7.60462C6.35959 7.55225 6.29763 7.51069 6.22939 7.48233C6.16114 7.45397 6.08797 7.43938 6.01407 7.43938C5.94017 7.43938 5.867 7.45397 5.79876 7.48233C5.73052 7.51069 5.66855 7.55225 5.61642 7.60462C5.56404 7.65676 5.52248 7.71872 5.49413 7.78697C5.46577 7.85521 5.45117 7.92838 5.45117 8.00228C5.45117 8.07618 5.46577 8.14935 5.49413 8.21759C5.52248 8.28583 5.56404 8.3478 5.61642 8.39993L7.63829 10.4218L7.6711 10.4546C7.72042 10.504 7.77899 10.5432 7.84348 10.57C7.90796 10.5967 7.97708 10.6105 8.04689 10.6105C8.11669 10.6105 8.18582 10.5967 8.2503 10.57C8.31478 10.5432 8.37335 10.504 8.42267 10.4546L11.9149 6.96243C11.9643 6.91312 12.0035 6.85454 12.0302 6.79006C12.0569 6.72558 12.0707 6.65646 12.0707 6.58665C12.0707 6.51684 12.0569 6.44772 12.0302 6.38324C12.0035 6.31876 11.9643 6.26019 11.9149 6.21087L11.8711 6.16712C11.8218 6.11771 11.7632 6.07852 11.6987 6.05177C11.6343 6.02503 11.5651 6.01126 11.4953 6.01126C11.4255 6.01126 11.3564 6.02503 11.2919 6.05177C11.2274 6.07852 11.1689 6.11771 11.1195 6.16712L8.0461 9.239L6.41173 7.60462Z" />
</Icon>
);
};
2 changes: 2 additions & 0 deletions service/license/src/components/icons/index.ts
Expand Up @@ -15,3 +15,5 @@ export * from './WechatIcon';
export * from './WarningIcon';
export * from './CloseIcon';
export * from './LockIcon';
export * from './SafetyIcon';
export * from './PersonIcon';
6 changes: 3 additions & 3 deletions service/license/src/components/signin/auth/usePassword.tsx
Expand Up @@ -5,7 +5,7 @@ import { TUserExist } from '@/types/user';
import { Flex, Image, Img, Input, InputGroup, InputLeftAddon, Text } from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import { useRouter } from 'next/router';
import { LocklIcon } from '@/components/icons';
import { LocklIcon, PersonIcon } from '@/components/icons';
import { useState } from 'react';
import { useForm } from 'react-hook-form';

Expand Down Expand Up @@ -113,7 +113,7 @@ export default function usePassword({
border="1px solid #E5E5E5"
>
<InputLeftAddon>
<Image alt="person" src={'/images/person.svg'} onClick={() => setUserExist(true)} />
<PersonIcon />
</InputLeftAddon>
<Input
type="text"
Expand Down Expand Up @@ -147,7 +147,7 @@ export default function usePassword({
border="1px solid #E5E5E5"
>
<InputLeftAddon>
<Image alt="person" src={'images/lock.svg'} />
<LocklIcon />
</InputLeftAddon>
<Input
type="password"
Expand Down
3 changes: 2 additions & 1 deletion service/license/src/components/signin/auth/useSms.tsx
@@ -1,3 +1,4 @@
import { SafetyIcon } from '@/components/icons';
import request from '@/services/request';
import useSessionStore from '@/stores/session';
import { ApiResp, Session } from '@/types';
Expand Down Expand Up @@ -165,7 +166,7 @@ export default function useSms({
border="1px solid #E5E5E5"
>
<InputLeftAddon>
<Image src="/images/ant-design_safety-outlined.svg" alt="safety" />
<SafetyIcon />
</InputLeftAddon>
<Input
type="text"
Expand Down
1 change: 0 additions & 1 deletion service/license/src/components/signin/index.tsx
Expand Up @@ -30,7 +30,6 @@ export default function SigninComponent() {
const { data: platformEnv } = useQuery(['getPlatformEnv'], () =>
request<any, ApiResp<SystemEnv>>('/api/platform/getEnv')
);
console.log('123');

const {
service_protocol = '',
Expand Down
6 changes: 3 additions & 3 deletions service/license/src/pages/404.tsx
Expand Up @@ -3,9 +3,9 @@ import { useRouter } from 'next/router';

const NonePage = () => {
const router = useRouter();
useEffect(() => {
router.push('/');
}, [router]);
// useEffect(() => {
// router.push('/');
// }, [router]);

return <div></div>;
};
Expand Down
76 changes: 0 additions & 76 deletions service/license/src/pages/api/auth/namespace/abdicate.ts

This file was deleted.

80 changes: 0 additions & 80 deletions service/license/src/pages/api/auth/namespace/create.ts

This file was deleted.

65 changes: 0 additions & 65 deletions service/license/src/pages/api/auth/namespace/delete.ts

This file was deleted.

0 comments on commit b44816f

Please sign in to comment.