Skip to content

Commit 233a610

Browse files
committed
feat: add dark mode
1 parent 52437e4 commit 233a610

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

copilot/Sender/index.axml

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717
confirm-type="send"
1818
onInput="handleInput"
1919
/>
20-
<!-- <ant-textarea
21-
className="ant-copilot-sender-input"
22-
value="{{value}}"
23-
placeholder="{{placeholder}}"
24-
maxLength="{{-1}}"
25-
showCount="{{false}}"
26-
disabled="{{disabled}}"
27-
autoHeight
28-
onChange="onChange"
29-
></ant-textarea> -->
3020
</view>
3121
<slot name="suffix"></slot>
3222
<view class="ant-copilot-sender-content-button {{loading ? 'loading' : ''}}" onTap="handleMainBtn"></view>

copilot/Sender/index.less

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
&-contain {
1010
display: flex;
1111
flex-direction: column;
12-
background: #ffffff;
12+
background: @sender-background-color;
1313
box-shadow: 0 6rpx 16rpx -8rpx rgba(0, 10, 26, 0.08),
1414
0 9rpx 28rpx 0 rgba(0, 10, 26, 0.05),
1515
0 12rpx 48rpx 16rpx rgba(0, 10, 26, 0.03);
@@ -34,6 +34,7 @@
3434
padding: 0;
3535
font-size: 30rpx;
3636
line-height: 48rpx;
37+
background: @sender-background-color;
3738
color: @sender-input-text-color;
3839
caret-color: @sender-input-caret-color;
3940
max-height: @sender-max-height;

copilot/Sender/variable.less

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
// 背景色
55
@sender-background-color: var(--sender-background-color, #ffffff);
66

7-
// 文本颜色
8-
@sender-text-color: var(--sender-text-color, #333333);
9-
107
// 占位符颜色
118
@sender-placeholder-color: var(--sender-placeholder-color, rgba(0, 0, 0, 0.25));
129

1310
// 发送按钮颜色
14-
@sender-send-color: var(--sender-send-color, #1677ff);
11+
// @sender-send-color: var(--sender-send-color, #1677ff);
1512

1613
// 输入框文本颜色
1714
@sender-input-text-color: var(--sender-input-text-color, #000000);

src/style/themes/theme-black.less

+24
Original file line numberDiff line numberDiff line change
@@ -531,4 +531,28 @@ page {
531531
--conversations-swipe-item-view-label-color: rgba(255, 255, 255, 0.88);
532532
--conversations-swipe-item-view-timestamp-color: #b0b0b0;
533533
--conversations-swipe-item-view-desc-color: rgba(255, 255, 255, 0.45);
534+
535+
// suggestion
536+
--suggestion-item-border-color: rgba(255, 255, 255, 0.15);
537+
--suggestion-item-text-color: rgba(255, 255, 255, 0.85);
538+
539+
// actions
540+
--actions-background-color: #1f1f1f;
541+
--actions-item-hover-background-color: #2f2f2f;
542+
543+
// bubble
544+
--bubble-background-color: #1f1f1f;
545+
--bubble-user-background-color: #1668dc; // 深色模式下稍微暗一点的蓝色
546+
--bubble-text-color: rgba(255, 255, 255, 0.85);
547+
--bubble-text-color-user: #ffffff;
548+
549+
// sender
550+
--sender-background-color: #141414;
551+
--sender-text-color: rgba(255, 255, 255, 0.85);
552+
--sender-placeholder-color: rgba(255, 255, 255, 0.3);
553+
--sender-send-color: #1668dc;
554+
--sender-input-text-color: rgba(255, 255, 255, 0.85);
555+
--sender-input-caret-color: #1668dc;
556+
--sender-focus-border-color: #1668dc;
557+
--sender-max-height: 192rpx; // 保持不变
534558
}

0 commit comments

Comments
 (0)