Skip to content

Commit 523ebde

Browse files
author
Dennis Labordus
authored
Merge pull request #197 from com-pas/landingpage-temp-fix
Temporary fix for buttons on Landing Page
2 parents 13bd962 + aab35c8 commit 523ebde

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

src/Hosting.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ import { Drawer } from '@material/mwc-drawer';
1515
import { ActionDetail, List } from '@material/mwc-list';
1616
import { ListItem } from '@material/mwc-list/mwc-list-item';
1717

18-
import { Mixin, newPendingStateEvent } from './foundation.js';
18+
import { Mixin, newPendingStateEvent, UserInfoEvent } from './foundation.js';
1919
import { LoggingElement } from './Logging.js';
20-
import { Plugin, PluggingElement, pluginIcons } from './Plugging.js';
20+
import { PluggingElement, Plugin, pluginIcons } from './Plugging.js';
2121
import { SettingElement } from './Setting.js';
2222

23-
import { UserInfoEvent } from './foundation.js';
24-
2523
interface MenuItem {
2624
icon: string;
2725
name: string;
@@ -312,7 +310,14 @@ export function Hosting<
312310
></mwc-icon-button>
313311
<div slot="title" id="title">${this.docName}</div>
314312
${this.username != undefined
315-
? html`<span id="userField" slot="actionItems" style="font-family:Roboto" >${translate('userinfo.loggedInAs', {name: this.username})}</span>`
313+
? html`<span
314+
id="userField"
315+
slot="actionItems"
316+
style="font-family:Roboto"
317+
>${translate('userinfo.loggedInAs', {
318+
name: this.username,
319+
})}</span
320+
>`
316321
: ``}
317322
${this.menu.map(this.renderActionItem)}
318323
${this.doc
@@ -336,12 +341,18 @@ export function Hosting<
336341
<mwc-icon-button
337342
class="landing_icon"
338343
icon="${mi.icon}"
339-
@click="${() =>
344+
@click="${() => {
345+
(<HTMLElement>(
346+
this.menuUI.querySelector(
347+
'mwc-icon-button[label="Menu"]'
348+
)
349+
)).click();
340350
(<ListItem>(
341351
this.menuUI.querySelector('mwc-list')!.items[
342352
index
343353
]
344-
)).click()}"
354+
)).click();
355+
}}"
345356
>
346357
<div class="landing_label">${mi.name}</div>
347358
</mwc-icon-button>

0 commit comments

Comments
 (0)