This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
appcat
/
sonist
Archived
1
0
Fork 0
sonist/src/js/modules/extra-win.js

52 lines
1001 B
JavaScript

/**
* 额外的小窗口
* @author yutent<yutent@doui.cc>
* @date 2019/01/21 21:24:04
*/
'use strict'
const {
remote: { BrowserWindow }
} = require('electron')
export const createDesktopLrcWindow = function(screen) {
let win = new BrowserWindow({
title: '',
width: 1024,
height: 100,
frame: false,
resizable: false,
alwaysOnTop: true,
x: (screen.size.width - 1024) / 2,
y: screen.size.height - 100,
skipTaskbar: true,
hasShadow: false,
thickFrame: false,
transparent: true,
show: false
})
win.loadURL('http://127.0.0.1:10240/desktop-lrc.html')
return win
}
export const createMiniWindow = function(screen, pwin) {
let win = new BrowserWindow({
title: '',
width: 320,
height: 60,
frame: false,
parent: pwin,
resizable: false,
alwaysOnTop: true,
x: screen.size.width - 320,
y: 0,
skipTaskbar: true,
show: false
})
win.loadURL('http://127.0.0.1:10240/mini-win.html')
return win
}
一个音乐播放器, 主打本地音乐播放。支持 自动歌词/自动封面/均衡器等常见功能。
JavaScript 60.1%
SCSS 19.2%
HTML 16.9%
CSS 3.8%