Framework WIP

- Status select shows up
- Status shows up
- Timer working
This commit is contained in:
nathan 2024-05-27 14:28:10 -06:00
parent 3ba69d542d
commit 5b94507de6
5 changed files with 26 additions and 8 deletions

View File

@ -60,6 +60,10 @@ egw-framework#egw_fw_basecontainer {
div#egw_fw_sidebar_r {
position: initial;
top: initial;
et2-avatar, et2-lavatar {
--size: 26px;
}
}
.egw_fw_ui_sidemenu_entry_header {

View File

@ -41,12 +41,9 @@
<div slot="header-right" id="egw_fw_topmenu_info_items">
{topmenu_info_items}
</div>
<div slot="header">
<sl-switch slot="header" id="placeholders" checked>Placeholders</sl-switch>
</div>
<!-- status app is looking for this -->
<div slot="aside" id="egw_fw_sidebar_r"></div>
<div slot="status" id="egw_fw_sidebar_r"></div>
<!-- Currently open app -->
<egw-app name="{open_app_name}" url="{open_app_url}" active></egw-app>

View File

@ -67,7 +67,7 @@ class kdots_framework extends Api\Framework\Ajax
parent::topmenu($vars, $apps);
$vars['topmenu_items'] = "<sl-menu>" . implode("\n", $this->topmenu_items) . "</sl-menu>";
$vars['topmenu_items'] = "<sl-menu id='egw_fw_topmenu_items'>" . implode("\n", $this->topmenu_items) . "</sl-menu>";
$vars['topmenu_info_items'] = '';
foreach($this->topmenu_info_items as $id => $item)
{

View File

@ -1,4 +1,4 @@
import {css, html, LitElement, nothing} from "lit";
import {css, html, LitElement, nothing, PropertyValues} from "lit";
import {customElement} from "lit/decorators/custom-element.js";
import {property} from "lit/decorators/property.js";
import {classMap} from "lit/directives/class-map.js";
@ -118,6 +118,23 @@ export class EgwFramework extends LitElement
}
}
protected firstUpdated(_changedProperties : PropertyValues)
{
super.firstUpdated(_changedProperties);
// Load hidden apps like status
this.applicationList.forEach((app) =>
{
if(app.status == "5" && app.url)
{
this.loadApp(app.name);
}
});
// Init timer
this.egw.add_timer('topmenu_info_timer');
}
get egw() : typeof egw
{
return window.egw ?? <typeof egw>{
@ -503,7 +520,7 @@ export class EgwFramework extends LitElement
@sl-close=${this.handleApplicationTabClose}
>
${repeat(this.applicationList
.filter(app => typeof app.opened !== "undefined")
.filter(app => typeof app.opened !== "undefined" && app.status !== "5")
.sort((a, b) => a.opened - b.opened), (app) => this._applicationTabTemplate(app))}
</sl-tab-group>
<slot name="header"><span class="placeholder">header</span></slot>

View File

@ -144,7 +144,7 @@ export default css`
overflow-y: hidden;
}
.egw_fw_app__aside_content {
.egw_fw_app__aside_content, egw_fw_app__main_content {
overflow-x: hidden;
overflow-y: auto;
}