zen-gitsync 2.1.2 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +96 -96
- package/index.js +2 -2
- package/package.json +69 -66
- package/src/config.js +51 -51
- package/src/gitCommit.js +261 -261
- package/src/ui/public/assets/index-8gQo1ABk.js +20 -0
- package/src/ui/public/assets/index-IcGOG2Ja.css +1 -0
- package/src/ui/public/assets/{vendor-Dy1zosHw.js → vendor-Bm8yNvvz.js} +1 -1
- package/src/ui/public/favicon.svg +26 -26
- package/src/ui/public/index.html +3 -3
- package/src/ui/public/logo.svg +26 -26
- package/src/ui/server/index.js +141 -51
- package/src/ui/client/README.md +0 -5
- package/src/ui/client/auto-imports.d.ts +0 -10
- package/src/ui/client/components.d.ts +0 -33
- package/src/ui/client/index.html +0 -13
- package/src/ui/client/package.json +0 -28
- package/src/ui/client/public/favicon.svg +0 -27
- package/src/ui/client/public/logo.svg +0 -27
- package/src/ui/client/public/vite.svg +0 -1
- package/src/ui/client/src/App.vue +0 -984
- package/src/ui/client/src/assets/logo.svg +0 -27
- package/src/ui/client/src/components/CommitForm.vue +0 -2167
- package/src/ui/client/src/components/GitStatus.vue +0 -1621
- package/src/ui/client/src/components/LogList.vue +0 -1937
- package/src/ui/client/src/main.ts +0 -7
- package/src/ui/client/src/stores/configStore.ts +0 -212
- package/src/ui/client/src/stores/gitLogStore.ts +0 -790
- package/src/ui/client/src/stores/gitStore.ts +0 -443
- package/src/ui/client/src/vite-env.d.ts +0 -1
- package/src/ui/client/stats.html +0 -4949
- package/src/ui/client/tsconfig.app.json +0 -14
- package/src/ui/client/tsconfig.json +0 -7
- package/src/ui/client/tsconfig.node.json +0 -24
- package/src/ui/client/vite.config.ts +0 -50
- package/src/ui/public/assets/index-C0FIVyIy.css +0 -1
- package/src/ui/public/assets/index-FuuBZ-mS.js +0 -20
|
@@ -1,984 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref, onMounted } from 'vue'
|
|
3
|
-
import GitStatus from './components/GitStatus.vue'
|
|
4
|
-
import CommitForm from './components/CommitForm.vue'
|
|
5
|
-
import LogList from './components/LogList.vue'
|
|
6
|
-
import { ElMessage } from 'element-plus'
|
|
7
|
-
import { Plus, Setting } from '@element-plus/icons-vue'
|
|
8
|
-
import logo from './assets/logo.svg'
|
|
9
|
-
import { useGitStore } from './stores/gitStore'
|
|
10
|
-
import { useConfigStore } from './stores/configStore'
|
|
11
|
-
|
|
12
|
-
const configInfo = ref('')
|
|
13
|
-
// 添加组件实例类型
|
|
14
|
-
const logListRef = ref<InstanceType<typeof LogList> | null>(null)
|
|
15
|
-
const gitStatusRef = ref<InstanceType<typeof GitStatus> | null>(null)
|
|
16
|
-
|
|
17
|
-
// 使用Git Store
|
|
18
|
-
const gitStore = useGitStore()
|
|
19
|
-
// 使用Config Store
|
|
20
|
-
const configStore = useConfigStore()
|
|
21
|
-
|
|
22
|
-
// 添加初始化完成状态
|
|
23
|
-
const initCompleted = ref(false)
|
|
24
|
-
const currentDirectory = ref('')
|
|
25
|
-
|
|
26
|
-
// 加载配置
|
|
27
|
-
async function loadConfig() {
|
|
28
|
-
try {
|
|
29
|
-
const config = await configStore.loadConfig()
|
|
30
|
-
if (config) {
|
|
31
|
-
configInfo.value = `默认提交信息: ${config.defaultCommitMessage}`
|
|
32
|
-
}
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error('加载配置失败:', error)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// 加载当前目录信息
|
|
39
|
-
async function loadCurrentDirectory() {
|
|
40
|
-
try {
|
|
41
|
-
const responseDir = await fetch('/api/current_directory')
|
|
42
|
-
const dirData = await responseDir.json()
|
|
43
|
-
currentDirectory.value = dirData.directory || '未知目录'
|
|
44
|
-
return dirData
|
|
45
|
-
} catch (error) {
|
|
46
|
-
console.error('获取当前目录失败:', error)
|
|
47
|
-
return { directory: '未知目录', isGitRepo: false }
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
onMounted(async () => {
|
|
52
|
-
console.log('---------- 页面初始化开始 ----------')
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
// 并行加载配置和目录信息
|
|
56
|
-
const [_, dirData] = await Promise.all([
|
|
57
|
-
loadConfig(),
|
|
58
|
-
loadCurrentDirectory()
|
|
59
|
-
])
|
|
60
|
-
|
|
61
|
-
// 设置Git仓库状态
|
|
62
|
-
gitStore.isGitRepo = dirData.isGitRepo === true
|
|
63
|
-
gitStore.lastCheckedTime = Date.now()
|
|
64
|
-
|
|
65
|
-
// 只有是Git仓库的情况下才加载Git相关信息
|
|
66
|
-
if (gitStore.isGitRepo) {
|
|
67
|
-
// 并行获取所有Git信息,确保每个API只调用一次
|
|
68
|
-
await Promise.all([
|
|
69
|
-
gitStore.getCurrentBranch(), // 获取当前分支
|
|
70
|
-
gitStore.getAllBranches(), // 获取所有分支
|
|
71
|
-
gitStore.getUserInfo() // 获取用户信息
|
|
72
|
-
])
|
|
73
|
-
} else {
|
|
74
|
-
ElMessage.warning('当前目录不是Git仓库,部分功能将不可用')
|
|
75
|
-
}
|
|
76
|
-
} catch (error) {
|
|
77
|
-
console.error('初始化失败:', error)
|
|
78
|
-
} finally {
|
|
79
|
-
// 标记初始化完成
|
|
80
|
-
initCompleted.value = true
|
|
81
|
-
console.log('---------- 页面初始化完成 ----------')
|
|
82
|
-
|
|
83
|
-
// 无论是否是Git仓库,都应该加载布局比例
|
|
84
|
-
// 使用短延时确保DOM已完全渲染
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
loadLayoutRatios();
|
|
87
|
-
}, 100);
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
const createBranchDialogVisible = ref(false)
|
|
92
|
-
const newBranchName = ref('')
|
|
93
|
-
const selectedBaseBranch = ref('')
|
|
94
|
-
|
|
95
|
-
// 创建新分支
|
|
96
|
-
async function createNewBranch() {
|
|
97
|
-
const success = await gitStore.createBranch(newBranchName.value, selectedBaseBranch.value)
|
|
98
|
-
|
|
99
|
-
if (success) {
|
|
100
|
-
// 关闭对话框
|
|
101
|
-
createBranchDialogVisible.value = false
|
|
102
|
-
|
|
103
|
-
// 重置表单
|
|
104
|
-
newBranchName.value = ''
|
|
105
|
-
|
|
106
|
-
// 刷新Git状态
|
|
107
|
-
if (gitStatusRef.value) {
|
|
108
|
-
gitStatusRef.value.refreshStatus()
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// 刷新提交历史
|
|
112
|
-
if (logListRef.value) {
|
|
113
|
-
logListRef.value.refreshLog()
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// 打开创建分支对话框
|
|
119
|
-
function openCreateBranchDialog() {
|
|
120
|
-
selectedBaseBranch.value = gitStore.currentBranch
|
|
121
|
-
createBranchDialogVisible.value = true
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// 切换分支
|
|
125
|
-
async function handleBranchChange(branch: string) {
|
|
126
|
-
const success = await gitStore.changeBranch(branch)
|
|
127
|
-
|
|
128
|
-
if (success) {
|
|
129
|
-
// 刷新Git状态
|
|
130
|
-
if (gitStatusRef.value) {
|
|
131
|
-
gitStatusRef.value.refreshStatus()
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// 刷新提交历史
|
|
135
|
-
if (logListRef.value) {
|
|
136
|
-
logListRef.value.refreshLog()
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// 添加用户设置相关状态
|
|
142
|
-
const userSettingsDialogVisible = ref(false)
|
|
143
|
-
const tempUserName = ref('')
|
|
144
|
-
const tempUserEmail = ref('')
|
|
145
|
-
|
|
146
|
-
// 打开用户设置对话框
|
|
147
|
-
function openUserSettingsDialog() {
|
|
148
|
-
tempUserName.value = gitStore.userName
|
|
149
|
-
tempUserEmail.value = gitStore.userEmail
|
|
150
|
-
userSettingsDialogVisible.value = true
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// 保存用户设置
|
|
154
|
-
async function saveUserSettings() {
|
|
155
|
-
if (!tempUserName.value || !tempUserEmail.value) {
|
|
156
|
-
ElMessage.warning('用户名和邮箱不能为空')
|
|
157
|
-
return
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const success = await gitStore.restoreUserConfig(tempUserName.value, tempUserEmail.value)
|
|
161
|
-
if (success) {
|
|
162
|
-
userSettingsDialogVisible.value = false
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// 清除用户配置
|
|
167
|
-
async function clearUserSettings() {
|
|
168
|
-
const success = await gitStore.clearUserConfig()
|
|
169
|
-
if (success) {
|
|
170
|
-
tempUserName.value = ''
|
|
171
|
-
tempUserEmail.value = ''
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// 添加分隔条相关逻辑
|
|
176
|
-
let isVResizing = false;
|
|
177
|
-
let isHResizing = false;
|
|
178
|
-
let initialX = 0;
|
|
179
|
-
let initialY = 0;
|
|
180
|
-
let initialGridTemplateColumns = '';
|
|
181
|
-
let initialGridTemplateRows = '';
|
|
182
|
-
|
|
183
|
-
// 保存布局比例到localStorage
|
|
184
|
-
function saveLayoutRatios() {
|
|
185
|
-
const gridLayout = document.querySelector('.grid-layout') as HTMLElement;
|
|
186
|
-
if (!gridLayout) return;
|
|
187
|
-
|
|
188
|
-
// 获取当前的列和行比例
|
|
189
|
-
const columns = getComputedStyle(gridLayout).gridTemplateColumns.split(' ');
|
|
190
|
-
const rows = getComputedStyle(gridLayout).gridTemplateRows.split(' ');
|
|
191
|
-
|
|
192
|
-
if (columns.length >= 3 && rows.length >= 3) {
|
|
193
|
-
// 解析左右区域比例
|
|
194
|
-
const leftColWidth = parseFloat(columns[0]);
|
|
195
|
-
const rightColWidth = parseFloat(columns[2]);
|
|
196
|
-
const totalWidth = leftColWidth + rightColWidth;
|
|
197
|
-
const leftRatio = leftColWidth / totalWidth;
|
|
198
|
-
|
|
199
|
-
// 解析上下区域比例
|
|
200
|
-
const topRowHeight = parseFloat(rows[0]);
|
|
201
|
-
const bottomRowHeight = parseFloat(rows[2]);
|
|
202
|
-
const totalHeight = topRowHeight + bottomRowHeight;
|
|
203
|
-
const topRatio = topRowHeight / totalHeight;
|
|
204
|
-
|
|
205
|
-
// 保存到localStorage
|
|
206
|
-
localStorage.setItem('zen-gitsync-layout-left-ratio', leftRatio.toString());
|
|
207
|
-
localStorage.setItem('zen-gitsync-layout-top-ratio', topRatio.toString());
|
|
208
|
-
|
|
209
|
-
console.log(`布局比例已保存 - 左侧: ${(leftRatio * 100).toFixed(0)}%, 上方: ${(topRatio * 100).toFixed(0)}%`);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// 加载布局比例
|
|
214
|
-
function loadLayoutRatios() {
|
|
215
|
-
const gridLayout = document.querySelector('.grid-layout') as HTMLElement;
|
|
216
|
-
if (!gridLayout) return;
|
|
217
|
-
|
|
218
|
-
// 从localStorage获取保存的比例
|
|
219
|
-
const savedLeftRatio = localStorage.getItem('zen-gitsync-layout-left-ratio');
|
|
220
|
-
const savedTopRatio = localStorage.getItem('zen-gitsync-layout-top-ratio');
|
|
221
|
-
|
|
222
|
-
// 应用左右区域比例
|
|
223
|
-
if (savedLeftRatio) {
|
|
224
|
-
const leftRatio = parseFloat(savedLeftRatio);
|
|
225
|
-
const rightRatio = 1 - leftRatio;
|
|
226
|
-
gridLayout.style.gridTemplateColumns = `${leftRatio}fr 8px ${rightRatio}fr`;
|
|
227
|
-
console.log(`已恢复左侧比例: ${(leftRatio * 100).toFixed(0)}%`);
|
|
228
|
-
} else {
|
|
229
|
-
// 默认比例 1:3
|
|
230
|
-
gridLayout.style.gridTemplateColumns = "1fr 8px 3fr";
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// 应用上下区域比例
|
|
234
|
-
if (savedTopRatio) {
|
|
235
|
-
const topRatio = parseFloat(savedTopRatio);
|
|
236
|
-
const bottomRatio = 1 - topRatio;
|
|
237
|
-
gridLayout.style.gridTemplateRows = `${topRatio}fr 8px ${bottomRatio}fr`;
|
|
238
|
-
console.log(`已恢复上方比例: ${(topRatio * 100).toFixed(0)}%`);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function startVResize(event: MouseEvent) {
|
|
243
|
-
isVResizing = true;
|
|
244
|
-
initialX = event.clientX;
|
|
245
|
-
|
|
246
|
-
const gridLayout = document.querySelector('.grid-layout') as HTMLElement;
|
|
247
|
-
initialGridTemplateColumns = getComputedStyle(gridLayout).gridTemplateColumns;
|
|
248
|
-
|
|
249
|
-
document.getElementById('v-resizer')?.classList.add('active');
|
|
250
|
-
|
|
251
|
-
document.addEventListener('mousemove', handleVResize);
|
|
252
|
-
document.addEventListener('mouseup', stopVResize);
|
|
253
|
-
|
|
254
|
-
// 防止文本选择
|
|
255
|
-
event.preventDefault();
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
function handleVResize(event: MouseEvent) {
|
|
259
|
-
if (!isVResizing) return;
|
|
260
|
-
|
|
261
|
-
const gridLayout = document.querySelector('.grid-layout') as HTMLElement;
|
|
262
|
-
const delta = event.clientX - initialX;
|
|
263
|
-
|
|
264
|
-
// 解析当前的网格模板列值
|
|
265
|
-
const columns = initialGridTemplateColumns.split(' ');
|
|
266
|
-
|
|
267
|
-
// 确保我们有足够的列
|
|
268
|
-
if (columns.length >= 3) {
|
|
269
|
-
// 计算新的左列宽度
|
|
270
|
-
const leftColWidth = parseFloat(columns[0]);
|
|
271
|
-
const rightColWidth = parseFloat(columns[2]);
|
|
272
|
-
|
|
273
|
-
// 计算新的左右列比例
|
|
274
|
-
const totalWidth = leftColWidth + rightColWidth;
|
|
275
|
-
const newLeftRatio = (leftColWidth + delta / gridLayout.clientWidth * totalWidth) / totalWidth;
|
|
276
|
-
const newRightRatio = 1 - newLeftRatio;
|
|
277
|
-
|
|
278
|
-
// 确保左侧宽度不小于总宽度的10%且不大于50%
|
|
279
|
-
const minLeftRatio = 0.1;
|
|
280
|
-
const maxLeftRatio = 0.5;
|
|
281
|
-
|
|
282
|
-
if (newLeftRatio < minLeftRatio) {
|
|
283
|
-
gridLayout.style.gridTemplateColumns = `${minLeftRatio}fr 8px ${1 - minLeftRatio}fr`;
|
|
284
|
-
} else if (newLeftRatio > maxLeftRatio) {
|
|
285
|
-
gridLayout.style.gridTemplateColumns = `${maxLeftRatio}fr 8px ${1 - maxLeftRatio}fr`;
|
|
286
|
-
} else {
|
|
287
|
-
gridLayout.style.gridTemplateColumns = `${newLeftRatio}fr 8px ${newRightRatio}fr`;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function stopVResize() {
|
|
293
|
-
isVResizing = false;
|
|
294
|
-
document.getElementById('v-resizer')?.classList.remove('active');
|
|
295
|
-
document.removeEventListener('mousemove', handleVResize);
|
|
296
|
-
document.removeEventListener('mouseup', stopVResize);
|
|
297
|
-
|
|
298
|
-
// 保存布局比例
|
|
299
|
-
saveLayoutRatios();
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
function startHResize(event: MouseEvent) {
|
|
303
|
-
isHResizing = true;
|
|
304
|
-
initialY = event.clientY;
|
|
305
|
-
|
|
306
|
-
const gridLayout = document.querySelector('.grid-layout') as HTMLElement;
|
|
307
|
-
initialGridTemplateRows = getComputedStyle(gridLayout).gridTemplateRows;
|
|
308
|
-
|
|
309
|
-
document.getElementById('h-resizer')?.classList.add('active');
|
|
310
|
-
|
|
311
|
-
document.addEventListener('mousemove', handleHResize);
|
|
312
|
-
document.addEventListener('mouseup', stopHResize);
|
|
313
|
-
|
|
314
|
-
// 防止文本选择
|
|
315
|
-
event.preventDefault();
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function handleHResize(event: MouseEvent) {
|
|
319
|
-
if (!isHResizing) return;
|
|
320
|
-
|
|
321
|
-
const gridLayout = document.querySelector('.grid-layout') as HTMLElement;
|
|
322
|
-
const delta = event.clientY - initialY;
|
|
323
|
-
|
|
324
|
-
// 解析当前的网格模板行值
|
|
325
|
-
const rows = initialGridTemplateRows.split(' ');
|
|
326
|
-
|
|
327
|
-
// 确保我们有足够的行
|
|
328
|
-
if (rows.length >= 3) {
|
|
329
|
-
// 计算新的上行高度
|
|
330
|
-
const topRowHeight = parseFloat(rows[0]);
|
|
331
|
-
const bottomRowHeight = parseFloat(rows[2]);
|
|
332
|
-
|
|
333
|
-
// 计算新的上下行比例
|
|
334
|
-
const totalHeight = topRowHeight + bottomRowHeight;
|
|
335
|
-
const newTopRatio = (topRowHeight + delta / gridLayout.clientHeight * totalHeight) / totalHeight;
|
|
336
|
-
const newBottomRatio = 1 - newTopRatio;
|
|
337
|
-
|
|
338
|
-
// 确保上方区域不小于总高度的20%且不大于80%
|
|
339
|
-
const minTopRatio = 0.2;
|
|
340
|
-
const maxTopRatio = 0.8;
|
|
341
|
-
|
|
342
|
-
if (newTopRatio < minTopRatio) {
|
|
343
|
-
gridLayout.style.gridTemplateRows = `${minTopRatio}fr 8px ${1 - minTopRatio}fr`;
|
|
344
|
-
} else if (newTopRatio > maxTopRatio) {
|
|
345
|
-
gridLayout.style.gridTemplateRows = `${maxTopRatio}fr 8px ${1 - maxTopRatio}fr`;
|
|
346
|
-
} else {
|
|
347
|
-
gridLayout.style.gridTemplateRows = `${newTopRatio}fr 8px ${newBottomRatio}fr`;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function stopHResize() {
|
|
353
|
-
isHResizing = false;
|
|
354
|
-
document.getElementById('h-resizer')?.classList.remove('active');
|
|
355
|
-
document.removeEventListener('mousemove', handleHResize);
|
|
356
|
-
document.removeEventListener('mouseup', stopHResize);
|
|
357
|
-
|
|
358
|
-
// 保存布局比例
|
|
359
|
-
saveLayoutRatios();
|
|
360
|
-
}
|
|
361
|
-
</script>
|
|
362
|
-
|
|
363
|
-
<template>
|
|
364
|
-
<header class="main-header">
|
|
365
|
-
<div class="header-left">
|
|
366
|
-
<img :src="logo" alt="Zen GitSync Logo" class="logo" />
|
|
367
|
-
<h1>Zen GitSync UI</h1>
|
|
368
|
-
</div>
|
|
369
|
-
<div class="header-info">
|
|
370
|
-
<div id="user-info" v-if="gitStore.userName && gitStore.userEmail">
|
|
371
|
-
<span class="user-label">用户:</span>
|
|
372
|
-
<span class="user-name">{{ gitStore.userName }}</span>
|
|
373
|
-
<span class="user-email"><{{ gitStore.userEmail }}></span>
|
|
374
|
-
<el-button
|
|
375
|
-
type="primary"
|
|
376
|
-
size="small"
|
|
377
|
-
@click="openUserSettingsDialog"
|
|
378
|
-
class="user-settings-btn"
|
|
379
|
-
circle
|
|
380
|
-
>
|
|
381
|
-
<el-icon><Setting /></el-icon>
|
|
382
|
-
</el-button>
|
|
383
|
-
</div>
|
|
384
|
-
<div id="user-info" v-else>
|
|
385
|
-
<span class="user-label">用户: </span>
|
|
386
|
-
<span class="user-warning">未配置</span>
|
|
387
|
-
<el-button
|
|
388
|
-
type="primary"
|
|
389
|
-
size="small"
|
|
390
|
-
@click="openUserSettingsDialog"
|
|
391
|
-
class="user-settings-btn"
|
|
392
|
-
circle
|
|
393
|
-
>
|
|
394
|
-
<el-icon><Setting /></el-icon>
|
|
395
|
-
</el-button>
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
</header>
|
|
399
|
-
|
|
400
|
-
<main class="main-container">
|
|
401
|
-
<div v-if="!initCompleted" class="loading-container">
|
|
402
|
-
<el-card class="loading-card">
|
|
403
|
-
<div class="loading-spinner">
|
|
404
|
-
<el-icon class="is-loading"><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg></el-icon>
|
|
405
|
-
</div>
|
|
406
|
-
<div class="loading-text">加载中...</div>
|
|
407
|
-
</el-card>
|
|
408
|
-
</div>
|
|
409
|
-
|
|
410
|
-
<div v-else class="grid-layout">
|
|
411
|
-
<!-- 上方左侧Git状态 -->
|
|
412
|
-
<div class="git-status-panel">
|
|
413
|
-
<GitStatus
|
|
414
|
-
ref="gitStatusRef"
|
|
415
|
-
:initial-directory="currentDirectory"
|
|
416
|
-
/>
|
|
417
|
-
</div>
|
|
418
|
-
|
|
419
|
-
<!-- 垂直分隔条 -->
|
|
420
|
-
<div class="vertical-resizer" id="v-resizer" @mousedown="startVResize"></div>
|
|
421
|
-
|
|
422
|
-
<!-- 上方右侧提交表单 -->
|
|
423
|
-
<div class="commit-form-panel" v-if="gitStore.isGitRepo">
|
|
424
|
-
<!-- 当用户未配置时显示配置提示 -->
|
|
425
|
-
<div v-if="!gitStore.userName || !gitStore.userEmail" class="card">
|
|
426
|
-
<h2>Git用户未配置</h2>
|
|
427
|
-
<p>请先配置Git用户信息才能进行提交操作。</p>
|
|
428
|
-
<div class="tips">
|
|
429
|
-
<h3>您可以通过以下方式配置:</h3>
|
|
430
|
-
<ol>
|
|
431
|
-
<li>点击右上角的设置按钮,配置用户名和邮箱</li>
|
|
432
|
-
<li>或者使用命令行配置:</li>
|
|
433
|
-
<div class="code-block">
|
|
434
|
-
git config --global user.name "您的用户名"<br>
|
|
435
|
-
git config --global user.email "您的邮箱"
|
|
436
|
-
</div>
|
|
437
|
-
</ol>
|
|
438
|
-
<el-button
|
|
439
|
-
type="primary"
|
|
440
|
-
@click="openUserSettingsDialog"
|
|
441
|
-
>
|
|
442
|
-
立即配置
|
|
443
|
-
</el-button>
|
|
444
|
-
</div>
|
|
445
|
-
</div>
|
|
446
|
-
<!-- 用户已配置显示提交表单 -->
|
|
447
|
-
<template v-else>
|
|
448
|
-
<CommitForm />
|
|
449
|
-
</template>
|
|
450
|
-
</div>
|
|
451
|
-
<div class="commit-form-panel" v-else>
|
|
452
|
-
<div class="card" style="padding: 20px;">
|
|
453
|
-
<h2>Git仓库初始化</h2>
|
|
454
|
-
<p>当前目录不是Git仓库,请先初始化Git仓库或切换到Git仓库目录。</p>
|
|
455
|
-
<!-- 实用提示 -->
|
|
456
|
-
<div class="tips">
|
|
457
|
-
<h3>可以使用以下命令初始化仓库:</h3>
|
|
458
|
-
<div class="code-block">git init</div>
|
|
459
|
-
</div>
|
|
460
|
-
</div>
|
|
461
|
-
</div>
|
|
462
|
-
|
|
463
|
-
<!-- 水平分隔条 -->
|
|
464
|
-
<div class="horizontal-resizer" id="h-resizer" @mousedown="startHResize"></div>
|
|
465
|
-
|
|
466
|
-
<!-- 下方提交历史 -->
|
|
467
|
-
<div class="log-list-panel" v-if="gitStore.isGitRepo">
|
|
468
|
-
<LogList ref="logListRef" />
|
|
469
|
-
</div>
|
|
470
|
-
|
|
471
|
-
<!-- 创建分支对话框 -->
|
|
472
|
-
<el-dialog
|
|
473
|
-
v-model="createBranchDialogVisible"
|
|
474
|
-
title="创建新分支"
|
|
475
|
-
width="30%"
|
|
476
|
-
destroy-on-close
|
|
477
|
-
>
|
|
478
|
-
<el-form :model="{ newBranchName, selectedBaseBranch }">
|
|
479
|
-
<el-form-item label="新分支名称">
|
|
480
|
-
<el-input v-model="newBranchName" placeholder="请输入新分支名称" />
|
|
481
|
-
</el-form-item>
|
|
482
|
-
<el-form-item label="基于分支">
|
|
483
|
-
<el-select v-model="selectedBaseBranch" placeholder="选择基础分支" style="width: 100%;">
|
|
484
|
-
<el-option
|
|
485
|
-
v-for="branch in gitStore.allBranches"
|
|
486
|
-
:key="branch"
|
|
487
|
-
:label="branch"
|
|
488
|
-
:value="branch"
|
|
489
|
-
/>
|
|
490
|
-
</el-select>
|
|
491
|
-
</el-form-item>
|
|
492
|
-
</el-form>
|
|
493
|
-
<template #footer>
|
|
494
|
-
<span class="dialog-footer">
|
|
495
|
-
<el-button @click="createBranchDialogVisible = false">取消</el-button>
|
|
496
|
-
<el-button
|
|
497
|
-
type="primary"
|
|
498
|
-
@click="createNewBranch"
|
|
499
|
-
:loading="gitStore.isCreatingBranch"
|
|
500
|
-
>
|
|
501
|
-
创建
|
|
502
|
-
</el-button>
|
|
503
|
-
</span>
|
|
504
|
-
</template>
|
|
505
|
-
</el-dialog>
|
|
506
|
-
|
|
507
|
-
</div>
|
|
508
|
-
</main>
|
|
509
|
-
|
|
510
|
-
<footer class="main-footer">
|
|
511
|
-
<div class="branch-info" v-if="gitStore.currentBranch">
|
|
512
|
-
<div class="branch-wrapper">
|
|
513
|
-
<span class="branch-label">当前分支:</span>
|
|
514
|
-
<el-select
|
|
515
|
-
v-model="gitStore.currentBranch"
|
|
516
|
-
size="small"
|
|
517
|
-
@change="handleBranchChange"
|
|
518
|
-
:loading="gitStore.isChangingBranch"
|
|
519
|
-
class="branch-select"
|
|
520
|
-
>
|
|
521
|
-
<el-option
|
|
522
|
-
v-for="branch in gitStore.allBranches"
|
|
523
|
-
:key="branch"
|
|
524
|
-
:label="branch"
|
|
525
|
-
:value="branch"
|
|
526
|
-
/>
|
|
527
|
-
</el-select>
|
|
528
|
-
<el-button
|
|
529
|
-
type="primary"
|
|
530
|
-
size="small"
|
|
531
|
-
@click="openCreateBranchDialog"
|
|
532
|
-
class="create-branch-btn"
|
|
533
|
-
>
|
|
534
|
-
<el-icon><Plus /></el-icon>
|
|
535
|
-
新建分支
|
|
536
|
-
</el-button>
|
|
537
|
-
</div>
|
|
538
|
-
</div>
|
|
539
|
-
<div class="footer-right">
|
|
540
|
-
<!-- <span>Zen GitSync © 2024</span> -->
|
|
541
|
-
</div>
|
|
542
|
-
</footer>
|
|
543
|
-
|
|
544
|
-
<!-- 用户设置对话框 -->
|
|
545
|
-
<el-dialog
|
|
546
|
-
v-model="userSettingsDialogVisible"
|
|
547
|
-
title="Git用户设置"
|
|
548
|
-
width="30%"
|
|
549
|
-
destroy-on-close
|
|
550
|
-
>
|
|
551
|
-
<el-form>
|
|
552
|
-
<el-form-item label="用户名">
|
|
553
|
-
<el-input v-model="tempUserName" placeholder="请输入Git用户名" />
|
|
554
|
-
</el-form-item>
|
|
555
|
-
<el-form-item label="邮箱">
|
|
556
|
-
<el-input v-model="tempUserEmail" placeholder="请输入Git邮箱" />
|
|
557
|
-
</el-form-item>
|
|
558
|
-
<el-form-item>
|
|
559
|
-
<el-alert
|
|
560
|
-
type="info"
|
|
561
|
-
:closable="false"
|
|
562
|
-
show-icon
|
|
563
|
-
>
|
|
564
|
-
这些设置将影响全局Git配置,对所有Git仓库生效。
|
|
565
|
-
</el-alert>
|
|
566
|
-
</el-form-item>
|
|
567
|
-
</el-form>
|
|
568
|
-
<template #footer>
|
|
569
|
-
<span class="dialog-footer">
|
|
570
|
-
<el-button
|
|
571
|
-
type="danger"
|
|
572
|
-
@click="clearUserSettings"
|
|
573
|
-
>
|
|
574
|
-
清除配置
|
|
575
|
-
</el-button>
|
|
576
|
-
<el-button @click="userSettingsDialogVisible = false">取消</el-button>
|
|
577
|
-
<el-button
|
|
578
|
-
type="primary"
|
|
579
|
-
@click="saveUserSettings"
|
|
580
|
-
>
|
|
581
|
-
保存
|
|
582
|
-
</el-button>
|
|
583
|
-
</span>
|
|
584
|
-
</template>
|
|
585
|
-
</el-dialog>
|
|
586
|
-
</template>
|
|
587
|
-
|
|
588
|
-
<style>
|
|
589
|
-
body {
|
|
590
|
-
font-family: 'Arial', sans-serif;
|
|
591
|
-
margin: 0;
|
|
592
|
-
padding: 0;
|
|
593
|
-
background-color: #f5f5f5;
|
|
594
|
-
overflow: hidden; /* 防止出现滚动条 */
|
|
595
|
-
height: 100vh;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.main-container {
|
|
599
|
-
position: fixed;
|
|
600
|
-
top: 60px; /* 顶部导航栏高度 */
|
|
601
|
-
bottom: 60px; /* 底部footer高度 */
|
|
602
|
-
left: 0;
|
|
603
|
-
right: 0;
|
|
604
|
-
padding: 10px;
|
|
605
|
-
overflow: hidden; /* 防止整体滚动 */
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.grid-layout {
|
|
609
|
-
display: grid;
|
|
610
|
-
grid-template-columns: 1fr 8px 3fr; /* 左右区域比例为1:3 */
|
|
611
|
-
grid-template-rows: 1fr 8px 1fr;
|
|
612
|
-
grid-template-areas:
|
|
613
|
-
"git-status v-resizer commit-form"
|
|
614
|
-
"h-resizer h-resizer h-resizer"
|
|
615
|
-
"log-list log-list log-list";
|
|
616
|
-
gap: 10px;
|
|
617
|
-
height: 100%;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
.git-status-panel {
|
|
621
|
-
grid-area: git-status;
|
|
622
|
-
overflow: hidden;
|
|
623
|
-
max-height: 100%;
|
|
624
|
-
padding: 0;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
.commit-form-panel {
|
|
628
|
-
grid-area: commit-form;
|
|
629
|
-
overflow: hidden;
|
|
630
|
-
max-height: 100%;
|
|
631
|
-
padding: 0;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
.log-list-panel {
|
|
635
|
-
grid-area: log-list;
|
|
636
|
-
overflow: hidden;
|
|
637
|
-
max-height: 100%;
|
|
638
|
-
padding: 0;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/* 确保每个卡片内部可以滚动 */
|
|
642
|
-
.card {
|
|
643
|
-
background-color: white;
|
|
644
|
-
border-radius: 8px;
|
|
645
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
646
|
-
border: 1px solid rgba(0, 0, 0, 0.03);
|
|
647
|
-
height: 100%;
|
|
648
|
-
overflow: hidden;
|
|
649
|
-
display: flex;
|
|
650
|
-
flex-direction: column;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
.main-header {
|
|
654
|
-
background-color: #24292e;
|
|
655
|
-
color: white;
|
|
656
|
-
padding: 15px 20px;
|
|
657
|
-
display: flex;
|
|
658
|
-
justify-content: space-between;
|
|
659
|
-
align-items: center;
|
|
660
|
-
position: fixed;
|
|
661
|
-
top: 0;
|
|
662
|
-
left: 0;
|
|
663
|
-
right: 0;
|
|
664
|
-
z-index: 1000;
|
|
665
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
666
|
-
height: 60px;
|
|
667
|
-
box-sizing: border-box;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
.header-left {
|
|
671
|
-
display: flex;
|
|
672
|
-
align-items: center;
|
|
673
|
-
gap: 10px;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
.logo {
|
|
677
|
-
height: 32px;
|
|
678
|
-
width: auto;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
h1 {
|
|
682
|
-
margin: 0;
|
|
683
|
-
font-size: 24px;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
.header-info {
|
|
687
|
-
display: flex;
|
|
688
|
-
flex-direction: column;
|
|
689
|
-
align-items: flex-end;
|
|
690
|
-
gap: 5px;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
#branch-info, #user-info {
|
|
694
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
695
|
-
padding: 4px 8px;
|
|
696
|
-
border-radius: 4px;
|
|
697
|
-
font-size: 14px;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
.branch-label, .user-label {
|
|
701
|
-
font-weight: bold;
|
|
702
|
-
margin-right: 5px;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
.user-name {
|
|
706
|
-
font-weight: bold;
|
|
707
|
-
margin-right: 5px;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.user-email {
|
|
711
|
-
color: #e0e0e0;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
.branch-name {
|
|
715
|
-
font-family: monospace;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
.status-box {
|
|
719
|
-
background-color: #f6f8fa;
|
|
720
|
-
border: 1px solid #e1e4e8;
|
|
721
|
-
border-radius: 3px;
|
|
722
|
-
padding: 15px;
|
|
723
|
-
white-space: pre-wrap;
|
|
724
|
-
font-family: monospace;
|
|
725
|
-
overflow-y: auto;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
.tips {
|
|
729
|
-
margin-top: 20px;
|
|
730
|
-
padding: 15px;
|
|
731
|
-
background-color: #f5f7fa;
|
|
732
|
-
border-radius: 5px;
|
|
733
|
-
border-left: 4px solid #409eff;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.tips h3 {
|
|
737
|
-
margin-top: 0;
|
|
738
|
-
font-size: 16px;
|
|
739
|
-
margin-bottom: 10px;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.code-block {
|
|
743
|
-
background-color: #2d2d2d;
|
|
744
|
-
color: #f8f8f2;
|
|
745
|
-
font-family: monospace;
|
|
746
|
-
padding: 10px 15px;
|
|
747
|
-
border-radius: 4px;
|
|
748
|
-
margin-bottom: 10px;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
/* 加载中样式 */
|
|
752
|
-
.loading-container {
|
|
753
|
-
display: flex;
|
|
754
|
-
justify-content: center;
|
|
755
|
-
align-items: center;
|
|
756
|
-
height: 100%;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
.loading-card {
|
|
760
|
-
width: 300px;
|
|
761
|
-
text-align: center;
|
|
762
|
-
padding: 30px;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
.loading-spinner {
|
|
766
|
-
font-size: 48px;
|
|
767
|
-
margin-bottom: 20px;
|
|
768
|
-
color: #409eff;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
.loading-text {
|
|
772
|
-
font-size: 18px;
|
|
773
|
-
color: #606266;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
.user-settings-btn {
|
|
777
|
-
margin-left: 10px;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
.user-warning {
|
|
781
|
-
color: #E6A23C;
|
|
782
|
-
font-weight: bold;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
.main-footer {
|
|
786
|
-
background-color: #24292e;
|
|
787
|
-
color: white;
|
|
788
|
-
padding: 10px 20px;
|
|
789
|
-
display: flex;
|
|
790
|
-
justify-content: space-between;
|
|
791
|
-
align-items: center;
|
|
792
|
-
position: fixed;
|
|
793
|
-
bottom: 0;
|
|
794
|
-
left: 0;
|
|
795
|
-
right: 0;
|
|
796
|
-
z-index: 100;
|
|
797
|
-
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
|
798
|
-
height: 60px;
|
|
799
|
-
box-sizing: border-box;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
/* 响应式布局 */
|
|
803
|
-
@media (max-width: 768px) {
|
|
804
|
-
.grid-layout {
|
|
805
|
-
grid-template-columns: 1fr;
|
|
806
|
-
grid-template-rows: auto auto auto auto auto;
|
|
807
|
-
grid-template-areas:
|
|
808
|
-
"git-status"
|
|
809
|
-
"v-resizer"
|
|
810
|
-
"commit-form"
|
|
811
|
-
"h-resizer"
|
|
812
|
-
"log-list";
|
|
813
|
-
gap: 10px;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.vertical-resizer {
|
|
817
|
-
height: 10px;
|
|
818
|
-
cursor: row-resize;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
.vertical-resizer::after {
|
|
822
|
-
width: 30px;
|
|
823
|
-
height: 4px;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.git-status-panel,
|
|
827
|
-
.commit-form-panel,
|
|
828
|
-
.log-list-panel {
|
|
829
|
-
padding: 0;
|
|
830
|
-
max-height: none;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.git-status-panel {
|
|
834
|
-
max-height: 30vh;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
.commit-form-panel {
|
|
838
|
-
max-height: 30vh;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
.log-list-panel {
|
|
842
|
-
max-height: 40vh;
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
</style>
|
|
846
|
-
|
|
847
|
-
<style scoped>
|
|
848
|
-
.logo {
|
|
849
|
-
will-change: filter;
|
|
850
|
-
transition: filter 300ms;
|
|
851
|
-
}
|
|
852
|
-
.logo:hover {
|
|
853
|
-
filter: drop-shadow(0 0 2em #42b883aa);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
.branch-info {
|
|
857
|
-
display: flex;
|
|
858
|
-
align-items: center;
|
|
859
|
-
gap: 10px;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
.branch-wrapper {
|
|
863
|
-
display: flex;
|
|
864
|
-
align-items: center;
|
|
865
|
-
background-color: rgba(255, 255, 255, 0.15);
|
|
866
|
-
border-radius: 4px;
|
|
867
|
-
padding: 8px 12px;
|
|
868
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
869
|
-
transition: all 0.3s;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
.branch-wrapper:hover {
|
|
873
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
.branch-label {
|
|
877
|
-
font-weight: bold;
|
|
878
|
-
margin-right: 10px;
|
|
879
|
-
color: #ffffff;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
.branch-select {
|
|
883
|
-
width: 200px;
|
|
884
|
-
margin-right: 10px;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
.create-branch-btn {
|
|
888
|
-
background-color: #2ea44f;
|
|
889
|
-
border-color: #2ea44f;
|
|
890
|
-
transition: all 0.3s;
|
|
891
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
.create-branch-btn:hover {
|
|
895
|
-
background-color: #3bbc63;
|
|
896
|
-
border-color: #3bbc63;
|
|
897
|
-
transform: translateY(-2px);
|
|
898
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
.footer-right {
|
|
902
|
-
display: flex;
|
|
903
|
-
align-items: center;
|
|
904
|
-
gap: 10px;
|
|
905
|
-
color: rgba(255, 255, 255, 0.9);
|
|
906
|
-
font-size: 13px;
|
|
907
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
908
|
-
padding: 8px 12px;
|
|
909
|
-
border-radius: 4px;
|
|
910
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
/* 垂直分隔条样式 */
|
|
914
|
-
.vertical-resizer {
|
|
915
|
-
grid-area: v-resizer;
|
|
916
|
-
background-color: #e8e8e8;
|
|
917
|
-
cursor: col-resize;
|
|
918
|
-
transition: background-color 0.2s, box-shadow 0.2s;
|
|
919
|
-
position: relative;
|
|
920
|
-
z-index: 10;
|
|
921
|
-
border-radius: 8px; /* 增加圆角 */
|
|
922
|
-
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
.vertical-resizer::after {
|
|
926
|
-
content: '';
|
|
927
|
-
position: absolute;
|
|
928
|
-
top: 50%;
|
|
929
|
-
left: 50%;
|
|
930
|
-
transform: translate(-50%, -50%);
|
|
931
|
-
width: 4px;
|
|
932
|
-
height: 50px;
|
|
933
|
-
background-color: #a0a0a0;
|
|
934
|
-
border-radius: 4px; /* 增加圆角 */
|
|
935
|
-
transition: background-color 0.2s, width 0.2s, box-shadow 0.2s;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
.vertical-resizer:hover, .vertical-resizer.active {
|
|
939
|
-
background-color: #d0d0d0;
|
|
940
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
.vertical-resizer:hover::after, .vertical-resizer.active::after {
|
|
944
|
-
background-color: #409EFF;
|
|
945
|
-
width: 6px;
|
|
946
|
-
box-shadow: 0 0 8px rgba(64, 158, 255, 0.6);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
/* 水平分隔条样式 */
|
|
950
|
-
.horizontal-resizer {
|
|
951
|
-
grid-area: h-resizer;
|
|
952
|
-
background-color: #e8e8e8;
|
|
953
|
-
cursor: row-resize;
|
|
954
|
-
transition: background-color 0.2s, box-shadow 0.2s;
|
|
955
|
-
position: relative;
|
|
956
|
-
z-index: 10;
|
|
957
|
-
border-radius: 8px; /* 增加圆角 */
|
|
958
|
-
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
.horizontal-resizer::after {
|
|
962
|
-
content: '';
|
|
963
|
-
position: absolute;
|
|
964
|
-
top: 50%;
|
|
965
|
-
left: 50%;
|
|
966
|
-
transform: translate(-50%, -50%);
|
|
967
|
-
width: 50px;
|
|
968
|
-
height: 4px;
|
|
969
|
-
background-color: #a0a0a0;
|
|
970
|
-
border-radius: 4px; /* 增加圆角 */
|
|
971
|
-
transition: background-color 0.2s, height 0.2s, box-shadow 0.2s;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
.horizontal-resizer:hover, .horizontal-resizer.active {
|
|
975
|
-
background-color: #d0d0d0;
|
|
976
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.horizontal-resizer:hover::after, .horizontal-resizer.active::after {
|
|
980
|
-
background-color: #409EFF;
|
|
981
|
-
height: 6px;
|
|
982
|
-
box-shadow: 0 0 8px rgba(64, 158, 255, 0.6);
|
|
983
|
-
}
|
|
984
|
-
</style>
|