4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

add mouseleave event

This commit is contained in:
AlphaX-Projects 2023-06-13 10:46:07 +02:00
parent 02a78173a3
commit 348d7d1f20
3 changed files with 24 additions and 21 deletions

View File

@ -432,7 +432,7 @@ class AppView extends connect(store)(LitElement) {
return html`
<app-drawer-layout fullbleed force-narrow>
<app-drawer swipe-open slot="drawer" id="appdrawer">
<app-header-layout>
<app-header-layout id="appsidebar">
<div id="sideBar">
<wallet-profile></wallet-profile>
<div class="sideBarMenu">
@ -513,11 +513,16 @@ class AppView extends connect(store)(LitElement) {
parentEpml.imReady()
var drawerTog = this.shadowRoot.getElementById("mb")
var drawerOut = this.shadowRoot.getElementById("appsidebar")
drawerTog.addEventListener('mouseover', function() {
drawerTog.click()
})
drawerOut.addEventListener('mouseleave', function() {
drawerTog.click()
})
this.getNodeType()
const myAppNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]

View File

@ -19,7 +19,7 @@ class ShowPlugin extends connect(store)(LitElement) {
registeredUrls: { type: Array },
currentTab: { type: Number },
tabs: { type: Array },
theme: { type: String, reflect: true },
theme: { type: String, reflect: true }
}
}
@ -50,7 +50,7 @@ class ShowPlugin extends connect(store)(LitElement) {
}
.hideIframe {
visibility: hidden;
display: none;
position: absolute;
zIndex: -10;
}
@ -58,7 +58,7 @@ class ShowPlugin extends connect(store)(LitElement) {
.showIframe {
zIndex: 1;
position: relative;
visibility: visible;
display: block;
}
.tabs {
@ -174,7 +174,7 @@ class ShowPlugin extends connect(store)(LitElement) {
async addTab(tab) {
this.tabs = [...this.tabs, tab]
await this.getUpdateComplete();
await this.getUpdateComplete()
// add the new tab to the tabs array
const newIndex = this.tabs.length - 1
@ -213,13 +213,13 @@ class ShowPlugin extends connect(store)(LitElement) {
class="add-tab-button"
title="Add Tab"
@click=${() => {
const lengthOfTabs = this.tabs.length
this.addTab({
url: "",
id: this.uid()
})
this.currentTab = lengthOfTabs
}}
const lengthOfTabs = this.tabs.length
this.addTab({
url: "",
id: this.uid()
})
this.currentTab = lengthOfTabs
}}
>
+
</button>
@ -235,7 +235,11 @@ class ShowPlugin extends connect(store)(LitElement) {
class=${!tab.myPlugObj ? "hideIframe" : ""}
>
</iframe>
<nav-bar class=${!tab.myPlugObj ? "showIframe" : "hideIframe"} .registeredUrls=${this.registeredUrls} .changePage=${(val) => this.changePage(val)}>
<nav-bar
class=${!tab.myPlugObj ? "showIframe" : "hideIframe"}
.registeredUrls=${this.registeredUrls}
.changePage=${(val) => this.changePage(val)}
>
</nav-bar>
</div>
`)}
@ -372,7 +376,6 @@ class ShowPlugin extends connect(store)(LitElement) {
store.dispatch(setNewTab(null))
//clear newTab
}
}
}
}
@ -542,11 +545,6 @@ class NavBar extends connect(store)(LitElement) {
}
async getQuery(value) {
try {
} catch (error) {
}
let newQuery = value
if (newQuery.endsWith('/')) {
newQuery = newQuery.slice(0, -1)
@ -616,7 +614,7 @@ class NavBar extends connect(store)(LitElement) {
return html`
<div class="parent">
<div class="navbar">
<input @keydown=${this._handleKeyDown} id="linkInput" type="text" placeholder="qortal://" />
<input @keydown=${this._handleKeyDown} id="linkInput" type="text" placeholder="qortal://">
<button @click="${this.handlePasteLink}">Go</button>
</div>
<div>

View File

@ -41,7 +41,7 @@ parentEpml.ready().then(() => {
url: 'wallet',
domain: 'core',
page: 'wallet/index.html',
title: 'Wallet',
title: 'Wallets',
icon: 'vaadin:wallet',
mwcicon: 'account_balance_wallet',
menus: [],