Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Build electron plugin dist folder
  • Loading branch information
WINBIGFOX committed Mar 30, 2025
commit d90e6b55fe2118264f345b29bfd8d3baf4258680
14 changes: 13 additions & 1 deletion resources/js/electron-plugin/dist/server/api/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
import express from 'express';
import { BrowserWindow, systemPreferences, safeStorage } from 'electron';
import { BrowserWindow, systemPreferences, safeStorage, nativeTheme } from 'electron';
const router = express.Router();
router.get('/can-prompt-touch-id', (req, res) => {
res.json({
Expand Down Expand Up @@ -107,4 +107,16 @@ router.post('/print-to-pdf', (req, res) => __awaiter(void 0, void 0, void 0, fun
});
yield printWindow.loadURL(`data:text/html;charset=UTF-8,${html}`);
}));
router.get('/theme', (req, res) => {
res.json({
result: nativeTheme.themeSource,
});
});
router.post('/theme', (req, res) => {
const { theme } = req.body;
nativeTheme.themeSource = theme;
res.json({
result: theme,
});
});
export default router;
Loading