Skip to content

Commit 0ed0dea

Browse files
committed
robo8x [chore] 4/20/2019, 9:26:41 PM
1 parent e9275c3 commit 0ed0dea

File tree

7 files changed

+54
-23
lines changed

7 files changed

+54
-23
lines changed

LICENSE

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

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

44
📚 P3X OneNote Linux
55

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313

14-
# 📚 P3X OneNote Linux v2019.4.31
14+
# 📚 P3X OneNote Linux v2019.4.32
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!
@@ -186,7 +186,7 @@ If you try to build the app with AppImage, you have to change from `electron` `d
186186

187187
---
188188

189-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.31
189+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.32
190190

191191
[![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)
192192

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.31
30+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.32
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.32
11+
FEATURE: The link chooser was missing the cancel button.
12+
1013
### v2019.4.31
1114
CHORE: Updated all dependencies.
1215

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

6164
---
6265

63-
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.31
66+
[**P3X-ONENOTE**](https://pages.corifeus.com/onenote) Build v2019.4.32
6467

6568
[![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)
6669

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p3x-onenote",
3-
"version": "2019.4.31",
3+
"version": "2019.4.32",
44
"description": "📚 P3X OneNote Linux",
55
"main": "src/electron/app.js",
66
"corifeus": {

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

+37-11
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,43 @@ global.p3x.onenote.ng.factory('p3xOnenotePrompt', ($mdDialog) => {
1818
}
1919

2020
this.redirect = (opts) => {
21-
const confirm = $mdDialog.confirm()
22-
.title(p3x.onenote.lang.label.promptRedirectUrlTitle)
23-
.textContent(p3x.onenote.lang.dialog.redirect.url({url: opts.url}))
24-
// .placeholder(p3x.onenote.lang.dialog.setProxy.placeholder)
25-
// .ariaLabel(p3x.onenote.lang.dialog.setProxy.placeholder)
26-
// .initialValue(global.p3x.onenote.data.proxy)
27-
//.targetEvent(ev)
28-
//.required(true)
29-
.cancel(p3x.onenote.lang.dialog.redirect.urlExternal)
30-
.ok(p3x.onenote.lang.dialog.redirect.urlInternal)
31-
return $mdDialog.show(confirm)
21+
22+
return $mdDialog.show({
23+
template: `
24+
<md-dialog>
25+
26+
<md-dialog-content>
27+
<md-content layout-padding>
28+
<h3 flex>
29+
${p3x.onenote.lang.label.promptRedirectUrlTitle}
30+
</h3>
31+
<div layout-padding>
32+
${p3x.onenote.lang.dialog.redirect.url({url: opts.url})}
33+
</div>
34+
</md-content>
35+
</md-dialog-content>
36+
37+
<md-dialog-actions>
38+
<md-button ng-click="exit('external')" class="md-primary">
39+
${p3x.onenote.lang.dialog.redirect.urlExternal}
40+
</md-button>
41+
<md-button ng-click="exit('internal')" class="md-primary">
42+
${p3x.onenote.lang.dialog.redirect.urlInternal}
43+
</md-button>
44+
<md-button ng-click="cancel()" class="md-primary">
45+
${p3x.onenote.lang.button.cancel}
46+
</md-button>
47+
</md-dialog-actions>
48+
</md-dialog>`,
49+
controller: function($mdDialog, $scope) {
50+
$scope.exit = (answer) => {
51+
$mdDialog.hide(answer);
52+
}
53+
54+
$scope.cancel = $mdDialog.cancel
55+
}
56+
});
57+
3258
}
3359
}
3460

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const handler = (options) => {
1010
// webview.insertCSS(window.cssData);
1111
});
1212
*/
13-
const allowedUrlRegex = /^((https?:\/\/((onedrive\.live\.com\/((redir\?resid\=)|((redir|edit).aspx\?)))|((www\.)?onenote\.com)|(login\.)|(g\.live\.))|(about\:blank)))/i
14-
const allowedUrlRegex2 = /^https?:\/\/d\.docs\.live\.net\/([a-z0-9]{16})\//i
13+
// const allowedUrlRegex = /^((https?:\/\/((onedrive\.live\.com\/((redir\?resid\=)|((redir|edit).aspx\?)))|((www\.)?onenote\.com)|(login\.)|(g\.live\.))|(about\:blank)))/i
14+
// const allowedUrlRegex2 = /^https?:\/\/d\.docs\.live\.net\/([a-z0-9]{16})\//i
1515

1616
//const disalledUrl = /^((https?:\/\/))/i
1717

@@ -100,10 +100,12 @@ const handler = (options) => {
100100
//webview.src = event.url;
101101
return
102102
}
103-
global.p3x.onenote.prompt.redirect({ url: event.url } ).then(() => {
104-
webview.src = event.url;
105-
}, () => {
106-
shell.openExternal(event.url)
103+
global.p3x.onenote.prompt.redirect({ url: event.url } ).then((answer) => {
104+
if (answer === 'internal') {
105+
webview.src = event.url;
106+
} else {
107+
shell.openExternal(event.url)
108+
}
107109
})
108110

109111
//;

0 commit comments

Comments
 (0)