Commit 0ba4bb81 authored by akiraohgaki's avatar akiraohgaki

Fix for switch case

parent e97a75ab
......@@ -73,15 +73,18 @@ export default class CollectiondialogComponent extends BaseComponent {
_handleCollectionsidebarSelect(event) {
const switchviewComponent = this.contentRoot.querySelector('app-switchview');
switch (event.detail.select) {
case 'installed':
case 'installed': {
switchviewComponent.switch('installed');
break;
case 'update':
}
case 'update': {
switchviewComponent.switch('update');
break;
case 'download':
}
case 'download': {
switchviewComponent.switch('download');
break;
}
}
}
......
......@@ -161,16 +161,19 @@ export default class CollectionsidebarComponent extends BaseComponent {
target.setAttribute('data-selected', 'data-selected');
switch (target.getAttribute('data-action')) {
case 'installed':
case 'installed': {
this.dispatch('ocsManager_installedItemsByType', {installType: target.getAttribute('data-install-type')});
this.dispatch('collectionsidebar_select', {select: 'installed'});
break;
case 'update':
}
case 'update': {
this.dispatch('collectionsidebar_select', {select: 'update'});
break;
case 'download':
}
case 'download': {
this.dispatch('collectionsidebar_select', {select: 'download'});
break;
}
}
}
}
......
......@@ -116,10 +116,11 @@ export default class CollectionupdateComponent extends BaseComponent {
if (event.target.closest('app-button[data-action]')) {
const target = event.target.closest('app-button[data-action]');
switch (target.getAttribute('data-action')) {
case 'ocsManager_update':
case 'ocsManager_update': {
this.dispatch('ocsManager_update', {itemKey: target.getAttribute('data-item-key')});
target.setAttribute('data-state', 'inactive');
break;
}
}
}
}
......
......@@ -296,17 +296,20 @@ export default class OmniboxComponent extends BaseComponent {
}
switch (target.getAttribute('data-action')) {
case 'ocsManager_openUrl':
case 'ocsManager_openUrl': {
this.dispatch('ocsManager_openUrl', {url: target.getAttribute('data-url')});
break;
case 'webview_startPage':
}
case 'webview_startPage': {
this.dispatch('webview_startPage', {url: target.getAttribute('data-url')});
this.close();
break;
case 'ocsManager_collection':
}
case 'ocsManager_collection': {
this.dispatch('ocsManager_collection', {view: target.getAttribute('data-view')});
this.close();
break;
}
}
}
......
......@@ -150,35 +150,44 @@ export default class ToolbarComponent extends BaseComponent {
}
switch (target.getAttribute('data-action')) {
case 'webview_goBack':
case 'webview_goBack': {
this.dispatch('webview_goBack', {});
break;
case 'webview_goForward':
}
case 'webview_goForward': {
this.dispatch('webview_goForward', {});
break;
case 'webview_reload':
}
case 'webview_reload': {
this.dispatch('webview_reload', {});
break;
case 'webview_stop':
}
case 'webview_stop': {
this.dispatch('webview_stop', {});
break;
case 'webview_startPage':
}
case 'webview_startPage': {
this.dispatch('webview_startPage', {});
break;
case 'ocsManager_collection':
}
case 'ocsManager_collection': {
this.dispatch('ocsManager_collection', {});
break;
case 'menu_open':
}
case 'menu_open': {
this.contentRoot.querySelector('app-menu').open();
break;
case 'webview_appBugsPage':
}
case 'webview_appBugsPage': {
this.dispatch('webview_appBugsPage', {});
this.contentRoot.querySelector('app-menu').close();
break;
case 'general_about':
}
case 'general_about': {
this.dispatch('general_about', {});
this.contentRoot.querySelector('app-menu').close();
break;
}
}
}
......
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