Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 8 additions & 5 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: 20.x
cache: yarn
cache: pnpm
- name: Install
run: yarn --frozen-lockfile --network-timeout 100000 || yarn --frozen-lockfile --network-timeout 100000 || yarn --frozen-lockfile --network-timeout 100000
- run: yarn run contributors
- run: yarn run electron-releases
run: pnpm install
- run: pnpm run contributors
- run: pnpm run electron-releases
- name: test
run: yarn test:ci
run: pnpm test:ci
- name: Coveralls
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ report.json
/static/contributors.json
/static/css/root.css
/static/releases.json
/static/mh-f13

# Webpack configurations
.webpack
17 changes: 9 additions & 8 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ const config: ForgeConfig = {
}),
],
packagerConfig: {
name: 'Tachybase Fiddle',
executableName: 'tachybase-fiddle',
name: 'MH-F13',
executableName: 'mh-f13',
asar: true,
icon: path.resolve(__dirname, 'assets', 'icons', 'fiddle'),
appBundleId: 'com.tachybase.fiddle',
appCopyright: 'Copyright (C) 2025 DaoyouCloud.com All rights reserved.',
usageDescription: {
Camera:
'Access is needed by certain built-in fiddles in addition to any custom fiddles that use the Camera',
Expand All @@ -93,8 +94,8 @@ const config: ForgeConfig = {
},
],
win32metadata: {
CompanyName: 'Tachybase Community',
OriginalFilename: 'Tachybase Fiddle',
CompanyName: 'DaoyouCloud.com',
OriginalFilename: 'MH-F13',
},
osxSign: {
identity: 'Apple Development: Lin Zhang (VBZ6Z2VM5L)',
Expand All @@ -114,14 +115,14 @@ const config: ForgeConfig = {
name: '@electron-forge/maker-squirrel',
platforms: ['win32'],
config: (arch: string) => ({
name: 'tachybase-fiddle',
authors: 'Tachybase Community',
exe: 'tachybase-fiddle.exe',
name: 'mh-f13',
authors: 'DaoyouCloud.com',
exe: 'mh-f13.exe',
iconUrl:
'https://raw.githubusercontent.com/electron/fiddle/0119f0ce697f5ff7dec4fe51f17620c78cfd488b/assets/icons/fiddle.ico',
loadingGif: './assets/loading.gif',
noMsi: true,
setupExe: `tachybase-fiddle-${version}-win32-${arch}-setup.exe`,
setupExe: `mh-f13-${version}-win32-${arch}-setup.exe`,
setupIcon: path.resolve(iconDir, 'fiddle.ico'),
signWithParams: `/sha1 ${process.env.CERT_FINGERPRINT} /tr http://timestamp.digicert.com /td SHA256 /fd SHA256`,
}),
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "tachybase-fiddle",
"name": "mh-f13",
"private": true,
"productName": "Tachybase Fiddle",
"version": "0.0.2",
"description": "The easiest way to get started with Tachybase",
"productName": "MH-F13",
"version": "1.3.12",
"description": "MH-F13",
"repository": "https://github.com/tachybase/fiddle",
"homepage": "https://tachybase.org",
"main": "./.webpack/main",
Expand Down
4 changes: 2 additions & 2 deletions src/main/about-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export function setupAboutPanel(): void {
const iconPath = path.resolve(__dirname, '../assets/icons/fiddle.png');

app.setAboutPanelOptions({
applicationName: 'Tachybase Fiddle',
applicationName: 'MH-F13',
applicationVersion: app.getVersion(),
authors: contributors,
copyright: '© Electron Authors',
copyright: '© DaoyouCloud.com',
credits: 'https://github.com/electron/fiddle/graphs/contributors',
iconPath,
version: process.versions.electron,
Expand Down
28 changes: 21 additions & 7 deletions src/main/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ class IpcMainManager extends EventEmitter {
) {
const _target = target;
if (!_target) {
getOrCreateMainWindow().then((window) => {
this.send(channel, args, window.webContents);
});
getOrCreateMainWindow()
.then((window) => {
if (window && !window.isDestroyed()) {
this.send(channel, args, window.webContents);
}
})
.catch(() => {
// 如果无法创建窗口(例如应用正在退出),忽略错误
});
return;
}

Expand Down Expand Up @@ -97,12 +103,20 @@ class IpcMainManager extends EventEmitter {
) {
const _target = target;
if (!_target) {
getOrCreateMainWindow().then((window) => {
window.webContents.postMessage(channel, message, transfer);
});
getOrCreateMainWindow()
.then((window) => {
if (window && !window.isDestroyed()) {
window.webContents.postMessage(channel, message, transfer);
}
})
.catch(() => {
// 如果无法创建窗口(例如应用正在退出),忽略错误
});
return;
}
_target.postMessage(channel, message, transfer);
if (!_target.isDestroyed()) {
_target.postMessage(channel, message, transfer);
}
}
}

Expand Down
13 changes: 8 additions & 5 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { setupAboutPanel } from './about-panel';
import { processCommandLine } from './command-line';
import { setupContent } from './content';
import { setupDevTools } from './devtools';
// import { setupDevTools } from './devtools'; // 已禁用 DevTools
import { setupDialogs } from './dialogs';
import { setupTypes } from './electron-types';
import { setupFiddleCore } from './fiddle-core';
Expand All @@ -30,6 +30,7 @@ import { setupVersions } from './versions';
import { getOrCreateMainWindow, mainIsReady } from './windows';
import { IpcEvents } from '../ipc-events';
import { TachybaseEngine } from './engine';
// import { setupDevTools } from './devtools'; // 已禁用 DevTools

let argv: string[] = [];

Expand All @@ -43,17 +44,19 @@ export async function onReady() {

setupAboutPanel();

const { setupMenu } = await import('./menu');
// const { setupMenu } = await import('./menu');
const { setupFileListeners } = await import('./files');

setupShowWindow();
setupMenu();
// 禁用顶部菜单栏
// setupMenu();
setupMenuHandler();
setupProtocolHandler();
setupFileListeners();
setupUpdates();
setupDialogs();
setupDevTools();
// 禁用 DevTools
// setupDevTools();
setupTitleBarClickMac();
setupNativeTheme();
setupTemplates();
Expand Down Expand Up @@ -222,7 +225,7 @@ export function main(argv_in: string[]) {
}

// Set the app's name
app.name = 'Tachybase Fiddle';
app.name = 'MH-F13';

// Ensure that there's only ever one Fiddle running
listenForProtocolHandler();
Expand Down
Loading
Loading