Add TheDesk icon

This commit is contained in:
kPherox 2019-04-06 00:38:20 +09:00
parent dd1c0aae4e
commit 3ec45ab7e9
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
5 changed files with 717 additions and 9 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ yarn-error.log*
#Electron-builder output
/dist_electron
/build

710
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,12 +4,14 @@
"description": "TheDesk is a Mastodon client for PC.",
"private": true,
"license": "GPL-3.0",
"repository": "https://github.com/kPherox/TheDesk-Vue",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve",
"electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
},
@ -25,6 +27,7 @@
"babel-eslint": "^10.0.1",
"electron": "^4.0.0",
"electron-context-menu": "^0.11.0",
"electron-icon-builder": "^1.0.0",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"vue-cli-plugin-electron-builder": "^1.2.0",

BIN
public/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,11 +1,13 @@
'use strict'
import { app, protocol, BrowserWindow } from 'electron'
import contextMenu from 'electron-context-menu'
import path from 'path'
import {
createProtocol,
installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib'
import contextMenu from 'electron-context-menu'
const isDevelopment = process.env.NODE_ENV !== 'production'
// Keep a global reference of the window object, if you don't, the window will
@ -18,7 +20,11 @@ contextMenu()
protocol.registerStandardSchemes(['app'], { secure: true })
function createWindow () {
// Create the browser window.
win = new BrowserWindow({ width: 800, height: 600 })
win = new BrowserWindow({
width: 800,
height: 600,
icon: path.join(__static, 'icon.png')
})
if (process.env.WEBPACK_DEV_SERVER_URL) {
// Load the url of the dev server if in development mode