Commit bb6c3848 authored by akiraohgaki's avatar akiraohgaki

Use lit-html

parent 5536d7a4
......@@ -30,7 +30,7 @@ export default class AboutdialogComponent extends BaseComponent {
}
render() {
return `
return this.html`
<style>${this.sharedStyle}</style>
<style>
......
......@@ -37,7 +37,7 @@ export default class OmniboxComponent extends BaseComponent {
const autoCloseAction = (autoCloseStatus === 'active') ? 'omnibox_autoClose' : '';
return `
return this.html`
<style>${this.sharedStyle}</style>
<style>
......@@ -158,8 +158,6 @@ export default class OmniboxComponent extends BaseComponent {
}
</style>
<style data-override></style>
<div data-omnibox>
<div data-content>
<div></div>
......@@ -240,15 +238,7 @@ export default class OmniboxComponent extends BaseComponent {
}
_viewHandler_webview_page(state) {
//this.update({...this.state, ...state});
this.contentRoot.querySelector('app-iconbutton[data-action="ocsManager_openUrl"]').setAttribute('data-url', state.url);
this.contentRoot.querySelector('h3[data-action="omnibox_open"]').textContent = state.title;
this.contentRoot.querySelector('style[data-override]').textContent = `
div[data-palette] ul li button[data-action="webview_startPage"][data-url="${state.startPage}"] {
border-color: var(--color-information);
}
`;
this.update({...this.state, ...state});
}
}
......@@ -30,7 +30,7 @@ export default class DialogComponent extends BaseComponent {
const autoCloseAction = (autoCloseStatus === 'active') ? 'dialog_autoClose' : '';
return `
return this.html`
<style>${this.sharedStyle}</style>
<style>
......
......@@ -24,7 +24,7 @@ export default class IconbuttonComponent extends BaseComponent {
const status = this.getAttribute('data-status') || 'active';
const disabled = (status === 'inactive') ? 'disabled' : '';
return `
return this.html`
<style>${this.sharedStyle}</style>
<style>
......@@ -56,7 +56,7 @@ export default class IconbuttonComponent extends BaseComponent {
}
</style>
<button title="${title}" ${disabled}>
<button title="${title}" ?disabled=${disabled}>
<i class="material-icons md-${size} md-${color} md-${status}">${icon}</i>
</button>
`;
......
......@@ -9,7 +9,7 @@ export default class IndicatorComponent extends BaseComponent {
render() {
const status = this.getAttribute('data-status') || 'inactive';
return `
return this.html`
<style>${this.sharedStyle}</style>
<style>
......
......@@ -32,7 +32,7 @@ export default class MenuComponent extends BaseComponent {
const autoCloseAction = (autoCloseStatus === 'active') ? 'menu_autoClose' : '';
return `
return this.html`
<style>${this.sharedStyle}</style>
<style>
......
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