Merge branch 'dev'
CI/CD / deploy (push) Waiting to run
Details
CI/CD / deploy (push) Waiting to run
Details
This commit is contained in:
commit
a73746bec3
|
|
@ -242,9 +242,10 @@ export function renderMainLanding(modules: ModuleInfo[]): string {
|
||||||
import '/shell.js';
|
import '/shell.js';
|
||||||
document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON});
|
document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON});
|
||||||
|
|
||||||
// Logged-in users: hide header demo btn, swap hero CTA to "Go to My Space"
|
// Logged-in users: hide header demo btn, swap hero CTA + space switcher
|
||||||
try {
|
try {
|
||||||
var raw = localStorage.getItem('encryptid_session');
|
var raw = localStorage.getItem('encryptid_session');
|
||||||
|
var sw = document.querySelector('rstack-space-switcher');
|
||||||
if (raw) {
|
if (raw) {
|
||||||
var session = JSON.parse(raw);
|
var session = JSON.parse(raw);
|
||||||
var hdrBtn = document.querySelector('.rstack-header__demo-btn');
|
var hdrBtn = document.querySelector('.rstack-header__demo-btn');
|
||||||
|
|
@ -256,7 +257,10 @@ export function renderMainLanding(modules: ModuleInfo[]): string {
|
||||||
primary.textContent = 'Go to My Space';
|
primary.textContent = 'Go to My Space';
|
||||||
primary.href = 'https://' + username + '.rspace.online/rspace';
|
primary.href = 'https://' + username + '.rspace.online/rspace';
|
||||||
}
|
}
|
||||||
|
if (sw) { sw.setAttribute('current', username); sw.setAttribute('name', username + "'s Space"); }
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (sw) { sw.setAttribute('current', 'demo'); sw.setAttribute('name', 'demo'); }
|
||||||
}
|
}
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -2262,6 +2262,7 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string {
|
||||||
document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON});
|
document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON});
|
||||||
try {
|
try {
|
||||||
var raw = localStorage.getItem('encryptid_session');
|
var raw = localStorage.getItem('encryptid_session');
|
||||||
|
var sw = document.querySelector('rstack-space-switcher');
|
||||||
if (raw) {
|
if (raw) {
|
||||||
var session = JSON.parse(raw);
|
var session = JSON.parse(raw);
|
||||||
if (session?.claims?.username) {
|
if (session?.claims?.username) {
|
||||||
|
|
@ -2271,7 +2272,10 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string {
|
||||||
primary.textContent = 'Go to My Space';
|
primary.textContent = 'Go to My Space';
|
||||||
primary.href = 'https://' + username + '.rspace.online/${escapeAttr(mod.id)}';
|
primary.href = 'https://' + username + '.rspace.online/${escapeAttr(mod.id)}';
|
||||||
}
|
}
|
||||||
|
if (sw) { sw.setAttribute('current', username); sw.setAttribute('name', username + "'s Space"); }
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (sw) { sw.setAttribute('current', 'demo'); sw.setAttribute('name', 'demo'); }
|
||||||
}
|
}
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -2597,6 +2601,7 @@ export function renderSubPageInfo(opts: SubPageInfoOptions): string {
|
||||||
document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON});
|
document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON});
|
||||||
try {
|
try {
|
||||||
var raw = localStorage.getItem('encryptid_session');
|
var raw = localStorage.getItem('encryptid_session');
|
||||||
|
var sw = document.querySelector('rstack-space-switcher');
|
||||||
if (raw) {
|
if (raw) {
|
||||||
var session = JSON.parse(raw);
|
var session = JSON.parse(raw);
|
||||||
if (session?.claims?.username) {
|
if (session?.claims?.username) {
|
||||||
|
|
@ -2606,7 +2611,10 @@ export function renderSubPageInfo(opts: SubPageInfoOptions): string {
|
||||||
primary.textContent = 'Open in My Space';
|
primary.textContent = 'Open in My Space';
|
||||||
primary.href = 'https://' + username + '.rspace.online/${escapeAttr(mod.id)}/${escapeAttr(subPage.path)}';
|
primary.href = 'https://' + username + '.rspace.online/${escapeAttr(mod.id)}/${escapeAttr(subPage.path)}';
|
||||||
}
|
}
|
||||||
|
if (sw) { sw.setAttribute('current', username); sw.setAttribute('name', username + "'s Space"); }
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (sw) { sw.setAttribute('current', 'demo'); sw.setAttribute('name', 'demo'); }
|
||||||
}
|
}
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue