(tab?: string | null)
| 351 | } |
| 352 | |
| 353 | createSetting(tab?: string | null) { |
| 354 | const width = 550; |
| 355 | const height = 680; |
| 356 | const { |
| 357 | x: xBound, |
| 358 | y: yBound, |
| 359 | width: screenWidth, |
| 360 | height: screenHeight, |
| 361 | } = this.getDisplay().bounds; |
| 362 | |
| 363 | const t = store.getters.locale; |
| 364 | const cfg = { |
| 365 | x: xBound + (screenWidth - width) / 2, |
| 366 | y: yBound + (screenHeight - height) / 2, |
| 367 | width: width, |
| 368 | height: height, |
| 369 | maximizable: false, |
| 370 | minimizable: false, |
| 371 | title: t["settings"], |
| 372 | parent: this.mainWindow, |
| 373 | frame: false, |
| 374 | }; |
| 375 | // TODO 这里要保存用户当前的窗口参数 |
| 376 | // const previous_cfg = config.get<LayoutConfig>("settings"); |
| 377 | // cfg["width"] = previous_cfg["width"]; |
| 378 | // cfg["height"] = previous_cfg["height"]; |
| 379 | const queryString = tab ? "?" + qs.stringify({ tab }) : ""; |
| 380 | return this.createWindow("settings", cfg, false, queryString); |
| 381 | } |
| 382 | } |
no test coverage detected