delete custom-electron-titlebar
This commit is contained in:
		@@ -2,25 +2,9 @@ var electron = require('electron')
 | 
				
			|||||||
const shell = electron.shell
 | 
					const shell = electron.shell
 | 
				
			||||||
var ipc = electron.ipcRenderer
 | 
					var ipc = electron.ipcRenderer
 | 
				
			||||||
//title bar
 | 
					//title bar
 | 
				
			||||||
const customTitlebar = require('custom-electron-titlebar')
 | 
					 | 
				
			||||||
window.addEventListener('DOMContentLoaded', () => {
 | 
					window.addEventListener('DOMContentLoaded', () => {
 | 
				
			||||||
	document.title = 'TheDesk'
 | 
						document.title = 'TheDesk'
 | 
				
			||||||
	ipc.send('acsCheck', '')
 | 
						ipc.send('acsCheck', '')
 | 
				
			||||||
	ipc.send('frameCheck', '')
 | 
					 | 
				
			||||||
	ipc.on('frame', function(event, args) {
 | 
					 | 
				
			||||||
		const file = location.href.substr(-10)
 | 
					 | 
				
			||||||
		if (
 | 
					 | 
				
			||||||
			file == 'index.html' ||
 | 
					 | 
				
			||||||
			file == '/acct.html' ||
 | 
					 | 
				
			||||||
			file == 'tting.html'
 | 
					 | 
				
			||||||
		) {
 | 
					 | 
				
			||||||
			new customTitlebar.Titlebar({
 | 
					 | 
				
			||||||
				backgroundColor: customTitlebar.Color.fromHex('#000'),
 | 
					 | 
				
			||||||
				titleHorizontalAlignment: 'right',
 | 
					 | 
				
			||||||
				icon: '../../img/desk.png'
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		})
 | 
					 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
onmessage = function(e) {
 | 
					onmessage = function(e) {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										23
									
								
								app/main.js
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								app/main.js
									
									
									
									
									
								
							@@ -124,7 +124,6 @@ function createWindow() {
 | 
				
			|||||||
	var max_info_path = join(app.getPath('userData'), 'max-window-size.json')
 | 
						var max_info_path = join(app.getPath('userData'), 'max-window-size.json')
 | 
				
			||||||
	var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
 | 
						var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
 | 
				
			||||||
	var ua_path = join(app.getPath('userData'), 'useragent')
 | 
						var ua_path = join(app.getPath('userData'), 'useragent')
 | 
				
			||||||
	var frame_path = join(app.getPath('userData'), 'frame')
 | 
					 | 
				
			||||||
	try {
 | 
						try {
 | 
				
			||||||
		fs.readFileSync(ha_path, 'utf8')
 | 
							fs.readFileSync(ha_path, 'utf8')
 | 
				
			||||||
		app.disableHardwareAcceleration()
 | 
							app.disableHardwareAcceleration()
 | 
				
			||||||
@@ -152,19 +151,6 @@ function createWindow() {
 | 
				
			|||||||
			y: 'string',
 | 
								y: 'string',
 | 
				
			||||||
		} // デフォルトバリュー
 | 
							} // デフォルトバリュー
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	try {
 | 
					 | 
				
			||||||
		var frameRaw = fs.readFileSync(frame_path, 'utf8')
 | 
					 | 
				
			||||||
		if (frameRaw == 'false') {
 | 
					 | 
				
			||||||
			var frame = false
 | 
					 | 
				
			||||||
			var frameTitle = 'hidden'
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			var frame = true
 | 
					 | 
				
			||||||
			var frameTitle = 'default'
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	} catch {
 | 
					 | 
				
			||||||
		var frame = true
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	// メイン画面の表示。ウィンドウの幅、高さを指定できる
 | 
						// メイン画面の表示。ウィンドウの幅、高さを指定できる
 | 
				
			||||||
	var platform = process.platform
 | 
						var platform = process.platform
 | 
				
			||||||
	var bit = process.arch
 | 
						var bit = process.arch
 | 
				
			||||||
@@ -180,8 +166,7 @@ function createWindow() {
 | 
				
			|||||||
		height: window_size.height,
 | 
							height: window_size.height,
 | 
				
			||||||
		x: window_size.x,
 | 
							x: window_size.x,
 | 
				
			||||||
		y: window_size.y,
 | 
							y: window_size.y,
 | 
				
			||||||
		show: false,
 | 
							show: true,
 | 
				
			||||||
		frame: frame,
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (platform == 'linux') {
 | 
						if (platform == 'linux') {
 | 
				
			||||||
		arg.resizable = true
 | 
							arg.resizable = true
 | 
				
			||||||
@@ -190,7 +175,6 @@ function createWindow() {
 | 
				
			|||||||
		arg.simpleFullscreen = true
 | 
							arg.simpleFullscreen = true
 | 
				
			||||||
	} else if (platform == 'darwin') {
 | 
						} else if (platform == 'darwin') {
 | 
				
			||||||
		arg.simpleFullscreen = true
 | 
							arg.simpleFullscreen = true
 | 
				
			||||||
		arg.titleBarStyle = frameTitle
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	mainWindow = new BrowserWindow(arg)
 | 
						mainWindow = new BrowserWindow(arg)
 | 
				
			||||||
	mainWindow.once('page-title-updated', () => {
 | 
						mainWindow.once('page-title-updated', () => {
 | 
				
			||||||
@@ -294,10 +278,7 @@ function createWindow() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	var platform = process.platform
 | 
						var platform = process.platform
 | 
				
			||||||
	var bit = process.arch
 | 
						var bit = process.arch
 | 
				
			||||||
	Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname, frame)))
 | 
						Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname)))
 | 
				
			||||||
	if (!frame) {
 | 
					 | 
				
			||||||
		mainWindow.setMenu(null)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	//CSS
 | 
						//CSS
 | 
				
			||||||
	css.css(mainWindow)
 | 
						css.css(mainWindow)
 | 
				
			||||||
	//アップデータとダウンロード
 | 
						//アップデータとダウンロード
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
// Create the Application's main menu
 | 
					// Create the Application's main menu
 | 
				
			||||||
function templete(lang, mainWindow, packaged, dir, dirname, frame) {
 | 
					function templete(lang, mainWindow, packaged, dir, dirname) {
 | 
				
			||||||
    //フレーム
 | 
					    //フレーム
 | 
				
			||||||
    if(lang !="ja" && lang != "en"){
 | 
					    if(lang !="ja" && lang != "en"){
 | 
				
			||||||
        lang = "en"
 | 
					        lang = "en"
 | 
				
			||||||
@@ -9,11 +9,6 @@ function templete(lang, mainWindow, packaged, dir, dirname, frame) {
 | 
				
			|||||||
    const app = electron.app;
 | 
					    const app = electron.app;
 | 
				
			||||||
    const BrowserWindow = electron.BrowserWindow;
 | 
					    const BrowserWindow = electron.BrowserWindow;
 | 
				
			||||||
    const join = require('path').join;
 | 
					    const join = require('path').join;
 | 
				
			||||||
    ipc.on("frameCheck", function(e, arg) {
 | 
					 | 
				
			||||||
		if(!frame) {
 | 
					 | 
				
			||||||
            e.sender.webContents.send("frame", "");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
	});
 | 
					 | 
				
			||||||
    const dict = {
 | 
					    const dict = {
 | 
				
			||||||
        "application": {
 | 
					        "application": {
 | 
				
			||||||
            "ja": "アプリケーション",
 | 
					            "ja": "アプリケーション",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@
 | 
				
			|||||||
        "build:linux:snapstore": "node view/make/make.js --automatic --store && npx electron-builder --linux",
 | 
					        "build:linux:snapstore": "node view/make/make.js --automatic --store && npx electron-builder --linux",
 | 
				
			||||||
        "build:mac:web": "node view/make/make.js --automatic && npx electron-builder --mac",
 | 
					        "build:mac:web": "node view/make/make.js --automatic && npx electron-builder --mac",
 | 
				
			||||||
        "build:mac:homebrew": "node view/make/make.js --automatic --store && npx electron-builder --mac",
 | 
					        "build:mac:homebrew": "node view/make/make.js --automatic --store && npx electron-builder --mac",
 | 
				
			||||||
        "lint:fix": "eslint js --fix" ,
 | 
					        "lint:fix": "eslint js --fix",
 | 
				
			||||||
        "lint": "eslint js"
 | 
					        "lint": "eslint js"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "keywords": [
 | 
					    "keywords": [
 | 
				
			||||||
@@ -60,7 +60,6 @@
 | 
				
			|||||||
    "license": "GPL-3.0",
 | 
					    "license": "GPL-3.0",
 | 
				
			||||||
    "dependencies": {
 | 
					    "dependencies": {
 | 
				
			||||||
        "@fortawesome/fontawesome-free": "^5.14.0",
 | 
					        "@fortawesome/fontawesome-free": "^5.14.0",
 | 
				
			||||||
        "custom-electron-titlebar": "^3.2.4",
 | 
					 | 
				
			||||||
        "electron-dl": "^3.0.2",
 | 
					        "electron-dl": "^3.0.2",
 | 
				
			||||||
        "jimp": "^0.16.1",
 | 
					        "jimp": "^0.16.1",
 | 
				
			||||||
        "jquery": "^3.5.1",
 | 
					        "jquery": "^3.5.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -986,11 +986,6 @@ crypto-random-string@^2.0.0:
 | 
				
			|||||||
  resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
 | 
					  resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
 | 
				
			||||||
  integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
 | 
					  integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
 | 
				
			||||||
 | 
					
 | 
				
			||||||
custom-electron-titlebar@^3.2.4:
 | 
					 | 
				
			||||||
  version "3.2.4"
 | 
					 | 
				
			||||||
  resolved "https://registry.yarnpkg.com/custom-electron-titlebar/-/custom-electron-titlebar-3.2.4.tgz#671b7871f47f2da7ca9f5f659aec6ca7294aa4ed"
 | 
					 | 
				
			||||||
  integrity sha512-zjjw8lcn2JwYaqLSLZtPWnP6IjPSix+nr3QNf5OPsNzdFDGORAUsIhU7A6vNg8aWpsjNc8rsvOW6MVcHwPrUDQ==
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
dashdash@^1.12.0:
 | 
					dashdash@^1.12.0:
 | 
				
			||||||
  version "1.14.1"
 | 
					  version "1.14.1"
 | 
				
			||||||
  resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
 | 
					  resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user