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

3
.gitignore vendored
View File

@ -21,4 +21,5 @@ yarn-error.log*
*.sw* *.sw*
#Electron-builder output #Electron-builder output
/dist_electron /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.", "description": "TheDesk is a Mastodon client for PC.",
"private": true, "private": true,
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": "https://github.com/kPherox/TheDesk-Vue",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build", "electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve", "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", "postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps" "postuninstall": "electron-builder install-app-deps"
}, },
@ -25,6 +27,7 @@
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"electron": "^4.0.0", "electron": "^4.0.0",
"electron-context-menu": "^0.11.0", "electron-context-menu": "^0.11.0",
"electron-icon-builder": "^1.0.0",
"eslint": "^5.8.0", "eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
"vue-cli-plugin-electron-builder": "^1.2.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' 'use strict'
import { app, protocol, BrowserWindow } from 'electron' import { app, protocol, BrowserWindow } from 'electron'
import contextMenu from 'electron-context-menu'
import path from 'path'
import { import {
createProtocol, createProtocol,
installVueDevtools installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib' } from 'vue-cli-plugin-electron-builder/lib'
import contextMenu from 'electron-context-menu'
const isDevelopment = process.env.NODE_ENV !== 'production' const isDevelopment = process.env.NODE_ENV !== 'production'
// Keep a global reference of the window object, if you don't, the window will // 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 }) protocol.registerStandardSchemes(['app'], { secure: true })
function createWindow () { function createWindow () {
// Create the browser window. // 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) { if (process.env.WEBPACK_DEV_SERVER_URL) {
// Load the url of the dev server if in development mode // Load the url of the dev server if in development mode