ygc-dsh-sync 1.2.1 → 1.2.2
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/client.js +41 -0
- package/lib/api.js +3 -0
- package/lib/features.js +19 -4
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -1062,6 +1062,47 @@ function makePanel(React) {
|
|
|
1062
1062
|
),
|
|
1063
1063
|
)
|
|
1064
1064
|
: null,
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* 你点过「跳过」的目录。
|
|
1068
|
+
*
|
|
1069
|
+
* 跳过的语义就是「从待决定清单里消失」,所以它必须在这里有个落点,
|
|
1070
|
+
* 否则改不了主意只能翻文件。点「改为建特征文件夹」走 /features/adopt,
|
|
1071
|
+
* 会顺手把跳过记录清掉。
|
|
1072
|
+
*/
|
|
1073
|
+
(state.features && (state.features.declined || []).length)
|
|
1074
|
+
? h(
|
|
1075
|
+
'div',
|
|
1076
|
+
{ style: { marginTop: 14 } },
|
|
1077
|
+
h(
|
|
1078
|
+
'div',
|
|
1079
|
+
{ className: 'dsb-row-t', style: { marginBottom: 6 } },
|
|
1080
|
+
`已跳过:${state.features.declined.length} 个(不再询问,可改主意)`,
|
|
1081
|
+
),
|
|
1082
|
+
(state.features.declined || []).map((w) =>
|
|
1083
|
+
h(
|
|
1084
|
+
'div',
|
|
1085
|
+
{ className: 'dsb-row', key: w.path },
|
|
1086
|
+
h(
|
|
1087
|
+
'div',
|
|
1088
|
+
{ className: 'dsb-row-main' },
|
|
1089
|
+
h('div', { className: 'dsb-row-t' }, w.title),
|
|
1090
|
+
h('div', { className: 'dsb-row-d' }, '你选了不在这个目录建本机特征文件夹'),
|
|
1091
|
+
h('div', { className: 'dsb-row-d' }, w.path),
|
|
1092
|
+
),
|
|
1093
|
+
h(
|
|
1094
|
+
'button',
|
|
1095
|
+
{
|
|
1096
|
+
className: 'dsb-btn dsb-btn-sm',
|
|
1097
|
+
disabled: !!busy,
|
|
1098
|
+
onClick: () => doAdopt([w.path]),
|
|
1099
|
+
},
|
|
1100
|
+
'改为建特征文件夹',
|
|
1101
|
+
),
|
|
1102
|
+
),
|
|
1103
|
+
),
|
|
1104
|
+
)
|
|
1105
|
+
: null,
|
|
1065
1106
|
),
|
|
1066
1107
|
|
|
1067
1108
|
// 插件清单同步(1.0.0 从自动更新器迁入)
|
package/lib/api.js
CHANGED
|
@@ -292,6 +292,9 @@ export function createApi(deps) {
|
|
|
292
292
|
initialized: state.features.initialized === true,
|
|
293
293
|
pending: plan.ask,
|
|
294
294
|
pendingCount: plan.ask.length,
|
|
295
|
+
// 你点过「跳过」的目录:不在 pending 里,但要能在面板上找回来(可改主意)
|
|
296
|
+
declined: plan.declined,
|
|
297
|
+
declinedCount: plan.declined.length,
|
|
295
298
|
activeCount: active.length,
|
|
296
299
|
inactiveCount: inactive.length,
|
|
297
300
|
// 巡检会自动处理的(面板上只报个数)
|
package/lib/features.js
CHANGED
|
@@ -203,6 +203,7 @@ export function planFeatures({
|
|
|
203
203
|
const createFolder = [];
|
|
204
204
|
const restoreWorkspace = [];
|
|
205
205
|
const ask = [];
|
|
206
|
+
const declined = [];
|
|
206
207
|
const drop = [];
|
|
207
208
|
const seed = [];
|
|
208
209
|
|
|
@@ -232,8 +233,14 @@ export function planFeatures({
|
|
|
232
233
|
if (!underFolders(ws.path)) continue;
|
|
233
234
|
|
|
234
235
|
if (decisionOf(state, ws.path) === 'decline') {
|
|
235
|
-
|
|
236
|
-
|
|
236
|
+
/**
|
|
237
|
+
* 人明确说过这个目录不要建 → **从待决定清单里移除**,也不自动补文件夹。
|
|
238
|
+
*
|
|
239
|
+
* 之前这里是继续 push 进 ask(why='declined'),结果人每轮巡检都被同一个目录
|
|
240
|
+
* 挡着,「跳过」等于没跳过。真正的跳过 = 不再出现在清单里;
|
|
241
|
+
* 想改主意到「未参与同步」那一栏点「建特征文件夹」(走 /features/adopt,会清掉这条记录)。
|
|
242
|
+
*/
|
|
243
|
+
declined.push(entry);
|
|
237
244
|
continue;
|
|
238
245
|
}
|
|
239
246
|
|
|
@@ -250,8 +257,16 @@ export function planFeatures({
|
|
|
250
257
|
// 这里必须跳过:同一个目录不能既补文件夹又问人(scanFolders 会把它同时扫进 discover)。
|
|
251
258
|
if (knownWorkspacePaths.has(keyOf(d.path))) continue;
|
|
252
259
|
const title = d.title || path.basename(d.path);
|
|
260
|
+
/**
|
|
261
|
+
* 人点过「跳过」的目录:**不再列进 pending**。
|
|
262
|
+
*
|
|
263
|
+
* 之前这里是把 why 改成 'declined' 继续留在列表里 —— 那不是跳过,是把
|
|
264
|
+
* 「要不要建」的问句换成「你说过不建」的标签,人每轮巡检还是被同一个目录挡着。
|
|
265
|
+
* 真正的跳过 = 从清单里消失;想改主意到「未参与同步」那一栏点「建特征文件夹」即可
|
|
266
|
+
*(那条路走 /features/adopt,会把 decline 记录清掉)。
|
|
267
|
+
*/
|
|
253
268
|
if (decisionOf(state, d.path) === 'decline') {
|
|
254
|
-
|
|
269
|
+
declined.push({ id: null, path: d.path, title });
|
|
255
270
|
continue;
|
|
256
271
|
}
|
|
257
272
|
if (hasFeature(d.path, machineId)) {
|
|
@@ -278,7 +293,7 @@ export function planFeatures({
|
|
|
278
293
|
drop.push({ id, path: p, title: path.basename(p) });
|
|
279
294
|
}
|
|
280
295
|
|
|
281
|
-
return { active, createFolder, restoreWorkspace, ask, drop, seed, seenNow };
|
|
296
|
+
return { active, createFolder, restoreWorkspace, ask, declined, drop, seed, seenNow };
|
|
282
297
|
}
|
|
283
298
|
|
|
284
299
|
/**
|