Skip to content

Commit 1f22e14

Browse files
committed
OSS Licenses added, etc.
1 parent bac5902 commit 1f22e14

File tree

2 files changed

+228
-15
lines changed

2 files changed

+228
-15
lines changed

electron/licenses.html

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<!DOCTYPE html>
2+
<html lang="en" data-bs-theme="light">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Open Source Licenses</title>
7+
<style>
8+
:root {
9+
--font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
10+
}
11+
body {
12+
padding: 1em;
13+
font-family: var(--font-family);
14+
}
15+
h1 {
16+
margin-bottom: 48px;
17+
}
18+
pre {
19+
margin-bottom: 48px;
20+
}
21+
</style>
22+
</head>
23+
<body>
24+
25+
<h1>Open Source Lisences</h1>
26+
27+
<h2>Angular</h2>
28+
29+
<pre>The MIT License
30+
31+
Copyright (c) 2010-2023 Google LLC. https://angular.io/license
32+
33+
Permission is hereby granted, free of charge, to any person obtaining a copy
34+
of this software and associated documentation files (the "Software"), to deal
35+
in the Software without restriction, including without limitation the rights
36+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37+
copies of the Software, and to permit persons to whom the Software is
38+
furnished to do so, subject to the following conditions:
39+
40+
The above copyright notice and this permission notice shall be included in
41+
all copies or substantial portions of the Software.
42+
43+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
49+
THE SOFTWARE.</pre>
50+
51+
<h2>Bootstrap Icons</h2>
52+
53+
<pre>The MIT License (MIT)
54+
55+
Copyright (c) 2019-2023 The Bootstrap Authors
56+
57+
Permission is hereby granted, free of charge, to any person obtaining a copy
58+
of this software and associated documentation files (the "Software"), to deal
59+
in the Software without restriction, including without limitation the rights
60+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61+
copies of the Software, and to permit persons to whom the Software is
62+
furnished to do so, subject to the following conditions:
63+
64+
The above copyright notice and this permission notice shall be included in
65+
all copies or substantial portions of the Software.
66+
67+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
73+
THE SOFTWARE.</pre>
74+
75+
<h2>Electron</h2>
76+
77+
<pre>Copyright (c) Electron contributors
78+
Copyright (c) 2013-2020 GitHub Inc.
79+
80+
Permission is hereby granted, free of charge, to any person obtaining
81+
a copy of this software and associated documentation files (the
82+
"Software"), to deal in the Software without restriction, including
83+
without limitation the rights to use, copy, modify, merge, publish,
84+
distribute, sublicense, and/or sell copies of the Software, and to
85+
permit persons to whom the Software is furnished to do so, subject to
86+
the following conditions:
87+
88+
The above copyright notice and this permission notice shall be
89+
included in all copies or substantial portions of the Software.
90+
91+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
92+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
93+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
94+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
95+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
96+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
97+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</pre>
98+
99+
<h2>Electron Forge</h2>
100+
101+
<pre>The MIT License (MIT)
102+
Copyright (c) 2016 Samuel Attard
103+
104+
Permission is hereby granted, free of charge, to any person obtaining a copy of
105+
this software and associated documentation files (the "Software"), to deal in
106+
the Software without restriction, including without limitation the rights to
107+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
108+
the Software, and to permit persons to whom the Software is furnished to do so,
109+
subject to the following conditions:
110+
111+
The above copyright notice and this permission notice shall be included in all
112+
copies or substantial portions of the Software.
113+
114+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
115+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
116+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
117+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
118+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
119+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</pre>
120+
121+
<h2>PrimeFlex</h2>
122+
123+
<pre>The MIT License (MIT)
124+
125+
Copyright (c) 2016-2023 PrimeTek
126+
127+
Permission is hereby granted, free of charge, to any person obtaining a copy
128+
of this software and associated documentation files (the "Software"), to deal
129+
in the Software without restriction, including without limitation the rights
130+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
131+
copies of the Software, and to permit persons to whom the Software is
132+
furnished to do so, subject to the following conditions:
133+
134+
The above copyright notice and this permission notice shall be included in all
135+
copies or substantial portions of the Software.
136+
137+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
138+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
139+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
140+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
141+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
142+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
143+
SOFTWARE.</pre>
144+
145+
<h2>PrimeIcons</h2>
146+
147+
<pre>MIT License
148+
149+
Copyright (c) 2018-2021 PrimeTek
150+
151+
Permission is hereby granted, free of charge, to any person obtaining a copy
152+
of this software and associated documentation files (the "Software"), to deal
153+
in the Software without restriction, including without limitation the rights
154+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
155+
copies of the Software, and to permit persons to whom the Software is
156+
furnished to do so, subject to the following conditions:
157+
158+
The above copyright notice and this permission notice shall be included in all
159+
copies or substantial portions of the Software.
160+
161+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
162+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
163+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
164+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
165+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
166+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
167+
SOFTWARE.</pre>
168+
169+
<h2>PrimeNG</h2>
170+
171+
<pre>The MIT License (MIT)
172+
173+
Copyright (c) 2016-2022 PrimeTek
174+
175+
Permission is hereby granted, free of charge, to any person obtaining a copy
176+
of this software and associated documentation files (the "Software"), to deal
177+
in the Software without restriction, including without limitation the rights
178+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
179+
copies of the Software, and to permit persons to whom the Software is
180+
furnished to do so, subject to the following conditions:
181+
182+
The above copyright notice and this permission notice shall be included in
183+
all copies or substantial portions of the Software.
184+
185+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
186+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
187+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
188+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
189+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
190+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
191+
THE SOFTWARE.</pre>
192+
193+
194+
</body>
195+
</html>

electron/main.js

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const store = new Store();
77

88
const customAboutPanel = () => {
99
dialog.showMessageBox({
10+
type: 'info',
1011
title: 'FlexPlayer',
1112
message: `FlexPlayer ${process.env.npm_package_version}`,
1213
detail:
@@ -17,22 +18,35 @@ const customAboutPanel = () => {
1718
});
1819
};
1920

20-
const createWindow = () => {
21-
const win = new BrowserWindow({
21+
const createLicenseWindow = (parentWindow) => {
22+
const licenseWindow = new BrowserWindow({
23+
parent: parentWindow,
24+
modal: true,
25+
show: false,
26+
title: 'Open Source Licenses',
27+
autoHideMenuBar: true,
28+
});
29+
licenseWindow.loadFile('licenses.html');
30+
licenseWindow.setMenu(null);
31+
return licenseWindow;
32+
};
33+
34+
const createMainWindow = () => {
35+
const mainWindow = new BrowserWindow({
2236
width: store.get('browserWindow.width') || 800,
2337
height: store.get('browserWindow.height') || 600,
2438
webPreferences: {
2539
preload: path.join(__dirname, 'preload.js')
2640
},
2741
autoHideMenuBar: true,
2842
})
29-
win.on('resize', function() {
30-
const size = win.getSize();
43+
mainWindow.on('resize', function() {
44+
const size = mainWindow.getSize();
3145
store.set('browserWindow.width', size[0]);
3246
store.set('browserWindow.height', size[1]);
3347
});
34-
35-
Menu.setApplicationMenu(Menu.buildFromTemplate([
48+
mainWindow.loadFile('player/index.html');
49+
mainWindow.setMenu(Menu.buildFromTemplate([
3650
{
3751
label: 'File',
3852
submenu: [
@@ -47,7 +61,7 @@ const createWindow = () => {
4761
submenu: [
4862
{
4963
label: 'Remove all video',
50-
click: () => win.webContents.send('remove-all-video')
64+
click: () => mainWindow.webContents.send('remove-all-video')
5165
},
5266
{
5367
label: 'Fullscreen',
@@ -62,6 +76,10 @@ const createWindow = () => {
6276
label: 'DevTools',
6377
role: 'toggleDevTools'
6478
},
79+
{
80+
label: 'OSS Licenses',
81+
click: () => createLicenseWindow(mainWindow).show()
82+
},
6583
{
6684
label: 'About',
6785
click: customAboutPanel
@@ -70,22 +88,22 @@ const createWindow = () => {
7088
}
7189
]));
7290

73-
win.loadFile('player/index.html');
74-
//win.webContents.openDevTools();
91+
return mainWindow;
7592
};
7693

7794
app.whenReady().then(() => {
7895
ipcMain.handle('node:pathToFileURL', async (event, path) => {
7996
return url.pathToFileURL(path).href;
8097
});
8198

82-
createWindow();
99+
createMainWindow();
83100

84-
app.on('activate', () => {
85-
if (BrowserWindow.getAllWindows().length === 0) {
86-
createWindow();
87-
}
88-
});
101+
// TODO: only for MacOS?
102+
//app.on('activate', () => {
103+
// if (BrowserWindow.getAllWindows().length === 0) {
104+
// createMainWindow();
105+
// }
106+
//});
89107
});
90108

91109
app.on('window-all-closed', () => {

0 commit comments

Comments
 (0)