zen-gitsync 2.10.6 → 2.10.8

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.
@@ -6,10 +6,10 @@
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>Zen GitSync</title>
9
- <script type="module" crossorigin src="/assets/index-CE8MuEHT.js"></script>
10
- <link rel="modulepreload" crossorigin href="/assets/vendor-CMQOaDSj.js">
11
- <link rel="stylesheet" crossorigin href="/assets/vendor-BreftYKt.css">
12
- <link rel="stylesheet" crossorigin href="/assets/index-Tb2lPpLB.css">
9
+ <script type="module" crossorigin src="/assets/index-DGL8BdDB.js"></script>
10
+ <link rel="modulepreload" crossorigin href="/assets/vendor-D8Cadz3F.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/vendor-DpSHka1A.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-BS0V07Ya.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="app"></div>
@@ -449,7 +449,8 @@ export function registerConfigRoutes({
449
449
  name: command.name,
450
450
  description: command.description || '',
451
451
  directory: command.directory || '',
452
- command: command.command
452
+ command: command.command,
453
+ params: Array.isArray(command.params) ? command.params : []
453
454
  }
454
455
 
455
456
  config.customCommands.push(newCommand)
@@ -505,7 +506,8 @@ export function registerConfigRoutes({
505
506
  name: command.name,
506
507
  description: command.description || '',
507
508
  directory: command.directory || '',
508
- command: command.command
509
+ command: command.command,
510
+ params: Array.isArray(command.params) ? command.params : []
509
511
  }
510
512
  await configManager.saveConfig(config)
511
513
  } else {
@@ -637,4 +639,31 @@ export function registerConfigRoutes({
637
639
  res.status(500).json({ success: false, error: error.message })
638
640
  }
639
641
  })
642
+
643
+ // 保存“一键推送成功后启动项”
644
+ app.post('/api/config/save-after-quick-push-action', express.json(), async (req, res) => {
645
+ try {
646
+ const { afterQuickPushAction } = req.body
647
+
648
+ if (!afterQuickPushAction || typeof afterQuickPushAction !== 'object') {
649
+ return res.status(400).json({ success: false, error: '缺少必要参数' })
650
+ }
651
+
652
+ const enabled = Boolean(afterQuickPushAction.enabled)
653
+ const type = afterQuickPushAction.type === 'workflow' ? 'workflow' : 'command'
654
+ const refId = String(afterQuickPushAction.refId || '').trim()
655
+
656
+ const config = await configManager.loadConfig()
657
+ config.afterQuickPushAction = {
658
+ enabled,
659
+ type,
660
+ refId
661
+ }
662
+ await configManager.saveConfig(config)
663
+
664
+ res.json({ success: true })
665
+ } catch (error) {
666
+ res.status(500).json({ success: false, error: error.message })
667
+ }
668
+ })
640
669
  }