Skip to content

Commit 1634bf6

Browse files
committed
feat: add version in header
1 parent 1d69268 commit 1634bf6

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "CCEditor",
33
"private": true,
4-
"version": "1.0.0",
4+
"version": "1.0.3",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/components/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import { createBlackImage } from "../tools/images";
5858
import { ToolTab } from "./tabs/ToolTab";
5959
import { useGlobalPaste } from "./useGlobalPaste";
6060
import { StartPanel } from "./StartPanel/StartPanel";
61+
import pkgJson from "../../package.json";
6162

6263
function getDefaultFormData() {
6364
return {
@@ -352,7 +353,9 @@ export function App() {
352353
<Text weight="bold" size={500}>
353354
🎭
354355
</Text>
355-
<Text className={styles.appName}>CC Editor</Text>
356+
<Text className={styles.appName}>
357+
CC Editor <small>v{pkgJson.version}</small>
358+
</Text>
356359
</div>
357360
<div className={styles.headerRight}>
358361
<LangSwitch />

src/components/useStyles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ export const useStyles = makeStyles({
3232
appName: {
3333
fontSize: tokens.fontSizeHero700,
3434
fontWeight: tokens.fontWeightSemibold,
35+
36+
"& small": {
37+
fontSize: tokens.fontSizeBase300,
38+
fontWeight: tokens.fontWeightRegular,
39+
},
3540
},
3641
mainContent: {
3742
padding: tokens.spacingHorizontalXXL,

0 commit comments

Comments
 (0)