zen-gitsync 2.9.7 → 2.9.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-qLiG8XCf.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-DXmNo3gw.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/assets/vendor-PvZNfVU0.js">
11
11
  <link rel="stylesheet" crossorigin href="/assets/vendor-BUGaay5Z.css">
12
- <link rel="stylesheet" crossorigin href="/assets/index-CePbooEv.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-C-ZzwQYX.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="app"></div>
@@ -2153,6 +2153,28 @@ async function startUIServer(noOpen = false, savePort = false) {
2153
2153
  }
2154
2154
  })
2155
2155
 
2156
+ // 保存项目启动项
2157
+ app.post('/api/config/save-startup-items', express.json(), async (req, res) => {
2158
+ try {
2159
+ const { startupItems, startupAutoRun } = req.body
2160
+
2161
+ if (!Array.isArray(startupItems)) {
2162
+ return res.status(400).json({ success: false, error: '启动项必须是数组' })
2163
+ }
2164
+
2165
+ const config = await configManager.loadConfig()
2166
+ config.startupItems = startupItems
2167
+ if (typeof startupAutoRun === 'boolean') {
2168
+ config.startupAutoRun = startupAutoRun
2169
+ }
2170
+ await configManager.saveConfig(config)
2171
+
2172
+ res.json({ success: true })
2173
+ } catch (error) {
2174
+ res.status(500).json({ success: false, error: error.message })
2175
+ }
2176
+ })
2177
+
2156
2178
  // 读取 package.json 文件内容
2157
2179
  app.post('/api/read-package-json', express.json(), async (req, res) => {
2158
2180
  try {