Commit d709e4ae authored by akiraohgaki's avatar akiraohgaki

Merge branch 'develop'

parents 453989e6 65f0d7ab
Pipeline #235 passed with stage
......@@ -12,6 +12,10 @@
background-image: url(material-design-icons/ic_chevron_right_black_48px.svg);
}
.icon-refresh {
background-image: url(material-design-icons/ic_refresh_48px.svg);
}
.icon-close {
background-image: url(material-design-icons/ic_close_black_48px.svg);
}
......
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M35.3 12.7C32.41 9.8 28.42 8 24 8 15.16 8 8.02 15.16 8.02 24S15.16 40 24 40c7.45 0 13.69-5.1 15.46-12H35.3c-1.65 4.66-6.07 8-11.3 8-6.63 0-12-5.37-12-12s5.37-12 12-12c3.31 0 6.28 1.38 8.45 3.55L26 22h14V8l-4.7 4.7z"/></svg>
\ No newline at end of file
......@@ -10,6 +10,7 @@ export default class ToolBar extends Chirit.Component {
active: '',
backAction: '',
forwardAction: '',
refreshAction: '',
homeAction: '',
collectionAction: '',
indicator: false,
......@@ -21,6 +22,7 @@ export default class ToolBar extends Chirit.Component {
html() {
const backButtonAttr = this.state.backAction ? `data-dispatch="${this.state.backAction}"` : 'disabled';
const forwardButtonAttr = this.state.forwardAction ? `data-dispatch="${this.state.forwardAction}"` : 'disabled';
const refreshButtonAttr = this.state.refreshAction ? `data-dispatch="${this.state.refreshAction}"` : 'disabled';
const homeButtonAttr = this.state.homeAction ? `data-dispatch="${this.state.homeAction}"` : 'disabled';
const collectionButtonAttr = this.state.collectionAction ? `data-dispatch="${this.state.collectionAction}"` : 'disabled';
const collectionButtonImportant = this.state.updateAvailable ? 'important' : '';
......@@ -28,10 +30,11 @@ export default class ToolBar extends Chirit.Component {
return `
<button class="toolbar-button icon-chevron-left" ${backButtonAttr}></button>
<button class="toolbar-button icon-chevron-right" ${forwardButtonAttr}></button>
<button class="toolbar-button icon-refresh refresh-button" ${refreshButtonAttr}></button>
<span class="toolbar-indicator icon-loading"></span>
<button class="toolbar-button icon-home label page-button" ${homeButtonAttr}>Browse</button>
<button class="toolbar-button icon-folder label page-button ${collectionButtonImportant}" ${collectionButtonAttr}>Installed</button>
<span class="toolbar-spacer"></span>
<span class="toolbar-indicator icon-loading"></span>
<select class="toolbar-select" name="startPage">
<option value="">Choose Startpage</option>
<option value="https://www.opendesktop.org/">opendesktop.org</option>
......@@ -154,11 +157,13 @@ export default class ToolBar extends Chirit.Component {
showIndicator() {
this.state.indicator = true;
this.element.querySelector('.toolbar-indicator').style.display = 'inline-block';
this.element.querySelector('.refresh-button').style.display = 'none';
}
hideIndicator() {
this.state.indicator = false;
this.element.querySelector('.toolbar-indicator').style.display = 'none';
this.element.querySelector('.refresh-button').style.display = 'inline-block';
}
}
......@@ -6,31 +6,30 @@ const url = require('url');
const ipcRenderer = electron.ipcRenderer;
const memberSites = [
'opendesktop.org', 'www.opendesktop.org',
'forum.opendesktop.org',
'opendesktop.org',
'appimagehub.com', 'www.appimagehub.com',
'linux-apps.com', 'www.linux-apps.com',
'linux-appimages.org', 'www.linux-appimages.org',
'appimagehub.com',
'linux-apps.com',
'linux-appimages.org',
'app-addons.org', 'www.app-addons.org',
'app-addons.org',
'addons.videolan.org',
'share.krita.org',
'cinnamon-look.org', 'www.cinnamon-look.org',
'compiz-themes.org', 'www.compiz-themes.org',
'enlightenment-themes.org', 'www.enlightenment-themes.org',
'gnome-look.org', 'www.gnome-look.org',
'mate-look.org', 'www.mate-look.org',
'cinnamon-look.org',
'compiz-themes.org',
'enlightenment-themes.org',
'gnome-look.org',
'mate-look.org',
'store.kde.org',
'trinity-look.org', 'www.trinity-look.org',
'xfce-look.org', 'www.xfce-look.org',
'box-look.org', 'www.box-look.org',
'trinity-look.org',
'xfce-look.org',
'box-look.org',
'cccliparts.org', 'www.cccliparts.org',
'free-artwork.org', 'www.free-artwork.org',
'cccliparts.org',
'free-artwork.org',
'historical-look.org', 'www.historical-look.org'
'historical-look.org',
];
function modifyDocument() {
......@@ -42,8 +41,7 @@ const url = require('url');
}
}
function modifyStyle() {
}
//function modifyStyle() {}
function modifyEvent() {
document.body.addEventListener('click', (event) => {
......@@ -78,12 +76,20 @@ const url = require('url');
ipcRenderer.sendToHost('ocs-url', targetUrl, providerKey, contentId);
}
else if (parsedUrl.hostname) {
let isMemberSite = false;
for (const memberSite of memberSites) {
if (parsedUrl.hostname.endsWith(memberSite)) {
isMemberSite = true;
break;
}
}
if (parsedUrl.hostname === 'dl.opendesktop.org') {
event.preventDefault();
const ocsUrl = `ocs://download?url=${encodeURIComponent(targetUrl)}&type=downloads`;
ipcRenderer.sendToHost('ocs-url', ocsUrl, providerKey, contentId);
}
else if (memberSites.indexOf(parsedUrl.hostname) !== -1) {
else if (isMemberSite) {
if (targetElement.getAttribute('target')) {
event.preventDefault();
location.href = targetUrl;
......
......@@ -96,6 +96,7 @@ import Root from '../components/Root.js';
active: root.toolBar.state.active,
backAction: root.toolBar.state.backAction,
forwardAction: root.toolBar.state.forwardAction,
refreshAction: root.toolBar.state.refreshAction,
homeAction: root.toolBar.state.homeAction,
collectionAction: root.toolBar.state.collectionAction,
indicator: root.toolBar.state.indicator,
......@@ -128,6 +129,7 @@ import Root from '../components/Root.js';
active: 'collection-page',
backAction: 'collection-page',
forwardAction: '',
refreshAction: '',
homeAction: 'browse-page',
collectionAction: 'collection-page',
indicator: root.toolBar.state.indicator,
......@@ -282,6 +284,7 @@ import Root from '../components/Root.js';
active: 'start-page',
backAction: 'main-webview-back',
forwardAction: 'main-webview-forward',
refreshAction: 'main-webview-refresh',
homeAction: 'start-page',
collectionAction: 'collection-page',
indicator: root.toolBar.state.indicator,
......@@ -315,11 +318,16 @@ import Root from '../components/Root.js';
}
});
stateManager.registerAction('main-webview-refresh', () => {
mainWebview.reload();
});
stateManager.registerAction('collection-page', () => {
root.toolBar.update({
active: 'collection-page',
backAction: '',
forwardAction: '',
refreshAction: '',
homeAction: 'browse-page',
collectionAction: 'collection-page',
indicator: root.toolBar.state.indicator,
......
#!/bin/bash
# Newer openssl workaround
export OPENSSL_CONF=/etc/ssl/
PREFIX="$(cd "$(dirname "${0}")" && pwd)"
if [ -f "${PREFIX}/ocs-store-linux-x64/ocs-store" ]; then
......
{
"name": "ocs-store",
"version": "3.4.2",
"version": "3.5.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "ocs-store",
"productName": "OCS-Store",
"version": "3.4.2",
"version": "3.5.0",
"description": "Store Frontend and Management Application based on OpenCollaborationServices (OCS) of Opendesktop.org.",
"author": "Opendesktop.org",
"license": "GPL-3.0",
......
#!/bin/bash
PKGNAME='ocs-store'
PKGVER='3.4.2'
PKGVER='3.5.0'
PKGREL='1'
UPDINFO='zsync|http://dl.opendesktop.org/api/files/download/id/1532435039/as/latest/ocs-store-x86_64.AppImage.zsync'
......
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