Update to edit page to not open new window
This commit is contained in:
parent
1452667c63
commit
1f8d7ef881
@ -10,7 +10,7 @@
|
||||
<body>
|
||||
<lavender-widgets></lavender-widgets>
|
||||
<div class="link-box">
|
||||
<a href="./edit.html" class="edit-link" target="_blank" alt="Edit Widgets"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||
<a href="./edit.html" class="edit-link" alt="Edit Widgets"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||
<a href="https://rezrov.xyz/caranmegil/lavender" class="edit-link" target="_blank" alt="Source Code"><i class="fa-brands fa-square-git"></i></a>
|
||||
</div>
|
||||
<script>
|
||||
|
@ -65,7 +65,7 @@ export class LavenderConfigure extends LitElement {
|
||||
|
||||
save() {
|
||||
const elems = this.shadowRoot?.children ?? null;
|
||||
const widgets = elems ? elems?.item(1)?.children : null;
|
||||
const widgets = elems ? elems?.item(2)?.children : null;
|
||||
const widgetsLen = widgets ? widgets?.length : 0
|
||||
const lavenderWidgets = [];
|
||||
|
||||
@ -87,7 +87,7 @@ export class LavenderConfigure extends LitElement {
|
||||
}
|
||||
|
||||
localStorage.setItem('lavender-widgets', JSON.stringify(lavenderWidgets));
|
||||
window.location.reload();
|
||||
window.location.replace('./index.html');
|
||||
}
|
||||
|
||||
override render() {
|
||||
@ -96,6 +96,7 @@ export class LavenderConfigure extends LitElement {
|
||||
|
||||
return html`
|
||||
<h1 class="centerit">Lavender Widget Editor</h1>
|
||||
<button class="button" @click="${() => this.save()}">Save</button>
|
||||
<div class="widgets">
|
||||
${widgets.map((widget: any) => {
|
||||
return html`
|
||||
|
Loading…
Reference in New Issue
Block a user