Skip to content

Commit e6cebde

Browse files
committed
robo8x [chore] 5/7/2019, 11:00:12 AM
1 parent 5ce4325 commit e6cebde

File tree

9 files changed

+62
-11
lines changed

9 files changed

+62
-11
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
@license p3x-onenote v2019.4.32
2+
@license p3x-onenote v2019.4.33
33

44
📚 P3X OneNote Linux
55

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[//]: #@corifeus-header
22

3-
[![NPM](https://nodei.co/npm/p3x-onenote.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/p3x-onenote/)
3+
[![NPM](https://nodei.co/npm/p3x-onenote.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/p3x-onenote/)
44

55

66

@@ -11,7 +11,7 @@
1111

1212

1313

14-
# 📚 P3X OneNote Linux v2019.4.32
14+
# 📚 P3X OneNote Linux v2019.4.33
1515

1616

1717
🙏 This is an open-source project. Star this repository, if you like it, or even donate to maintain the servers and the development. Thank you so much!
@@ -189,7 +189,7 @@ If you try to build the app with AppImage, you have to change from `electron` `d
189189

190190
---
191191

192-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.32
192+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.33
193193

194194
[![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
195195

artifacts/npm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Though, I am using it, but some distros are different and I only use Linux Mint
2727

2828
---
2929

30-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.32
30+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.33
3131

3232
[![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
3333

changelog.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
## Change log
99

10+
### v2019.4.33
11+
FEATURE: Added in the `Action` menu to go to any URL.
12+
1013
### v2019.4.32
1114
FEATURE: The link chooser was missing the cancel button.
1215

@@ -63,7 +66,7 @@ FEATURE: for all links in P3X OneNote is left for the user to decide how the lin
6366

6467
---
6568

66-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.32
69+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.33
6770

6871
[![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)
6972

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p3x-onenote",
3-
"version": "2019.4.32",
3+
"version": "2019.4.33",
44
"description": "📚 P3X OneNote Linux",
55
"main": "src/electron/app.js",
66
"corifeus": {
@@ -9,7 +9,7 @@
99
"publish": true,
1010
"type": "p3x",
1111
"code": "Linux",
12-
"nodejs": "v11.14.0",
12+
"nodejs": "v11.15.0",
1313
"opencollective": true,
1414
"reponame": "onenote",
1515
"build": true
@@ -48,7 +48,6 @@
4848
"angular-messages": "^1.7.8",
4949
"configstore": "^4.0.0",
5050
"corifeus-utils": "^2019.4.13",
51-
"electron": "^5.0.0",
5251
"electron-updater": "^4.0.6",
5352
"jquery": "^3.4.0",
5453
"opencollective": "^1.0.3",
@@ -87,4 +86,4 @@
8786
"type": "opencollective",
8887
"url": "https://opencollective.com/p3x-onenote"
8988
}
90-
}
89+
}

src/electron/main/create/menu.js

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ function mainMenu() {
2626
label: p3x.onenote.lang.menu.action,
2727
submenu: [
2828
copyLocation,
29+
{
30+
label: global.p3x.onenote.lang.label.openUrl,
31+
click: () => {
32+
global.p3x.onenote.window.onenote.webContents.send('p3x-onenote-action-open-url')
33+
}
34+
}
2935
]
3036
},
3137
{

src/electron/window/onenote/angular/prompt/index.js

+16
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ global.p3x.onenote.ng.factory('p3xOnenotePrompt', ($mdDialog) => {
1717
return $mdDialog.show(confirm)
1818
}
1919

20+
this.goToUrl = () => {
21+
const confirm = $mdDialog.prompt()
22+
.title(p3x.onenote.lang.label.openUrl)
23+
.textContent(p3x.onenote.lang.dialog.openUrl.info)
24+
.placeholder(p3x.onenote.lang.dialog.openUrl.placeholder)
25+
.ariaLabel(p3x.onenote.lang.dialog.openUrl.placeholder)
26+
//.initialValue(global.p3x.onenote.data.proxy)
27+
//.targetEvent(ev)
28+
//.required(true)
29+
.cancel(p3x.onenote.lang.button.cancel)
30+
.ok(p3x.onenote.lang.button.go)
31+
32+
return $mdDialog.show(confirm)
33+
34+
}
35+
2036
this.redirect = (opts) => {
2137

2238
return $mdDialog.show({

src/electron/window/onenote/ipc/handler.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@ const handler = (options) => {
3131
setProxy(data);
3232
})
3333

34+
ipcRenderer.on('p3x-onenote-action-open-url', async(event, data) => {
35+
let url = '';
36+
let cancelled = false;
37+
try {
38+
url = await global.p3x.onenote.prompt.goToUrl();
39+
url = url === undefined ? '' : url.trim();
40+
} catch(e) {
41+
if (e !== undefined) {
42+
console.error(e);
43+
} else {
44+
cancelled = true;
45+
}
46+
} finally {
47+
if (!cancelled) {
48+
global.p3x.onenote.webview.src = url
49+
}
50+
}
51+
})
52+
3453
}
3554

36-
module.exports = handler
55+
module.exports = handler

src/translation/en.js

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const translation = {
2121
},
2222
settings: 'Settings',
2323
setProxy: 'Set proxy',
24+
openUrl: 'Open an URL',
2425
promptRedirectUrlTitle: 'Redirect to url',
2526
edit: 'Edit',
2627
view: 'View',
@@ -39,6 +40,11 @@ const translation = {
3940
},
4041
dialog: {
4142
info: 'Info',
43+
openUrl: {
44+
info: 'You can go to any URL you wish',
45+
placeholder: 'a valid URL',
46+
47+
},
4248
minimizationBehavior: {
4349
title: 'Minimization behavior',
4450
},
@@ -65,6 +71,8 @@ const translation = {
6571
cancel: 'Cancel',
6672
save: 'Save',
6773
clear: 'Clear',
74+
go: 'Go',
75+
6876
},
6977
menu: {
7078
action: 'Action',

0 commit comments

Comments
 (0)