Skip to content

Conversation

@w00000dy
Copy link
Contributor

This alphabetically sorts the static palettes of the Custom Palette Editor.
Also the hover text was changed from Copy slot [id] palette to editor to Copy [name] palette to editor.

Before Now Pallete sorting in UI
Screenshot 2024-01-11 233204 Screenshot 2024-01-11 233123 Screenshot 2024-01-11 at 23-37-41 WLED Tester

Now it should be easier to get the correct palette for editing.
This should be a fix for the bug that was reported in the discord ⁠#beta-testing channel.

Copy link
Contributor

@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

var arr = [];
const response = await fetch('http://'+hst+'/json/info');
const json = await response.json();
const responseInfo = await fetch('http://'+hst+'/json/info');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also use getURL() logic from index.js which will work behind reverse proxy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it like it was done before. But it you would prefer it we could also use getURL().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem I see is that if we do this we have to copy the code from index.js to cpal.htm and then we have created duplicate code again. We could wait with this until we have a global.js file that contains functions like getURL() that are used on every page, so we do not have to maintain the duplicate code. But I'll let you decide. Should I just copy the code now, or should we wait until we have a global.js file?

@blazoncek blazoncek merged commit 24b60a2 into wled:main Jan 12, 2024
softhack007 pushed a commit to MoonModules/WLED-MM that referenced this pull request Jan 15, 2024
Better sorting and naming of static palettes in the Custom Palette Editor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants