Skip to content

Commit 3cba4d3

Browse files
committed
style: 统一了导入组件和默认view的样式
1 parent 0b2df6f commit 3cba4d3

3 files changed

Lines changed: 41 additions & 56 deletions

File tree

src/assets/styles/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ body,
9090
stroke-width: 1.9;
9191
}
9292

93+
/* 背景icon样式 */
94+
.bg-icon {
95+
width: 64px;
96+
height: 64px;
97+
display: block;
98+
color: var(--icon-color);
99+
opacity: 0.6;
100+
flex-shrink: 0;
101+
stroke-width: 1.9;
102+
}
103+
93104
.icon-interactive {
94105
color: var(--icon-color);
95106
background: transparent;

src/components/common/FileImporter.vue

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
<template>
22
<div
33
class="file-importer"
4+
@click="triggerFileInput"
45
@dragover.prevent="isDragging = true"
56
@dragleave.prevent="isDragging = false"
67
@drop.prevent="handleDrop"
78
:class="{ 'is-dragging': isDragging }"
89
>
910
<div class="drop-zone">
10-
<div class="icon-container">
11-
<FolderOpen class="ui-icon icon" />
12-
</div>
11+
<FolderOpen class="bg-icon" />
1312
<h2 class="title">导入跑团 Log</h2>
14-
<p class="subtitle">将文件拖拽到此处,或点击</p>
13+
<p class="subtitle">将文件拖拽到此处, 或点击任意处导入文件</p>
1514

16-
<button class="browse-btn" @click="triggerFileInput">
17-
导入文件
18-
</button>
1915
<input
2016
type="file"
2117
ref="fileInput"
@@ -86,13 +82,10 @@ async function processFiles(files: File[]) {
8682

8783
<style scoped>
8884
.file-importer {
89-
height: 100%;
85+
flex: 1;
9086
display: flex;
9187
align-items: center;
9288
justify-content: center;
93-
background-color: var(--bg-workspace);
94-
color: var(--text-primary);
95-
transition: all 0.2s ease;
9689
}
9790
9891
.file-importer.is-dragging {
@@ -101,45 +94,29 @@ async function processFiles(files: File[]) {
10194
}
10295
10396
.drop-zone {
97+
display: flex;
98+
flex-direction: column;
99+
align-items: center;
104100
text-align: center;
105101
max-width: 400px;
106102
}
107103
108-
.icon-container .icon {
109-
width: 64px;
110-
height: 64px;
111-
opacity: 0.6;
112-
color: var(--icon-color);
113-
}
114-
115104
.title {
116-
font-size: 20px;
117-
margin: 16px 0 8px;
118-
color: var(--text-primary);
105+
font-size: 24px;
106+
font-weight: 600;
107+
color: var(--active-accent);
108+
opacity: 0.8;
119109
}
120110
121111
.subtitle {
122112
font-size: 14px;
123113
color: var(--text-muted);
124-
margin-bottom: 24px;
125-
}
126-
127-
.browse-btn {
128-
background-color: var(--active-accent);
129-
color: var(--bg-workspace);
130-
border: none;
131-
padding: 8px 24px;
132-
border-radius: 4px;
133-
cursor: pointer;
134-
}
135-
136-
.browse-btn:hover {
137-
opacity: 0.9;
138114
}
139115
140116
.shortcuts-hint {
141-
margin-top: 32px;
117+
margin-top: 24px;
142118
font-size: 12px;
119+
min-width: 200px;
143120
color: var(--text-muted);
144121
}
145122

src/components/workspace/DefaultView.vue

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@
1414

1515
<div class="welcome-content">
1616
<div class="welcome-container">
17-
<div class="icon-container">
18-
<Dices class="ui-icon icon" />
19-
</div>
20-
21-
<p class="kaomoji-egg">
17+
<Dices class="bg-icon" />
18+
<p class="kaomoji">
2219
{{ currentKaomoji.text }}
2320
</p>
21+
<p class="subtitle">从左侧场景列表中选择一个以开始编辑</p>
2422

2523
<div class="foot-hint">
2624
<div class="foot-hint-item">
27-
<span>Ctrl + K 查看帮助文档</span>
25+
<span>切换侧边栏</span>
26+
<span>Ctrl + B</span>
2827
</div>
2928
<div class="foot-hint-item">
30-
当前没有处于活跃状态的场景。
31-
<br />
32-
从左侧场景列表中选择一个以开始编辑。
29+
<span>打开帮助文档</span>
30+
<span>Ctrl + K</span>
3331
</div>
3432
</div>
3533
</div>
@@ -81,33 +79,32 @@ onMounted(() => {
8179
display: flex;
8280
flex-direction: column;
8381
align-items: center;
84-
max-width: 400px;
8582
text-align: center;
83+
max-width: 400px;
8684
}
8785
88-
.icon-container .icon {
89-
width: 64px;
90-
height: 64px;
91-
opacity: 0.6;
92-
color: var(--icon-color);
93-
}
94-
95-
.kaomoji-egg {
86+
.kaomoji {
9687
font-size: 24px;
97-
font-weight: normal;
88+
font-weight: 600;
9889
color: var(--active-accent);
9990
opacity: 0.8;
10091
}
10192
93+
.subtitle {
94+
font-size: 14px;
95+
color: var(--text-muted);
96+
}
97+
10298
.foot-hint {
10399
margin-top: 24px;
104100
font-size: 12px;
101+
min-width: 200px;
105102
color: var(--text-muted);
106103
}
107104
108105
.foot-hint-item {
109106
display: flex;
110-
justify-content: center;
107+
justify-content: space-between;
111108
margin: 4px 0;
112109
padding: 4px 8px;
113110
background-color: var(--bg-secondary);

0 commit comments

Comments
 (0)