diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9e2b6b7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "rust-analyzer.showUnlinkedFileNotification": false, + "cssVariables.lookupFiles": [ + "**/*.css", + "**/*.scss", + "**/*.sass", + "**/*.less", + "node_modules/@mantine/core/styles.css" + ] +} diff --git a/license_ui/bun.lockb b/license_ui/bun.lockb index 72e4ca7..5443269 100755 Binary files a/license_ui/bun.lockb and b/license_ui/bun.lockb differ diff --git a/license_ui/package.json b/license_ui/package.json index ad9341b..c521811 100644 --- a/license_ui/package.json +++ b/license_ui/package.json @@ -15,6 +15,7 @@ "@mantine/form": "^7.7.1", "@mantine/hooks": "^7.7.1", "@mantine/modals": "^7.7.1", + "@tabler/icons-react": "^3.1.0", "clsx": "^2.0.0", "dayjs": "^1.11.10", "events": "^3.3.0", diff --git a/license_ui/public/vite.svg b/license_ui/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/license_ui/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/license_ui/src/App.css b/license_ui/src/App.css deleted file mode 100644 index b9d355d..0000000 --- a/license_ui/src/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/license_ui/src/App.module.css b/license_ui/src/App.module.css new file mode 100644 index 0000000..e4154db --- /dev/null +++ b/license_ui/src/App.module.css @@ -0,0 +1,13 @@ +.container { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: stretch; + gap: var(--mantine-space-lg); +} +.form-column { + flex-grow: 1; +} +.product-column { + flex-grow: 5; +} diff --git a/license_ui/src/App.tsx b/license_ui/src/App.tsx index afe48ac..a9f142d 100644 --- a/license_ui/src/App.tsx +++ b/license_ui/src/App.tsx @@ -1,35 +1,35 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' +import { Flex } from "@mantine/core"; +import classes from "./App.module.css"; +import { LicenseCode } from "./components/LicenseCode"; +import { LicenseForm } from "./components/LicenseForm"; +import { ProductList } from "./components/ProductList"; +import { Steps } from "./components/Steps"; function App() { - const [count, setCount] = useState(0) - return ( - <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- - ) + + + + + + + + + + + ); } -export default App +export default App; diff --git a/license_ui/src/assets/react.svg b/license_ui/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/license_ui/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/license_ui/src/components/LicenseCode.module.css b/license_ui/src/components/LicenseCode.module.css new file mode 100644 index 0000000..f8a43fd --- /dev/null +++ b/license_ui/src/components/LicenseCode.module.css @@ -0,0 +1,6 @@ +.container { + flex-grow: 1; +} +.license-code-area { + flex-grow: 1; +} diff --git a/license_ui/src/components/LicenseCode.tsx b/license_ui/src/components/LicenseCode.tsx new file mode 100644 index 0000000..23dd572 --- /dev/null +++ b/license_ui/src/components/LicenseCode.tsx @@ -0,0 +1,21 @@ +import { ActionIcon, Flex, Group, Paper, Textarea, Title, Tooltip } from "@mantine/core"; +import { IconCopy } from "@tabler/icons-react"; +import classes from "./LicenseCode.module.css"; + +export function LicenseCode() { + return ( + + + + 授权码 + + + + + + +