mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-11 01:44:50 +08:00
making sure the buttons are ready
updating active buttons
This commit is contained in:
parent
26487a2366
commit
d99e4ca4c9
2 changed files with 5 additions and 4 deletions
|
|
@ -675,8 +675,8 @@ $(".pageAccount .topFilters .button.toggleAdvancedFilters").on("click", () => {
|
|||
);
|
||||
});
|
||||
|
||||
export function appendButtons(): void {
|
||||
Misc.getLanguageList().then((languages) => {
|
||||
export async function appendButtons(): Promise<void> {
|
||||
await Misc.getLanguageList().then((languages) => {
|
||||
languages.forEach((language) => {
|
||||
$(
|
||||
".pageAccount .content .filterButtons .buttonsAndTitle.languages .buttons"
|
||||
|
|
@ -692,7 +692,7 @@ export function appendButtons(): void {
|
|||
$(
|
||||
".pageAccount .content .filterButtons .buttonsAndTitle.funbox .buttons"
|
||||
).append(`<div class="button" filter="none">none</div>`);
|
||||
Misc.getFunboxList().then((funboxModes) => {
|
||||
await Misc.getFunboxList().then((funboxModes) => {
|
||||
funboxModes.forEach((funbox) => {
|
||||
$(
|
||||
".pageAccount .content .filterButtons .buttonsAndTitle.funbox .buttons"
|
||||
|
|
|
|||
|
|
@ -1172,7 +1172,8 @@ export const page = new Page(
|
|||
ResultFilters.removeButtons();
|
||||
},
|
||||
async () => {
|
||||
ResultFilters.appendButtons();
|
||||
await ResultFilters.appendButtons();
|
||||
ResultFilters.updateActive();
|
||||
if (DB.getSnapshot()?.results == undefined) {
|
||||
$(".pageLoading .fill, .pageAccount .fill").css("width", "0%");
|
||||
$(".pageAccount .content").addClass("hidden");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue