Skip to content

Commit 2c83b11

Browse files
committed
feat: improve QQLogin interface appearance
1 parent f399ce4 commit 2c83b11

File tree

2 files changed

+108
-62
lines changed

2 files changed

+108
-62
lines changed

src/apps/QQLogin.jsx

Lines changed: 107 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,60 @@ const Wrap = styled.div`
1111
height: 100%;
1212
display: flex;
1313
flex-direction: column;
14-
background: #dce8f7;
14+
background: linear-gradient(135deg, #dce8f7 0%, #c8d8e8 100%);
1515
font-family: 'Microsoft YaHei', '微软雅黑', Tahoma, sans-serif;
1616
font-size: 12px;
1717
user-select: none;
18+
position: relative;
19+
overflow: hidden;
20+
21+
&::before {
22+
content: '';
23+
position: absolute;
24+
top: 0;
25+
left: 0;
26+
right: 0;
27+
bottom: 0;
28+
background-image:
29+
repeating-linear-gradient(
30+
45deg,
31+
transparent,
32+
transparent 2px,
33+
rgba(255,255,255,0.1) 2px,
34+
rgba(255,255,255,0.1) 4px
35+
);
36+
pointer-events: none;
37+
opacity: 0.3;
38+
}
1839
`;
1940

2041
const Header = styled.div`
21-
background: linear-gradient(to bottom, #4a90d9 0%, #2a6db5 100%);
42+
background: linear-gradient(to bottom, #4a90d9 0%, #3a7bd5 50%, #2a6bc5 100%);
2243
padding: 16px 14px 12px;
2344
display: flex;
2445
align-items: flex-end;
2546
gap: 10px;
47+
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
48+
position: relative;
49+
overflow: hidden;
50+
51+
&::before {
52+
content: '';
53+
position: absolute;
54+
top: 0;
55+
left: 0;
56+
right: 0;
57+
bottom: 0;
58+
background-image:
59+
repeating-linear-gradient(
60+
45deg,
61+
transparent,
62+
transparent 3px,
63+
rgba(255,255,255,0.1) 3px,
64+
rgba(255,255,255,0.1) 6px
65+
);
66+
pointer-events: none;
67+
}
2668
`;
2769

2870
const Penguin = () => (
@@ -40,6 +82,9 @@ const Penguin = () => (
4082
<circle cx="30" cy="16" r="3" fill="white"/>
4183
<circle cx="22.8" cy="16.5" r="1.5" fill="#1a1a1a"/>
4284
<circle cx="30.8" cy="16.5" r="1.5" fill="#1a1a1a"/>
85+
{/* 高光 */}
86+
<circle cx="21.5" cy="15.5" r="1" fill="#ffffff"/>
87+
<circle cx="29.5" cy="15.5" r="1" fill="#ffffff"/>
4388
{/* 嘴 */}
4489
<ellipse cx="26" cy="22" rx="4" ry="2.5" fill="#f0a020"/>
4590
{/* 翅膀 */}
@@ -50,21 +95,27 @@ const Penguin = () => (
5095
<ellipse cx="32" cy="58" rx="6" ry="3" fill="#f0a020"/>
5196
{/* 围巾/领结 */}
5297
<rect x="19" y="28" width="14" height="4" rx="2" fill="#e8001c"/>
98+
{/* 围巾细节 */}
99+
<rect x="18" y="27" width="2" height="6" fill="#c00"/>
100+
<rect x="32" y="27" width="2" height="6" fill="#c00"/>
53101
</svg>
54102
);
55103

56104
const HeaderText = styled.div`
57105
color: white;
58106
line-height: 1.4;
107+
position: relative;
108+
z-index: 1;
59109
60110
.title {
61111
font-size: 18px;
62112
font-weight: bold;
63-
text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
113+
text-shadow: 1px 1px 2px rgba(0,0,0,0.4), 0 0 3px rgba(255,255,255,0.3);
64114
}
65115
.version {
66116
font-size: 11px;
67117
color: #c8dff8;
118+
text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
68119
}
69120
`;
70121

@@ -87,12 +138,13 @@ const Avatar = styled.div`
87138
width: 52px;
88139
height: 52px;
89140
border-radius: 6px;
90-
background: linear-gradient(135deg, #b8d4f0 0%, #7fb0e0 100%);
141+
background: linear-gradient(135deg, #b8d4f0 0%, #7fb0e0 50%, #9cc6e8 100%);
91142
border: 2px solid #aac8e8;
92143
display: flex;
93144
align-items: center;
94145
justify-content: center;
95146
font-size: 28px;
147+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
96148
`;
97149

98150
const FieldRow = styled.div`
@@ -105,22 +157,24 @@ const FieldRow = styled.div`
105157
text-align: right;
106158
color: #444;
107159
flex-shrink: 0;
160+
text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
108161
}
109162
110163
input {
111164
flex: 1;
112165
height: 22px;
113166
border: 1px solid #8eb4d8;
114-
border-radius: 2px;
167+
border-radius: 3px;
115168
padding: 0 6px;
116169
font-size: 12px;
117170
font-family: inherit;
118171
background: white;
119172
outline: none;
173+
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
120174
121175
&:focus {
122176
border-color: #3a7bd5;
123-
box-shadow: 0 0 3px rgba(58,123,213,0.4);
177+
box-shadow: 0 0 0 2px rgba(58,123,213,0.2), inset 0 1px 2px rgba(0,0,0,0.1);
124178
}
125179
}
126180
`;
@@ -136,20 +190,28 @@ const CheckRow = styled.div`
136190
gap: 4px;
137191
color: #444;
138192
cursor: pointer;
193+
text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
194+
195+
input[type="checkbox"] {
196+
width: 13px;
197+
height: 13px;
198+
cursor: pointer;
199+
}
139200
}
140201
`;
141202

142203
const Divider = styled.div`
143204
height: 1px;
144-
background: #b0c8e0;
145-
margin: 2px 0;
205+
background: linear-gradient(to right, transparent 0%, #b0c8e0 50%, transparent 100%);
206+
margin: 4px 0;
207+
box-shadow: 0 1px 0 rgba(255,255,255,0.3);
146208
`;
147209

148210
const ButtonRow = styled.div`
149211
display: flex;
150212
justify-content: center;
151213
gap: 10px;
152-
padding-top: 4px;
214+
padding-top: 8px;
153215
`;
154216

155217
const Btn = styled.button`
@@ -160,37 +222,65 @@ const Btn = styled.button`
160222
font-family: inherit;
161223
cursor: pointer;
162224
border: 1px solid;
225+
position: relative;
226+
overflow: hidden;
163227
164228
${p => p.$primary ? `
165-
background: linear-gradient(to bottom, #5ba3e8 0%, #2878d6 100%);
229+
background: linear-gradient(to bottom, #7cb3f0 0%, #5a93e0 50%, #3a7bd5 100%);
166230
color: white;
167231
border-color: #1a5cb5;
168-
&:hover { filter: brightness(1.08); }
169-
&:active { filter: brightness(0.92); }
232+
text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
233+
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
234+
235+
&:hover {
236+
background: linear-gradient(to bottom, #8cc4f0 0%, #6ba4e0 50%, #4a8bd5 100%);
237+
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
238+
}
239+
&:active {
240+
background: linear-gradient(to bottom, #3a7bd5 0%, #2a6bc5 50%, #1a5cb5 100%);
241+
box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
242+
}
170243
` : `
171-
background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 100%);
244+
background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 50%, #d0d0d0 100%);
172245
color: #333;
173246
border-color: #aaa;
174-
&:hover { background: linear-gradient(to bottom, #fff 0%, #e8e8e8 100%); }
175-
&:active { filter: brightness(0.92); }
247+
text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
248+
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
249+
250+
&:hover {
251+
background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 50%, #d8d8d8 100%);
252+
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
253+
}
254+
&:active {
255+
background: linear-gradient(to bottom, #d0d0d0 0%, #c0c0c0 50%, #b0b0b0 100%);
256+
box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
257+
}
176258
`}
177259
`;
178260

179261
const Footer = styled.div`
180-
background: #c8daf0;
262+
background: linear-gradient(to bottom, #c8daf0 0%, #b8c8d8 100%);
181263
border-top: 1px solid #aac0dc;
182264
padding: 5px 14px;
183265
display: flex;
184266
justify-content: space-between;
185267
align-items: center;
186268
font-size: 11px;
187269
color: #5577aa;
270+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
188271
189272
a {
190273
color: #2255aa;
191274
text-decoration: none;
192275
cursor: pointer;
193-
&:hover { text-decoration: underline; }
276+
text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
277+
padding: 2px 4px;
278+
border-radius: 2px;
279+
280+
&:hover {
281+
text-decoration: underline;
282+
background: rgba(255,255,255,0.3);
283+
}
194284
}
195285
`;
196286

src/components/Taskbar.jsx

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -660,51 +660,7 @@ const Taskbar = () => {
660660
>
661661
<XPIcon name="sound" size={16} color="white" />
662662
</div>
663-
<div
664-
style={{ marginRight: '10px', display: 'flex', alignItems: 'center', cursor: 'pointer' }}
665-
title="QQ — 右键更多选项"
666-
onClick={(e) => { e.stopPropagation(); handleLaunch('QQ'); }}
667-
onContextMenu={handleQqContextMenu}
668-
>
669-
<XPIcon name="qq" size={16} color="white" />
670-
</div>
671-
{qqContextMenu && (
672-
<div
673-
ref={qqContextMenuRef}
674-
style={{
675-
position: 'fixed',
676-
left: qqContextMenu.x,
677-
bottom: 32,
678-
background: '#f5f5f5',
679-
border: '1px solid #999',
680-
boxShadow: '2px 2px 4px rgba(0,0,0,0.3)',
681-
zIndex: 2147483647,
682-
minWidth: '120px',
683-
padding: '2px 0',
684-
fontSize: '12px'
685-
}}
686-
>
687-
{[
688-
{ label: '打开QQ', action: 'open' },
689-
{ label: '打开QQ空间', action: 'space' },
690-
{ label: '打开QQ邮箱', action: 'mail' },
691-
{ label: null },
692-
{ label: '退出QQ', action: 'exit' }
693-
].map((item, i) => item.label === null ? (
694-
<div key={i} style={{ height: '1px', background: '#ccc', margin: '2px 0' }} />
695-
) : (
696-
<div
697-
key={i}
698-
style={{ padding: '4px 16px', cursor: 'pointer', color: '#000' }}
699-
onMouseEnter={(e) => { e.target.style.background = '#0078d7'; e.target.style.color = '#fff'; }}
700-
onMouseLeave={(e) => { e.target.style.background = 'transparent'; e.target.style.color = '#000'; }}
701-
onClick={() => handleQqMenuAction(item.action)}
702-
>
703-
{item.label}
704-
</div>
705-
))}
706-
</div>
707-
)}
663+
{/* QQ tray icon is now dynamically registered by QQLogin component */}
708664
<div
709665
style={{ marginRight: '10px', display: 'flex', alignItems: 'center' }}
710666
title="网络已连接"

0 commit comments

Comments
 (0)