zen-gitsync 2.10.7 → 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-5z2rWrTJ.js"></script>
10
- <link rel="modulepreload" crossorigin href="/assets/vendor-CrYGMytM.js">
11
- <link rel="stylesheet" crossorigin href="/assets/vendor-BreftYKt.css">
12
- <link rel="stylesheet" crossorigin href="/assets/index-bVmQ0atC.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>
@@ -639,4 +639,31 @@ export function registerConfigRoutes({
639
639
  res.status(500).json({ success: false, error: error.message })
640
640
  }
641
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
+ })
642
669
  }