Skip to content

Commit 63e512c

Browse files
committed
style: electron win
1 parent c64e2ec commit 63e512c

5 files changed

Lines changed: 16 additions & 13 deletions

File tree

chat2db-client/src/blocks/AppTitleBar/index.less

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import '../../styles/var.less';
22

33
.appTitleBar {
4-
background-color: var(--color-primary-bg);
4+
background-color: var(--color-bg-subtle);
55
-webkit-app-region: drag;
66
-webkit-user-select: none;
77
border-bottom: 1px solid var(--color-border);
@@ -18,8 +18,9 @@
1818
height: 100%;
1919
.appName {
2020
flex: 1;
21-
text-align: center;
21+
text-align: start;
2222
font-weight: bold;
23+
padding-left: 6px;
2324
}
2425
.rightSlot,.leftSlot{
2526
height: 100%;

chat2db-client/src/blocks/AppTitleBar/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default memo<IProps>((props) => {
2323
return window.electronApi?.getPlatform().isMac;
2424
}, []);
2525

26-
// const isWin = true;
26+
// const isMac = false;
2727

2828
const handleDoubleClick = () => {
2929
window.electronApi?.setMaximize();
@@ -49,22 +49,22 @@ export default memo<IProps>((props) => {
4949
return (
5050
<div className={classnames(styles.appTitleBar, className)} onDoubleClick={handleDoubleClick}>
5151
<div className={styles.appTitleBarGlobal}>
52-
<div className={classnames({ [styles.windowsSpacer]: (!isMac && isMac !== void 0) }, styles.leftSlot)}>
53-
{(!isMac && isMac !== void 0) && <BrandLogo size={20} className={styles.brandLogo} />}
52+
<div className={classnames(styles.leftSlot)}>
53+
<BrandLogo size={20} className={styles.brandLogo} />
5454
</div>
55-
<div className={styles.appName}>Chat2DB Community</div>
55+
<div className={styles.appName}>Chat2DB</div>
5656
<div className={styles.rightSlot}>{appTitleBarRightComponent}</div>
5757
</div>
5858
{(!isMac && isMac !== void 0) && (
5959
<div className={styles.windowsCloseBar}>
6060
<div className={styles.windowsCloseBarItem} onClick={handelMinimizeWindow}>
61-
<Iconfont size={16} code="&#xe671;" />
61+
<Iconfont size={13} code="&#xe671;" />
6262
</div>
6363
<div className={styles.windowsCloseBarItem} onClick={handelMaximize}>
64-
{isMaximized ? <Iconfont code="&#xe66e;" /> : <Iconfont code="&#xe66b;" />}
64+
{isMaximized ? <Iconfont size={13} code="&#xe66e;" /> : <Iconfont size={12} code="&#xe66b;" />}
6565
</div>
6666
<div className={styles.windowsCloseBarItem} onClick={handelCloseWindow}>
67-
<Iconfont code="&#xe66f;" />
67+
<Iconfont size={12} code="&#xe66f;" />
6868
</div>
6969
</div>
7070
)}

chat2db-client/src/components/CustomLayout/index.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
.customLayout {
44
display: flex;
55
align-items: center;
6+
margin: 0px -3px;
67
.iconPanel {
78
display: flex;
89
align-items: center;
910
justify-content: center;
10-
margin: 0px 5px;
11+
margin: 0px 3px;
1112
border-radius: 3px;
1213
height: 20px;
1314
width: 20px;
@@ -16,7 +17,8 @@
1617
background-color: var(--color-hover-bg);
1718
}
1819
i {
19-
font-size: 18px;
20+
font-size: 15px;
21+
color: var(--color-text-secondary);
2022
}
2123
}
2224
}

chat2db-client/src/pages/main/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
justify-content: space-between;
1616
align-items: center;
1717
width: 52px;
18-
padding-top: 20px;
18+
padding-top: 10px;
1919
background-color: var(--color-bg-subtle);
2020
border-right: 1px solid var(--color-border-secondary);
2121
user-select: none;

chat2db-client/src/pages/main/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function MainPage() {
188188
return (
189189
<div className={styles.page}>
190190
<div className={styles.layoutLeft}>
191-
{(isMac || isMac === void 0) && <BrandLogo size={40} className={styles.brandLogo} />}
191+
{/* {(isMac || isMac === void 0) && <BrandLogo size={40} className={styles.brandLogo} />} */}
192192
<ul className={styles.navList}>
193193
{navConfig.map((item) => {
194194
return (

0 commit comments

Comments
 (0)