delete custom-electron-titlebar
This commit is contained in:
parent
aabcfb230f
commit
dc08f46909
|
@ -2,25 +2,9 @@ var electron = require('electron')
|
|||
const shell = electron.shell
|
||||
var ipc = electron.ipcRenderer
|
||||
//title bar
|
||||
const customTitlebar = require('custom-electron-titlebar')
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
document.title = 'TheDesk'
|
||||
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) {
|
||||
|
|
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 ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
|
||||
var ua_path = join(app.getPath('userData'), 'useragent')
|
||||
var frame_path = join(app.getPath('userData'), 'frame')
|
||||
try {
|
||||
fs.readFileSync(ha_path, 'utf8')
|
||||
app.disableHardwareAcceleration()
|
||||
|
@ -152,19 +151,6 @@ function createWindow() {
|
|||
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 bit = process.arch
|
||||
|
@ -180,8 +166,7 @@ function createWindow() {
|
|||
height: window_size.height,
|
||||
x: window_size.x,
|
||||
y: window_size.y,
|
||||
show: false,
|
||||
frame: frame,
|
||||
show: true,
|
||||
}
|
||||
if (platform == 'linux') {
|
||||
arg.resizable = true
|
||||
|
@ -190,7 +175,6 @@ function createWindow() {
|
|||
arg.simpleFullscreen = true
|
||||
} else if (platform == 'darwin') {
|
||||
arg.simpleFullscreen = true
|
||||
arg.titleBarStyle = frameTitle
|
||||
}
|
||||
mainWindow = new BrowserWindow(arg)
|
||||
mainWindow.once('page-title-updated', () => {
|
||||
|
@ -294,10 +278,7 @@ function createWindow() {
|
|||
|
||||
var platform = process.platform
|
||||
var bit = process.arch
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname, frame)))
|
||||
if (!frame) {
|
||||
mainWindow.setMenu(null)
|
||||
}
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname)))
|
||||
//CSS
|
||||
css.css(mainWindow)
|
||||
//アップデータとダウンロード
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// 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"){
|
||||
lang = "en"
|
||||
|
@ -9,11 +9,6 @@ function templete(lang, mainWindow, packaged, dir, dirname, frame) {
|
|||
const app = electron.app;
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const join = require('path').join;
|
||||
ipc.on("frameCheck", function(e, arg) {
|
||||
if(!frame) {
|
||||
e.sender.webContents.send("frame", "");
|
||||
}
|
||||
});
|
||||
const dict = {
|
||||
"application": {
|
||||
"ja": "アプリケーション",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"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: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"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -60,7 +60,6 @@
|
|||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.14.0",
|
||||
"custom-electron-titlebar": "^3.2.4",
|
||||
"electron-dl": "^3.0.2",
|
||||
"jimp": "^0.16.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"
|
||||
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:
|
||||
version "1.14.1"
|
||||
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
|
||||
|
|
Loading…
Reference in New Issue
Block a user