Commit 3ba4681e authored by DFN2's avatar DFN2
Browse files

add login button next to user-menu button

parent d8da24cf
......@@ -219,6 +219,11 @@ ipcMain.on('store', (event, key, value) => {
event.returnValue = key ? appConfigStore.get(key) : appConfigStore.store;
});
ipcMain.on('checkForUpdates', () => {
console.log('check for fkn updates');
ocsManager = spawn(ocsManagerConfig.bin, ['-p', ocsManagerConfig.port, '--appFile', process.env.APPIMAGE]);
});
ipcMain.on('previewpic', (event, kind, itemKey, url) => {
if (kind === 'directory') {
event.returnValue = previewpicDirectory;
......
......@@ -128,14 +128,17 @@ export default class ToolbarComponent extends BaseComponent {
data-title="Other Operations..." data-icon="more_vert"></app-iconbutton><br>
<app-menu data-width="250px" data-offset-x="-220px">
<a slot="menuitem" href="#" data-action="webview_appBugsPage">Report a Bug</a>
<a slot="menuitem" href="#" data-action="check_for_updates">Check for Updates</a>
<a slot="menuitem" href="#" data-action="general_about">About This App</a>
</app-menu>
</li>
<li>
</li>
</ul>
</nav>
`;
}
/*<app-iconbutton data-action="login" data-title="Login" data-icon="account_circle" data-state="active"></app-iconbutton>*/
_handleClick(event) {
let target = null;
if (event.target.closest('app-iconbutton[data-action]')) {
......@@ -183,11 +186,20 @@ export default class ToolbarComponent extends BaseComponent {
this.contentRoot.querySelector('app-menu').close();
break;
}
case 'check_for_updates':{
console.log('check for updates biatch');
this.contentRoot.querySelector('app-menu').close();
break;
}
case 'general_about': {
this.dispatch('general_about', {});
this.contentRoot.querySelector('app-menu').close();
break;
}
case 'login':{
this.dispatch('webview_loginPage', {});
break;
}
}
}
......
......@@ -73,6 +73,10 @@ export default class WebviewHandler {
.add('webview_appBugsPage', () => {
this._webviewComponent.loadUrl(this._appPackage.bugs);
return false;
})
.add('webview_loginPage', () => {
this._webviewComponent.loadUrl('https://www.pling.com/login');
return false;
});
}
......
......@@ -401,11 +401,6 @@
"sumchecker": "^2.0.2"
}
},
"electron-is-dev": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz",
"integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4="
},
"electron-notarize": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-0.0.5.tgz",
......@@ -807,14 +802,6 @@
"assert-plus": "^1.0.0"
}
},
"github-url-to-object": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/github-url-to-object/-/github-url-to-object-4.0.4.tgz",
"integrity": "sha512-1Ri1pR8XTfzLpbtPz5MlW/amGNdNReuExPsbF9rxLsBfO1GH9RtDBamhJikd0knMWq3RTTQDbTtw0GGvvEAJEA==",
"requires": {
"is-url": "^1.1.0"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
......@@ -934,11 +921,6 @@
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-url": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
"integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww=="
},
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
......@@ -1805,17 +1787,6 @@
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"update-electron-app": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/update-electron-app/-/update-electron-app-1.5.0.tgz",
"integrity": "sha512-g7noW9JfQ8Hwq6zw9lmZei+R/ikOIBcaZ04TbmIcU5zNfv23HkN80QLLAyiR/47KvfS4sjnh2/wuDq5nh8+0mQ==",
"requires": {
"electron-is-dev": "^0.3.0",
"github-url-to-object": "^4.0.4",
"is-url": "^1.2.4",
"ms": "^2.1.1"
}
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment