close menu after clicking
This commit is contained in:
parent
a3251d6a89
commit
e3b68cb572
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Fri Jul 12 05:02:43 PM UTC 2024
|
||||
* v0.5.1 generated at Fri Jul 12 05:21:08 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Fri Jul 12 05:02:43 PM UTC 2024
|
||||
* v0.5.1 generated at Fri Jul 12 05:21:08 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -295,8 +295,8 @@ document.head.innerHTML += `
|
|||
color: var(--xrf-white);
|
||||
font-weight: bold;
|
||||
background: var(--xrf-dark-gray);
|
||||
border-radius:16px;
|
||||
padding:0px 12px;
|
||||
border-radius:7px;
|
||||
padding:3px 12px;
|
||||
font-size: var(--xrf-font-size-0);
|
||||
margin-right:10px;
|
||||
text-decoration:none !important;
|
||||
|
|
|
@ -155,11 +155,12 @@ document.head.innerHTML += `
|
|||
left: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width:100%;
|
||||
width:100%;
|
||||
max-width: 100%;
|
||||
max-height: 33vh;
|
||||
padding: 10px;
|
||||
z-index:1001;
|
||||
justify-content: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -604,8 +605,9 @@ menuComponent = (el) => new Proxy({
|
|||
click(id,e){
|
||||
switch(id){
|
||||
case "icon":
|
||||
case "more": this.toggle(); break;
|
||||
case "more": return this.toggle(); break;
|
||||
}
|
||||
this.toggle(false)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -739,6 +741,7 @@ window.frontend = (opts) => new Proxy({
|
|||
xrf.addEventListener('href', (data) => {
|
||||
if( !data.selected ) return
|
||||
|
||||
|
||||
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ data.xrf ? data.xrf.string : data.mesh.userData.src}<br>` : ''
|
||||
let metadata = data.mesh.userData
|
||||
let meta = xrf.Parser.getMetaData()
|
||||
|
@ -760,6 +763,7 @@ window.frontend = (opts) => new Proxy({
|
|||
if( transcript.length ) html += `<br><b>transcript:</b><br><div class="transcript">${transcript}</div>`
|
||||
if (hasMeta && !data.mesh.portal && metadata.XRF.src ) html += `<br><br><a class="btn" style="float:right" onclick="xrf.navigator.to('${data.mesh.userData.href}')">Visit embedded scene</a>`
|
||||
if( !html ) return
|
||||
|
||||
window.notify(html,{timeout: 7000 * (hasMeta ? 1.5 : 1) })
|
||||
})
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ window.trystero = (opts) => new Proxy({
|
|||
|
||||
html: {
|
||||
generic: (opts) => `<div>
|
||||
<div target="_blank" class="badge ruler">Peer2Peer<a onclick="frontend.plugin.trystero.info()"><i class="gg-info right"></i></a></div>
|
||||
<a class="badge ruler">Peer2Peer</a><br>
|
||||
<table>
|
||||
<tr>
|
||||
<td>nickname</td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Fri Jul 12 05:02:43 PM UTC 2024
|
||||
* v0.5.1 generated at Fri Jul 12 05:21:08 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Fri Jul 12 05:02:43 PM UTC 2024
|
||||
* v0.5.1 generated at Fri Jul 12 05:21:08 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -35,8 +35,9 @@ menuComponent = (el) => new Proxy({
|
|||
click(id,e){
|
||||
switch(id){
|
||||
case "icon":
|
||||
case "more": this.toggle(); break;
|
||||
case "more": return this.toggle(); break;
|
||||
}
|
||||
this.toggle(false)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -295,8 +295,8 @@ document.head.innerHTML += `
|
|||
color: var(--xrf-white);
|
||||
font-weight: bold;
|
||||
background: var(--xrf-dark-gray);
|
||||
border-radius:16px;
|
||||
padding:0px 12px;
|
||||
border-radius:7px;
|
||||
padding:3px 12px;
|
||||
font-size: var(--xrf-font-size-0);
|
||||
margin-right:10px;
|
||||
text-decoration:none !important;
|
||||
|
|
|
@ -104,6 +104,7 @@ window.frontend = (opts) => new Proxy({
|
|||
xrf.addEventListener('href', (data) => {
|
||||
if( !data.selected ) return
|
||||
|
||||
|
||||
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ data.xrf ? data.xrf.string : data.mesh.userData.src}<br>` : ''
|
||||
let metadata = data.mesh.userData
|
||||
let meta = xrf.Parser.getMetaData()
|
||||
|
@ -125,6 +126,7 @@ window.frontend = (opts) => new Proxy({
|
|||
if( transcript.length ) html += `<br><b>transcript:</b><br><div class="transcript">${transcript}</div>`
|
||||
if (hasMeta && !data.mesh.portal && metadata.XRF.src ) html += `<br><br><a class="btn" style="float:right" onclick="xrf.navigator.to('${data.mesh.userData.href}')">Visit embedded scene</a>`
|
||||
if( !html ) return
|
||||
|
||||
window.notify(html,{timeout: 7000 * (hasMeta ? 1.5 : 1) })
|
||||
})
|
||||
|
||||
|
|
|
@ -154,11 +154,12 @@ document.head.innerHTML += `
|
|||
left: 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width:100%;
|
||||
width:100%;
|
||||
max-width: 100%;
|
||||
max-height: 33vh;
|
||||
padding: 10px;
|
||||
z-index:1001;
|
||||
justify-content: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ window.trystero = (opts) => new Proxy({
|
|||
|
||||
html: {
|
||||
generic: (opts) => `<div>
|
||||
<div target="_blank" class="badge ruler">Peer2Peer<a onclick="frontend.plugin.trystero.info()"><i class="gg-info right"></i></a></div>
|
||||
<a class="badge ruler">Peer2Peer</a><br>
|
||||
<table>
|
||||
<tr>
|
||||
<td>nickname</td>
|
||||
|
|
Loading…
Reference in New Issue