Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better sorting and naming of static palettes in the Custom Palette Editor #3674

Merged
merged 1 commit into from Jan 12, 2024

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
Collaborator

@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.

@@ -520,8 +521,10 @@ <h1 style="display: flex; align-items: center;">
if (hst.length > 0 ) {
try {
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
Collaborator

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 Aircoookie:main Jan 12, 2024
12 checks passed
softhack007 pushed a commit to MoonModules/WLED 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.

None yet

2 participants