Commit 9e93ed3f authored by 神楽坂玲奈's avatar 神楽坂玲奈

tray

parent 00af611c
...@@ -104,13 +104,16 @@ ...@@ -104,13 +104,16 @@
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<div class="checkbox"> <div class="checkbox">
<label i18n>允许启动效果优先权</label><input name="enable_priority" type="checkbox" [(ngModel)]="room.enable_priority"> <input id="enable_priority" name="enable_priority" type="checkbox" [(ngModel)]="room.enable_priority">
<label i18n for="enable_priority">允许启动效果优先权</label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label i18n>不检查卡组</label><input name="no_check_deck" type="checkbox" [(ngModel)]="room.no_check_deck"> <input id="no_check_deck" name="no_check_deck" type="checkbox" [(ngModel)]="room.no_check_deck">
<label i18n for="no_check_deck">不检查卡组</label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label i18n>开局不洗卡组</label><input name="no_shuffle_deck" type="checkbox" [(ngModel)]="room.no_shuffle_deck"> <input id="no_shuffle_deck" name="no_shuffle_deck" type="checkbox" [(ngModel)]="room.no_shuffle_deck">
<label for="no_shuffle_deck" i18n>开局不洗卡组</label>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2187,9 +2187,9 @@ ...@@ -2187,9 +2187,9 @@
"description": { "description": {
"zh-CN": "A script engine for \"yu-gi-oh!\" and sample gui." "zh-CN": "A script engine for \"yu-gi-oh!\" and sample gui."
}, },
"category": "emulator", "category": "module",
"tags": [ "tags": [
"yugioh" "language"
], ],
"dependencies": { "dependencies": {
"win32": [ "win32": [
......
...@@ -162,9 +162,9 @@ function createWindow() { ...@@ -162,9 +162,9 @@ function createWindow() {
}) })
} }
let tray;
function createTray() { function createTray() {
console.log('create tray begin'); tray = new Tray(path.join(process.env['NODE_ENV'] == 'production' ? process.resourcesPath : app.getAppPath(), 'images', 'icon.ico'));
let tray = new Tray(path.join(process.env['NODE_ENV'] == 'production' ? process.resourcesPath : app.getAppPath(), 'images', 'icon.ico'));
tray.on('click', (event) => { tray.on('click', (event) => {
mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show(); mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show();
}); });
...@@ -183,23 +183,19 @@ function createTray() { ...@@ -183,23 +183,19 @@ function createTray() {
]); ]);
tray.setToolTip('MyCard'); tray.setToolTip('MyCard');
tray.setContextMenu(contextMenu); tray.setContextMenu(contextMenu);
console.log('create tray finish');
} }
// This method will be called when Electron has finished // This method will be called when Electron has finished
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs. // Some APIs can only be used after this event occurs.
app.on('ready', () => { app.on('ready', () => {
console.log('create window');
createWindow(); createWindow();
if (process.platform == 'win32') { if (process.platform == 'win32') {
console.log('before create tray');
createTray() createTray()
} }
if (process.env['NODE_ENV'] == 'production') { if (process.env['NODE_ENV'] == 'production') {
autoUpdater.checkForUpdates() autoUpdater.checkForUpdates()
} }
console.log('update');
}); });
// Quit when all windows are closed. // Quit when all windows are closed.
......
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
</trans-unit> </trans-unit>
<trans-unit datatype="html" id="d4038dd5d0e9d5139d425fc7bea40e40d965cc5b"> <trans-unit datatype="html" id="d4038dd5d0e9d5139d425fc7bea40e40d965cc5b">
<source>额外选项</source> <source>额外选项</source>
<target>Additional Options</target> <target>Additional Options</target>
</trans-unit> </trans-unit>
<trans-unit datatype="html" id="01cfbee3f1d69f5adae299b7b8c8d75034aef53b"> <trans-unit datatype="html" id="01cfbee3f1d69f5adae299b7b8c8d75034aef53b">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment