feat(webserver): wire up priority selector on shared page - #210
Merged
Conversation
The priority dropdown on the shared files page of the default template was dead UI: it only offered Low/Normal/High and its OK button emitted a 'setprio' command that the backend never handled, so nothing was applied. Template changes (amuleweb-main-shared.php): - Expand the selector to the full set of priorities (Auto, Very low, Low, Normal, High, Very high, Release), with Auto as the first option. - Wire the 'setprio' action: map the selected label to its priority constant (src/Constants.h) and dispatch the real 'prio' command via amule_do_shared_cmd($hash, 'prio', N). Priority arrow logic (WebServer.cpp): - GetHigherPrioShared/GetLowerPrioShared now walk only the manual scale (Very low <-> Low <-> Normal <-> High <-> Very high <-> Release) with clamped ends; the arrows no longer set or pass through Auto. - Raising while in Auto leaves it at High, lowering leaves it at Low. Auto can now only be enabled from the selector, fixing the previous behavior where raising priority in Auto dropped the file to Very low.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The priority dropdown on the shared files page of the default template was dead UI: it only offered Low/Normal/High and its OK button emitted a 'setprio' command that the backend never handled, so nothing was applied.
Template changes (amuleweb-main-shared.php):
Priority arrow logic (WebServer.cpp):