Skip to content

Commit

Permalink
Session summary (#1072)
Browse files Browse the repository at this point in the history
* Add useTransactionSummary hook to utils

* Fix tailwind dark mode on keychain

* Mock summary data

* TransactionDetails -> SessionSummary

* Add accordion component

* Style sesstion summary card

* Style session contract icon

* Style typed data for sign messsage policy

* Remove old policies comp from create session page

* Show policy description as tooltip

* Collapsible sign message entries

* Set provider for sonner toaster in keychain

* Add explorer link for each contract

* Replace mock data with useSessionSummary hook
  • Loading branch information
JunichiSugiura authored Dec 2, 2024
1 parent da4a9c9 commit bd25e03
Show file tree
Hide file tree
Showing 33 changed files with 1,243 additions and 658 deletions.
4 changes: 2 additions & 2 deletions examples/get-starknet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"@emotion/react": "^11.11.1",
"cra-template-typescript": "1.2.0",
"get-starknet": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"starknet": "^6.6.0"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"next": "^14.2.5",
"next-themes": "^0.3.0",
"prettier": "^2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"starknet": "^6.11.0"
},
"devDependencies": {
"@cartridge/tsconfig": "workspace:^",
"@playwright/test": "^1.46.0",
"@types/node": "^20.6.0",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.18",
"eslint": "^8.23.0",
"eslint-config-next": "^12.2.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/keychain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"next": "^14.2.5",
"p-throttle": "^6.2.0",
"posthog-js": "^1.181.0",
"react": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.2.0",
"react-query": "^3.39.2",
"use-sound": "^4.0.1",
Expand All @@ -66,7 +66,7 @@
"@testing-library/react": "^13.4.0",
"@types/js-cookie": "^3.0.2",
"@types/node": "^20.6.0",
"@types/react-dom": "^18.2.7",
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.18",
"concurrently": "^9.0.1",
"eslint": "^8.23.0",
Expand Down
25 changes: 25 additions & 0 deletions packages/keychain/public/noflash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(function () {
const storageKey = "vite-ui-colorScheme";
const classNameDark = "dark";
const params = new URL(document.location).searchParams;
const colorScheme =
params.get("colorMode") ?? localStorage.getItem(storageKey) ?? "system";
const html = document.getElementsByTagName("html")[0];

switch (colorScheme) {
case "light":
break;
case "dark":
html.classList.add(classNameDark);
break;
case "system":
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
html.classList.add(classNameDark);
}
break;
default:
break;
}

localStorage.setItem(storageKey, colorScheme);
})();
Loading

0 comments on commit bd25e03

Please sign in to comment.