Skip to content

Commit 9df844d

Browse files
committed
add icon
1 parent e723fe0 commit 9df844d

File tree

17 files changed

+737
-37
lines changed

17 files changed

+737
-37
lines changed

build/icons/1024x1024.png

113 KB
Loading

build/icons/128x128.png

5.36 KB
Loading

build/icons/16x16.png

340 Bytes
Loading

build/icons/24x24.png

524 Bytes
Loading

build/icons/256x256.png

11.4 KB
Loading

build/icons/32x32.png

738 Bytes
Loading

build/icons/48x48.png

1.37 KB
Loading

build/icons/512x512.png

22.2 KB
Loading

build/icons/64x64.png

2.1 KB
Loading

build/icons/icon.icns

191 KB
Binary file not shown.

build/icons/icon.ico

353 KB
Binary file not shown.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zy",
3-
"version": "0.1.0",
3+
"version": "0.7.8",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
@@ -9,7 +9,8 @@
99
"dev": "vue-cli-service electron:serve",
1010
"electron:build": "vue-cli-service electron:build",
1111
"postinstall": "electron-builder install-app-deps",
12-
"postuninstall": "electron-builder install-app-deps"
12+
"postuninstall": "electron-builder install-app-deps",
13+
"electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten"
1314
},
1415
"main": "background.js",
1516
"dependencies": {
@@ -35,6 +36,7 @@
3536
"@vue/eslint-config-typescript": "^4.0.0",
3637
"babel-plugin-component": "^1.1.1",
3738
"electron": "^7.1.8",
39+
"electron-icon-builder": "^1.0.2",
3840
"eslint": "^5.16.0",
3941
"eslint-plugin-vue": "^5.0.0",
4042
"sass": "^1.23.7",

src/background.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
createProtocol,
66
installVueDevtools
77
} from 'vue-cli-plugin-electron-builder/lib'
8+
import path from 'path'
89
const isDevelopment = process.env.NODE_ENV !== 'production'
910

1011
// Keep a global reference of the window object, if you don't, the window will
@@ -23,7 +24,9 @@ function createWindow () {
2324
webPreferences: {
2425
webSecurity: false,
2526
nodeIntegration: true
26-
}
27+
},
28+
// @ts-ignore
29+
icon: path.join(__static, 'icon.png')
2730
})
2831

2932
if (process.env.WEBPACK_DEV_SERVER_URL) {

src/page/player.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ export default Vue.extend({
106106
this.$nextTick(() => {
107107
this.xg = new Hls(this.config)
108108
// @ts-ignore
109-
this.xg.on('error', function () {
110-
console.log('lala')
109+
this.xg.on('error', () => {
110+
this.$message.error('播放失败请重试~')
111111
})
112112
})
113113
}

src/store/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Vue.use(Vuex)
55

66
export default new Vuex.Store({
77
state: {
8-
Main: 'Player',
8+
Main: 'Search',
99
site: 0,
1010
detail: {
1111
show: false,

vue.config.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
module.exports = {
22
pluginOptions: {
33
electronBuilder: {
4-
builderOptions: {
5-
win: {
6-
icon: './public/icon.png'
7-
},
8-
mac: {
9-
icon: './public/icon.png'
10-
},
11-
productName: 'ZY Player'
12-
},
4+
builderOptions: {},
135
chainWebpackRendererProcess: config => {
146
if (process.env.NODE_ENV === 'development') {
157
config.plugins.delete('prefetch')

0 commit comments

Comments
 (0)