fix subscription embed colour error
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
This commit is contained in:
parent
c4ea41a767
commit
ffff08899a
@ -35,6 +35,7 @@ $("#serverSettingsForm").on("submit", async function(e) {
|
||||
showToast("success", "Server Settings Saved", "Primary Key: " + pk);
|
||||
}
|
||||
|
||||
updateDefaultSubEmbedColour();
|
||||
$("#serverSettingsModal").modal("hide");
|
||||
|
||||
})
|
||||
|
@ -181,7 +181,6 @@ $("#addSubscriptionBtn").on("click", async function() {
|
||||
});
|
||||
|
||||
async function showEditSubModal(subId) {
|
||||
|
||||
if (subId === -1) {
|
||||
$("#subFormModal .form-create, #subAdvancedModal .form-create").show();
|
||||
$("#subFormModal .form-edit, #subAdvancedModal .form-edit").hide();
|
||||
@ -374,7 +373,7 @@ $(document).on("selectedServerChange", async function() {
|
||||
let server = getCurrentlyActiveServer();
|
||||
guildId = server.guild_id;
|
||||
|
||||
$("#subEmbedColour .colour-reset").attr("data-defaultcolour", "#" + server.default_embed_colour);
|
||||
await updateDefaultSubEmbedColour();
|
||||
|
||||
await loadSubscriptions(guildId);
|
||||
await loadChannelOptions(guildId);
|
||||
@ -382,6 +381,13 @@ $(document).on("selectedServerChange", async function() {
|
||||
await loadMutatorOptions();
|
||||
})
|
||||
|
||||
async function updateDefaultSubEmbedColour(settings=null) {
|
||||
if (!settings){
|
||||
settings = (await getGuildSettings(guildId))[0]
|
||||
}
|
||||
$("#subEmbedColour .colour-reset").attr("data-defaultcolour", "#" + settings.default_embed_colour);
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user