Skip to content

Commit

Permalink
Merge pull request #30 from zCloak-Network/dev
Browse files Browse the repository at this point in the history
v20240507
  • Loading branch information
tower1229 authored May 7, 2024
2 parents 785d736 + 74b7c93 commit e32bad3
Show file tree
Hide file tree
Showing 75 changed files with 3,022 additions and 523 deletions.
10 changes: 0 additions & 10 deletions .env

This file was deleted.

4 changes: 3 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ VITE_APP_CANISTER_ID=bkyz2-fmaaa-aaaaa-qaaaq-cai
VITE_APP_CANISTER_HOST=http://127.0.0.1:4943

VITE_APP_CARD_SERVICE=https://card-service.zkid.xyz
VITE_APP_VALID_3_SERVICE=https://valid3-service.zkid.xyz
VITE_APP_VALID_3_SERVICE=https://valid3-service.zkid.xyz

VITE_APP_TELEGRAM_BOT_URL=https://t.me/DevValidIdBot
4 changes: 3 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ VITE_APP_CANISTER_ID=ihth6-nqaaa-aaaam-acf7a-cai
VITE_APP_CANISTER_HOST=https://valid.one

VITE_APP_CARD_SERVICE=https://card-service.zkid.app
VITE_APP_VALID_3_SERVICE=https://valid3-service.valid3.id
VITE_APP_VALID_3_SERVICE=https://valid3-service.valid3.id

VITE_APP_TELEGRAM_BOT_URL=https://t.me/valid_1_bot
10 changes: 10 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

VITE_APP_VALID_ID_URL=https://valid3.zkid.xyz

VITE_APP_CANISTER_ID=mihic-qqaaa-aaaap-ahaqq-cai
VITE_APP_CANISTER_HOST=https://zkid.io

VITE_APP_CARD_SERVICE=https://card-service.zkid.xyz
VITE_APP_VALID_3_SERVICE=https://valid3-service.zkid.xyz

VITE_APP_TELEGRAM_BOT_URL=https://t.me/DevValidIdBot
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
Expand All @@ -23,5 +22,3 @@ dist-ssr
*.sln
*.sw?

.dfx/
.env
14 changes: 0 additions & 14 deletions dfx.json

This file was deleted.

8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Valid One</title>
<link rel="shortcut icon" href="/images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/images/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/images/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/images/apple-touch-icon.png" />
<meta name="description" content="An easy-onboard, secure identity management solution">
<meta name="theme-color" content="#FFF">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:[email protected]&family=Quantico&display=swap"
Expand All @@ -19,6 +26,7 @@

gtag('config', 'G-QTH989D933');
</script>

</head>

<body>
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite --port 3000",
"build:test": "vite build --mode test",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
Expand Down Expand Up @@ -55,6 +56,7 @@
"typescript": "^5.2.2",
"vite": "^5.1.6",
"vite-plugin-node-polyfills": "^0.21.0",
"vite-plugin-pwa": "^0.19.8",
"vite-plugin-svgr": "^4.2.0"
}
}
}
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/narrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pwa-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pwa-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pwa-maskable-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pwa-maskable-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/wide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
18 changes: 18 additions & 0 deletions src/api/challenge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { axiosInstance } from "@/utils";

export const getChallenge = (params: { id: string }) => {
return axiosInstance.get(`/api/valid-one/challenge`, {
params,
baseURL: import.meta.env.VITE_APP_VALID_3_SERVICE,
});
};

export const sendChallenge = (params: {
challengeId: string;
validId: number;
signature: string;
}) => {
return axiosInstance.post(`/api/valid-one/challenge`, params, {
baseURL: import.meta.env.VITE_APP_VALID_3_SERVICE,
});
};
1 change: 1 addition & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./cardService";
export * from "./valid3Service";
export * from "./challenge";
2 changes: 1 addition & 1 deletion src/app/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const navTabs: NavTab[] = [
},
];

export const hiddenPaths = ["/id/:validId", "/id/profile/edit"];
export const hiddenPaths = ["/", "/id/:validId", "/id/profile/edit"];

const Nav = () => {
const location = useLocation();
Expand Down
5 changes: 3 additions & 2 deletions src/app/account/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useCallback } from "react";
import { useNavigate } from "react-router-dom";
import { ethereumEncode } from "@zcloak/crypto";
import { FEEDBACK_FORM_URL } from "@/constants";
import DefaultAvatar from "@/assets/images/avatar.jpg";

export default observer(function AccountPage() {
const { User } = useStore();
Expand All @@ -14,14 +15,14 @@ export default observer(function AccountPage() {
navigate("/login");
}, [User]);
return (
<div className="h-[100vh] pb-20">
<div className="h-100vh pb-20">
<div className="flex flex-col bg-[#273238] h-[350px] w-full p-5 gap-8 items-center">
<div className="font-extrabold text-center text-white text-lg">
Account
</div>
<div className="avatar">
<div className="rounded-full border-4 border-neutral-400 w-20">
{User.profile?.avatar && <img src={User.profile?.avatar} />}
<img src={User.profile?.avatar || DefaultAvatar} />
</div>
</div>
<div className="font-bold h-4 text-center text-white text-base leading-relaxed w-64">
Expand Down
11 changes: 11 additions & 0 deletions src/app/challenge/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { default as ChallengePage, loader } from "./page";

const routers = [
{
path: "challenge/:challengeID",
element: <ChallengePage />,
loader,
},
];

export default routers;
Loading

0 comments on commit e32bad3

Please sign in to comment.