Commit dd21d890 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent bea6f798
...@@ -58,7 +58,12 @@ ...@@ -58,7 +58,12 @@
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"assets": [ "assets": [
"src/favicon.ico", "src/favicon.ico",
"src/assets" "src/assets",
{
"glob": "**/*",
"input": "./node_modules/candy/res/",
"output": "./candy/res/"
}
], ],
"styles": [ "styles": [
"src/styles.scss" "src/styles.scss"
......
...@@ -154,7 +154,7 @@ async function createWindow() { ...@@ -154,7 +154,7 @@ async function createWindow() {
minWidth: 1024, minWidth: 1024,
minHeight: 640, minHeight: 640,
frame: process.platform === 'darwin', frame: process.platform === 'darwin',
webPreferences: { nodeIntegration: true, contextIsolation: false, enableRemoteModule: true, webviewTag: true }, webPreferences: { nodeIntegration: true, contextIsolation: false, enableRemoteModule: true, webviewTag: true, webSecurity: false },
titleBarStyle: process.platform === 'darwin' ? 'hidden' : undefined titleBarStyle: process.platform === 'darwin' ? 'hidden' : undefined
}); });
......
This diff is collapsed.
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
"electron-sudo": "github:mycard/electron-sudo#mycard", "electron-sudo": "github:mycard/electron-sudo#mycard",
"electron-updater": "^4.3.9", "electron-updater": "^4.3.9",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"jquery": "^3.6.0",
"raw-socket": "^1.7.0", "raw-socket": "^1.7.0",
"vue": "^2.6.14" "vue": "^2.6.14"
}, },
...@@ -47,21 +48,21 @@ ...@@ -47,21 +48,21 @@
"@types/bootstrap": "^5.1.4", "@types/bootstrap": "^5.1.4",
"@types/ini": "^1.3.30", "@types/ini": "^1.3.30",
"@types/jquery": "^3.5.6", "@types/jquery": "^3.5.6",
"@types/lodash-es": "^4.17.4",
"@types/mousetrap": "^1.6.8", "@types/mousetrap": "^1.6.8",
"@types/mustache": "^4.1.2", "@types/mustache": "^4.1.2",
"@types/node": "^16.4.13", "@types/node": "^16.4.13",
"aria2": "^3.0.1", "aria2": "^4.1.2",
"candy": "https://github.com/moecube/candy/releases/download/v2.2.0/candy.tar.gz", "candy": "https://github.com/moecube/candy/releases/download/v2.2.0/candy.tar.gz",
"candy-shop": "github:candy-chat/candy-plugins", "candy-shop": "github:candy-chat/candy-plugins",
"copy-webpack-plugin": "^9.0.1",
"electron": "^14.0.0", "electron": "^14.0.0",
"electron-builder": "^22.11.7", "electron-builder": "^22.11.7",
"electron-builder-notarize": "^1.2.0", "electron-builder-notarize": "^1.2.0",
"exports-loader": "^3.0.0", "exports-loader": "^3.0.0",
"imports-loader": "^3.0.0", "imports-loader": "^3.0.0",
"ini": "^2.0.0", "ini": "^2.0.0",
"jquery": "^3.6.0",
"jquery-i18n": "github:recurser/jquery-i18n", "jquery-i18n": "github:recurser/jquery-i18n",
"lodash-es": "^4.17.21",
"mousetrap": "^1.6.5", "mousetrap": "^1.6.5",
"mustache": "^4.2.0", "mustache": "^4.2.0",
"reconnecting-websocket": "^4.4.0", "reconnecting-websocket": "^4.4.0",
......
...@@ -23,7 +23,7 @@ import { App } from '../shared/app'; ...@@ -23,7 +23,7 @@ import { App } from '../shared/app';
import { AppsService } from '../apps.service'; import { AppsService } from '../apps.service';
import { LoginService } from '../login/login.service'; import { LoginService } from '../login/login.service';
import { SettingsService } from '../settings.service'; import { SettingsService } from '../settings.service';
import _ from 'lodash'; import _ from 'lodash-es';
import fg from 'fast-glob'; import fg from 'fast-glob';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import WillNavigateEvent = Electron.WillNavigateEvent; import WillNavigateEvent = Electron.WillNavigateEvent;
...@@ -708,9 +708,9 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -708,9 +708,9 @@ export class YGOProComponent implements OnInit, OnDestroy {
data.arena_rank = data2.arena_rank; data.arena_rank = data2.arena_rank;
data.exp_rank_ex = exp_rank_ex; data.exp_rank_ex = exp_rank_ex;
data.arena_rank_ex = arena_rank_ex; data.arena_rank_ex = arena_rank_ex;
if (start_time !== data.start_time) { // if (start_time !== data.start_time) {
this.appsService.showResult('projects/ygopro-result/end_YGOPro_single.html', data, 202, 222); this.appsService.showResult('projects/ygopro-result/end_YGOPro_single.html', data, 202, 222);
} // }
}); });
} catch (error) { } catch (error) {
console.log(error); console.log(error);
......
const CopyPlugin = require('copy-webpack-plugin');
module.exports = { module.exports = {
target: 'electron-renderer', target: 'electron-renderer',
externals: { externals: {
bufferutil: 'commonjs2 bufferutil', bufferutil: 'commonjs2 bufferutil',
'utf-8-validate': 'commonjs2 utf-8-validate', 'utf-8-validate': 'commonjs2 utf-8-validate',
'raw-socket': 'commonjs2 raw-socket', 'raw-socket': 'commonjs2 raw-socket',
'electron-store': 'commonjs2 electron-store',
}, },
plugins: [
new CopyPlugin({
patterns: [{ from: 'node_modules/candy/res', to: 'candy/res' }],
}),
],
module: { module: {
rules: [ rules: [
{ {
test: require.resolve('candy'), test: require.resolve('candy'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'default mustache Mustache'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['Candy'] } },
options: {
imports: ['default jquery jQuery', 'default mustache Mustache'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['Candy'],
},
},
], ],
}, },
{ {
test: require.resolve('jquery-i18n/jquery.i18n.js'), test: require.resolve('jquery-i18n/jquery.i18n.js'),
loader: 'imports-loader', use: [{ loader: 'imports-loader', options: { type: 'commonjs', imports: 'single jquery jQuery' } }],
options: {
type: 'commonjs',
imports: 'single jquery jQuery',
},
}, },
{ {
test: require.resolve('candy-shop/notifyme/candy.js'), test: require.resolve('candy-shop/notifyme/candy.js'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'named candy Candy'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['default CandyShop.NotifyMe'] } },
options: {
imports: ['default jquery jQuery', 'named candy Candy'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['default CandyShop.NotifyMe'],
},
},
], ],
}, },
{ {
test: require.resolve('candy-shop/namecomplete/candy.js'), test: require.resolve('candy-shop/namecomplete/candy.js'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'named candy Candy'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['default CandyShop.NameComplete'] } },
options: {
imports: ['default jquery jQuery', 'named candy Candy'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['default CandyShop.NameComplete'],
},
},
], ],
}, },
{ {
test: require.resolve('candy-shop/modify-role/candy.js'), test: require.resolve('candy-shop/modify-role/candy.js'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'named candy Candy'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['default CandyShop.ModifyRole'] } },
options: {
imports: ['default jquery jQuery', 'named candy Candy'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['default CandyShop.ModifyRole'],
},
},
], ],
}, },
{ {
test: require.resolve('candy-shop/me-does/candy.js'), test: require.resolve('candy-shop/me-does/candy.js'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'named candy Candy'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['default CandyShop.MeDoes'] } },
options: {
imports: ['default jquery jQuery', 'named candy Candy'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['default CandyShop.MeDoes'],
},
},
], ],
}, },
{ {
test: require.resolve('candy-shop/notifications/candy.js'), test: require.resolve('candy-shop/notifications/candy.js'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'named candy Candy'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['default CandyShop.Notifications'] } },
options: {
imports: ['default jquery jQuery', 'named candy Candy'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['default CandyShop.Notifications'],
},
},
], ],
}, },
{ {
test: require.resolve('candy-shop/refocus/candy.js'), test: require.resolve('candy-shop/refocus/candy.js'),
use: [ use: [
{ { loader: 'imports-loader', options: { imports: ['default jquery jQuery', 'named candy Candy'] } },
loader: 'imports-loader', { loader: 'exports-loader', options: { exports: ['default CandyShop.Refocus'] } },
options: {
imports: ['default jquery jQuery', 'named candy Candy'],
},
},
{
loader: 'exports-loader',
options: {
exports: ['default CandyShop.Refocus'],
},
},
], ],
}, },
], ],
......
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