Skip to content

Commit

Permalink
Fixed OD channel loader
Browse files Browse the repository at this point in the history
Signed-off-by: tiksan <[email protected]>
  • Loading branch information
dssecret committed Nov 12, 2024
1 parent fc78e81 commit f5fb231
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed race condition in `/faction/banking/fulfill/<guid>`
- Fixed sort order and direction of `/faction members hospital`
- Fixed stat score calculation on gym page in `tornium-estimate.user.js`
- Fixed OD channel loader on website

### Removed
- Removed `ddtrace` importing and setting of user ID in span within `@app.before_request`
Expand Down
19 changes: 4 additions & 15 deletions application/static/faction/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,12 @@ $(document).ready(function () {

Promise.all([chainPromise, channelsPromise]).then((response) => {
chainConfig = response[0];
channels = response[1];

$.each(channels, function (category_id, category) {
let optgroup = $("<optgroup>", {
label: category["name"],
});

$("#od-channel").append(optgroup);
let odChannel = $(`#od-channel option[value="${chainConfig.od.channel}"]`);

$.each(category["channels"], function (channel_id, channel) {
if (chainConfig["od"]["channel"] === channel.id) {
optgroup.append($(`<option value="${channel.id}" selected>#${channel.name}</option>`));
} else {
optgroup.append($(`<option value="${channel.id}">#${channel.name}</option>`));
}
});
});
if (odChannel.length !== 0) {
odChannel.attr("selected", "");
}

document.querySelectorAll(".discord-channel-selector").forEach((element) => {
new TomSelect(element, {
Expand Down

0 comments on commit f5fb231

Please sign in to comment.