Commit a5b3f0b6 authored by azubieta's avatar azubieta

Merge branch 'update_release' into 'master'

Update release

See merge request !2
parents 5e064db8 8f4e675b
Pipeline #1329 passed with stage
in 2 minutes and 18 seconds
This diff is collapsed.
......@@ -219,6 +219,12 @@ ipcMain.on('store', (event, key, value) => {
event.returnValue = key ? appConfigStore.get(key) : appConfigStore.store;
});
ipcMain.on('checkForUpdates', () => {
// TODO -> add check for updates method?
ocsManager = spawn(ocsManagerConfig.bin, ['-p', ocsManagerConfig.port, '--appFile', process.env.APPIMAGE]);
console.log(ocsManager);
});
ipcMain.on('previewpic', (event, kind, itemKey, url) => {
if (kind === 'directory') {
event.returnValue = previewpicDirectory;
......
import BaseComponent from './common/BaseComponent.js';
const {ipcRenderer} = require('electron');
export default class ToolbarComponent extends BaseComponent {
init() {
this.contentRoot.addEventListener('click', this._handleClick.bind(this));
this._ipcRenderer = ipcRenderer;
this._viewHandler_webview_loading = this._viewHandler_webview_loading.bind(this);
this._viewHandler_webview_page = this._viewHandler_webview_page.bind(this);
this._viewHandler_ocsManager_updateAvailableItems = this._viewHandler_ocsManager_updateAvailableItems.bind(this);
......@@ -128,9 +129,13 @@ 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>
<app-iconbutton data-action="login" data-title="Login" data-icon="account_circle" data-state="active"></app-iconbutton>
</li>
</ul>
</nav>
`;
......@@ -183,11 +188,21 @@ export default class ToolbarComponent extends BaseComponent {
this.contentRoot.querySelector('app-menu').close();
break;
}
case 'check_for_updates':{
//this._ipcRenderer.send('checkForUpdates');
this.dispatch('ocsManager_checkForUpdates', {});
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;
}
}
}
......
......@@ -102,6 +102,11 @@ export default class WebviewComponent extends BaseComponent {
this._webview.addEventListener('did-stop-loading', () => {
this.dispatch('webview_loading', {isLoading: false});
// workaround for Input cursor invisible after navigation in webview
// details at https://github.com/electron/electron/issues/14474
this._webview.blur();
this._webview.focus();
});
this._webview.addEventListener('dom-ready', () => {
......
......@@ -144,6 +144,12 @@ export default class OcsManagerHandler {
return false;
})
.add('ocsManager_checkForUpdates', () => {
console.log('checkForUpdates');
this._ocsManagerApi.send('UpdateHandler::checkAppUpdate', []).then(function(res){
console.log(res)
});
})
.add('ocsManager_update', (data) => {
this._ocsManagerApi.send('UpdateHandler::update', [data.itemKey]);
return false;
......
......@@ -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;
});
}
......
[Desktop Entry]
Name=OCS-Store
Exec=ocs-store
Icon=ocs-store
Type=Application
Terminal=false
NoDisplay=false
Categories=Network;Settings;
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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",
......
......@@ -4,7 +4,7 @@ PKGNAME='pling-store'
PKGVER='5.0.1'
# Only timestamp development branches
if [ "${CI_COMMIT_REF_SLUG}" != "master" ]; then
if [[ "${CI_PROJECT_NAME}" == *"development"* ]]; then
PKGREL=dev-${CI_COMMIT_SHORT_SHA}-$(date +"%Y%m%d-%H%M%S")
else
PKGREL='1'
......@@ -19,6 +19,9 @@ APPDIR="${PKGNAME}.AppDir"
make
make DESTDIR=${APPDIR} prefix=/usr install
# Set version
echo "X-AppImage-Version=${PKGVER}" >> ${APPDIR}/usr/share/applications/${PKGNAME}.desktop
install -D -m 755 ${APPDIR}/usr/bin/${PKGNAME} ${APPDIR}/AppRun
install -D -m 644 ${APPDIR}/usr/share/applications/${PKGNAME}.desktop ${APPDIR}/${PKGNAME}.desktop
install -D -m 644 ${APPDIR}/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.svg ${APPDIR}/${PKGNAME}.svg
......@@ -42,6 +45,7 @@ chmod 755 appimagetool
# Fix url in zsync file
sed -i "/^URL:.*$/c\URL: ${APPIMAGE_FILE_NAME}?job=appimage" *-x86_64.AppImage.zsync
sed -i "/^Filename:.*$/c\Filename: ${APPIMAGE_FILE_NAME}" *-x86_64.AppImage.zsync
mv *-x86_64.AppImage ../${APPIMAGE_FILE_NAME}
mv *-x86_64.AppImage.zsync ../${ZSYNC_FILE_NAME}
Markdown is supported
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