Skip to content

Commit

Permalink
Rebuild UI on sections edited
Browse files Browse the repository at this point in the history
  • Loading branch information
Sominemo committed Jan 8, 2025
1 parent d5f9545 commit 2c40ce1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@ <h1>Telegram Limits Editor</h1>
const sectionIcon = this.constructIconPicker(section.icon, (icon) => {
section.icon = icon;
this.markDirty();
this.constructContent();
});
sectionIcon.title = 'Pick an icon for the title of the section';
sectionElement.appendChild(sectionIcon);
Expand All @@ -1201,6 +1202,10 @@ <h1>Telegram Limits Editor</h1>
this.markDirty();
});

sectionName.addEventListener('blur', () => {
this.constructContent();
});

const sectionColor = document.createElement('input');
sectionColor.type = 'color';
sectionColor.title = 'Pick a color for the section';
Expand All @@ -1209,6 +1214,7 @@ <h1>Telegram Limits Editor</h1>
sectionColor.addEventListener('input', () => {
section.color = this.hexToRgb(sectionColor.value);
this.markDirty();
this.constructContent();
});

const idContainer = document.createElement('span');
Expand Down

0 comments on commit 2c40ce1

Please sign in to comment.