ccgf-game-tool 1.0.21 → 1.0.23
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/README.md +31 -0
- package/README.zh-CN.md +31 -0
- package/dist/bundle.js +241 -0
- package/dist/constants.js +6 -2
- package/dist/doctor.js +27 -17
- package/dist/log.js +34 -0
- package/dist/main.js +769 -37
- package/dist/panels/tables/index.js +310 -0
- package/dist/panels/workbench/index.js +136 -2
- package/dist/project.js +45 -8
- package/dist/registry.js +3 -1
- package/dist/tables.js +693 -0
- package/dist/templates.js +134 -13
- package/dist/types.js +1 -1
- package/i18n/en.js +214 -169
- package/i18n/zh.js +214 -169
- package/package.json +58 -1
- package/static/style/tables/index.css +212 -0
- package/static/style/workbench/index.css +48 -0
- package/static/template/tables/index.html +1 -0
- package/static/template/tables/panel.html +74 -0
- package/static/template/workbench/panel.html +575 -552
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
.table-tool {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding: 12px;
|
|
7
|
+
gap: 10px;
|
|
8
|
+
color: var(--color-normal-contrast, #ddd);
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tt-header {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tt-title {
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tt-header-actions,
|
|
26
|
+
.tt-toolbar-actions {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 6px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tt-btn {
|
|
32
|
+
border: 1px solid var(--color-border, #444);
|
|
33
|
+
background: var(--color-normal-fill, #333);
|
|
34
|
+
color: inherit;
|
|
35
|
+
border-radius: 3px;
|
|
36
|
+
padding: 4px 10px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tt-btn:hover:not(:disabled) {
|
|
42
|
+
border-color: var(--color-focus, #4c9aff);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tt-btn:disabled {
|
|
46
|
+
opacity: 0.45;
|
|
47
|
+
cursor: default;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tt-btn-primary {
|
|
51
|
+
background: var(--color-primary, #2d6cdf);
|
|
52
|
+
border-color: var(--color-primary, #2d6cdf);
|
|
53
|
+
color: #fff;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tt-create {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: flex-end;
|
|
59
|
+
gap: 8px;
|
|
60
|
+
flex-wrap: wrap;
|
|
61
|
+
padding: 8px;
|
|
62
|
+
border: 1px solid var(--color-border, #444);
|
|
63
|
+
border-radius: 4px;
|
|
64
|
+
background: rgba(255, 255, 255, 0.03);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tt-field {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 3px;
|
|
71
|
+
min-width: 160px;
|
|
72
|
+
flex: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tt-input {
|
|
76
|
+
background: var(--color-normal-fill, #222);
|
|
77
|
+
border: 1px solid var(--color-border, #444);
|
|
78
|
+
color: inherit;
|
|
79
|
+
border-radius: 3px;
|
|
80
|
+
padding: 4px 6px;
|
|
81
|
+
font-size: 12px;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.tt-toolbar {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: 10px;
|
|
89
|
+
flex-wrap: wrap;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tt-check {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: 4px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.tt-filter {
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 5px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tt-filter-select {
|
|
106
|
+
min-width: 130px;
|
|
107
|
+
max-width: 220px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.tt-count {
|
|
111
|
+
opacity: 0.75;
|
|
112
|
+
margin-right: auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.tt-msg {
|
|
116
|
+
padding: 6px 8px;
|
|
117
|
+
border-radius: 3px;
|
|
118
|
+
white-space: pre-wrap;
|
|
119
|
+
line-height: 1.45;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tt-error {
|
|
123
|
+
background: rgba(220, 60, 60, 0.15);
|
|
124
|
+
border: 1px solid rgba(220, 60, 60, 0.45);
|
|
125
|
+
color: #ff9c9c;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.tt-warn {
|
|
129
|
+
background: rgba(220, 160, 40, 0.15);
|
|
130
|
+
border: 1px solid rgba(220, 160, 40, 0.45);
|
|
131
|
+
color: #ffd08a;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.tt-ok {
|
|
135
|
+
background: rgba(60, 180, 100, 0.15);
|
|
136
|
+
border: 1px solid rgba(60, 180, 100, 0.45);
|
|
137
|
+
color: #9ce0b0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.tt-list {
|
|
141
|
+
flex: 1;
|
|
142
|
+
min-height: 0;
|
|
143
|
+
overflow: auto;
|
|
144
|
+
border: 1px solid var(--color-border, #444);
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.tt-row {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 8px;
|
|
152
|
+
padding: 7px 8px;
|
|
153
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.tt-row:last-child {
|
|
157
|
+
border-bottom: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.tt-info {
|
|
161
|
+
min-width: 0;
|
|
162
|
+
flex: 1;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.tt-name {
|
|
166
|
+
font-weight: 600;
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
text-overflow: ellipsis;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.tt-note {
|
|
173
|
+
font-weight: 400;
|
|
174
|
+
opacity: 0.7;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.tt-path,
|
|
178
|
+
.tt-bin {
|
|
179
|
+
font-family: Consolas, "Courier New", monospace;
|
|
180
|
+
font-size: 11px;
|
|
181
|
+
opacity: 0.65;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
text-overflow: ellipsis;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.tt-bin {
|
|
188
|
+
max-width: 42%;
|
|
189
|
+
opacity: 0.45;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.tt-abs {
|
|
193
|
+
font-family: Consolas, "Courier New", monospace;
|
|
194
|
+
font-size: 10px;
|
|
195
|
+
opacity: 0.5;
|
|
196
|
+
margin-top: 2px;
|
|
197
|
+
white-space: normal;
|
|
198
|
+
word-break: break-all;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.tt-row-error {
|
|
202
|
+
color: #ff9c9c;
|
|
203
|
+
font-size: 11px;
|
|
204
|
+
margin-top: 2px;
|
|
205
|
+
white-space: normal;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.tt-empty {
|
|
209
|
+
padding: 18px;
|
|
210
|
+
text-align: center;
|
|
211
|
+
opacity: 0.6;
|
|
212
|
+
}
|
|
@@ -444,6 +444,54 @@ ui-button.small {
|
|
|
444
444
|
opacity: 0.55;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
+
/* ============================== 目标包 ============================== */
|
|
448
|
+
|
|
449
|
+
.bundle-bar {
|
|
450
|
+
flex: 0 0 auto;
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-wrap: wrap;
|
|
453
|
+
align-items: center;
|
|
454
|
+
gap: 6px;
|
|
455
|
+
min-height: 34px;
|
|
456
|
+
padding: 5px 10px;
|
|
457
|
+
border-bottom: var(--gt-line);
|
|
458
|
+
/* 比普通分隔条稍强一点:这是"当前在哪个包里"的关键信息 */
|
|
459
|
+
background: linear-gradient(180deg, var(--gt-surface-2), transparent);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.bundle-label {
|
|
463
|
+
flex: 0 0 auto;
|
|
464
|
+
font-size: 11px;
|
|
465
|
+
letter-spacing: 0.3px;
|
|
466
|
+
opacity: 0.6;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.bundle-bar > ui-select,
|
|
470
|
+
.bundle-bar > ui-input {
|
|
471
|
+
flex: 0 0 132px;
|
|
472
|
+
min-width: 96px;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* 子包提示:一行小字,窄面板时省略而不是把工具栏挤变形 */
|
|
476
|
+
.bundle-hint {
|
|
477
|
+
flex: 1 1 auto;
|
|
478
|
+
min-width: 0;
|
|
479
|
+
overflow: hidden;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
white-space: nowrap;
|
|
482
|
+
font-size: 11px;
|
|
483
|
+
opacity: 0.55;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* 右侧操作组:新建 / 删除,始终靠右;窄面板换行后也不会飘到左边 */
|
|
487
|
+
.bundle-actions {
|
|
488
|
+
flex: 0 0 auto;
|
|
489
|
+
display: flex;
|
|
490
|
+
align-items: center;
|
|
491
|
+
gap: 6px;
|
|
492
|
+
margin-left: auto;
|
|
493
|
+
}
|
|
494
|
+
|
|
447
495
|
/* ============================ 列表上的小标记 ============================ */
|
|
448
496
|
|
|
449
497
|
/* 缺少 Model 的告警点 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div id="app"></div>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<div class="table-tool">
|
|
2
|
+
<div class="tt-header">
|
|
3
|
+
<div class="tt-title">{{ t('table_tool_title') }}</div>
|
|
4
|
+
<div class="tt-header-actions">
|
|
5
|
+
<button class="tt-btn" :disabled="busy" @click="refresh">{{ t('ui_table_refresh') }}</button>
|
|
6
|
+
<button class="tt-btn tt-btn-primary" :disabled="busy" @click="showCreate = !showCreate">
|
|
7
|
+
{{ t('ui_table_new') }}
|
|
8
|
+
</button>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="tt-create" v-if="showCreate">
|
|
13
|
+
<label class="tt-field">
|
|
14
|
+
<span>{{ t('ui_table_dir') }}</span>
|
|
15
|
+
<select v-model="dir" class="tt-input" :disabled="busy">
|
|
16
|
+
<option v-for="d in dirs" :key="d" :value="d">{{ d }}</option>
|
|
17
|
+
<option v-if="dirs.length === 0" value="resources/tables">resources/tables</option>
|
|
18
|
+
</select>
|
|
19
|
+
</label>
|
|
20
|
+
<label class="tt-field">
|
|
21
|
+
<span>{{ t('ui_table_subdir') }}</span>
|
|
22
|
+
<input v-model="subDir" class="tt-input" placeholder="shop(可选)" :disabled="busy">
|
|
23
|
+
</label>
|
|
24
|
+
<label class="tt-field">
|
|
25
|
+
<span>{{ t('ui_table_name') }}</span>
|
|
26
|
+
<input v-model="fileName" class="tt-input" placeholder="Weapon_武器表" :disabled="busy">
|
|
27
|
+
</label>
|
|
28
|
+
<button class="tt-btn tt-btn-primary" :disabled="busy" @click="create">{{ t('ui_table_create') }}</button>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="tt-toolbar">
|
|
32
|
+
<label class="tt-filter">
|
|
33
|
+
<span>{{ t('ui_table_filter') }}</span>
|
|
34
|
+
<select v-model="filterBundle" class="tt-input tt-filter-select" :disabled="busy" @change="onFilterChange">
|
|
35
|
+
<option value="">{{ t('ui_table_filter_all') }}</option>
|
|
36
|
+
<option value="__main__">{{ t('ui_table_filter_main') }}</option>
|
|
37
|
+
<option v-for="b in bundles" :key="b" :value="b">{{ b }}</option>
|
|
38
|
+
</select>
|
|
39
|
+
</label>
|
|
40
|
+
<label class="tt-check">
|
|
41
|
+
<input type="checkbox" :checked="allChecked" @change="toggleAll">
|
|
42
|
+
{{ t('ui_table_select_all') }}
|
|
43
|
+
</label>
|
|
44
|
+
<span class="tt-count">{{ t('ui_table_selected', { selected: selectedCount, total: visibleTables.length }) }}</span>
|
|
45
|
+
<div class="tt-toolbar-actions">
|
|
46
|
+
<button class="tt-btn" :disabled="busy || selectedCount === 0" @click="exportSelected">
|
|
47
|
+
{{ t('ui_table_export_selected') }}
|
|
48
|
+
</button>
|
|
49
|
+
<button class="tt-btn tt-btn-primary" :disabled="busy || visibleTables.length === 0" @click="exportAll">
|
|
50
|
+
{{ busy ? t('ui_table_busy') : (filterBundle ? t('ui_table_export_filtered') : t('ui_table_export_all')) }}
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="tt-msg tt-error" v-if="error">{{ error }}</div>
|
|
56
|
+
<div class="tt-msg tt-warn" v-for="w in warnings" :key="w">{{ w }}</div>
|
|
57
|
+
<div class="tt-msg tt-ok" v-if="message">{{ message }}</div>
|
|
58
|
+
<div class="tt-msg tt-error" v-for="d in duplicates" :key="d">{{ d }}</div>
|
|
59
|
+
|
|
60
|
+
<div class="tt-list">
|
|
61
|
+
<div class="tt-row" v-for="table in visibleTables" :key="table.relative">
|
|
62
|
+
<input type="checkbox" :checked="!!selected[table.relative]" :disabled="!!table.error"
|
|
63
|
+
@change="selected[table.relative] = $event.target.checked">
|
|
64
|
+
<div class="tt-info">
|
|
65
|
+
<div class="tt-name">{{ table.tableName || table.relative }}<span class="tt-note" v-if="table.note">({{ table.note }})</span></div>
|
|
66
|
+
<div class="tt-path">{{ table.relative }}</div>
|
|
67
|
+
<div class="tt-abs" :title="table.absolute">{{ table.absolute }}</div>
|
|
68
|
+
<div class="tt-row-error" v-if="table.error">{{ table.error }}</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="tt-bin">→ {{ table.binRelative }}</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="tt-empty" v-if="visibleTables.length === 0">{{ t('ui_table_empty') }}</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|