Skip to content

Commit 7bbac75

Browse files
committed
Fix double message on "Default Password is set"
1 parent a3048ae commit 7bbac75

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

assets/webconfig/js/content_index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,23 +292,23 @@ async function handlePasswordRequirement(event) {
292292
}
293293

294294
const loginEvent = await waitForEvent("cmd-authorize-login");
295-
handleLogin(loginEvent);
295+
handleLogin(loginEvent, token !== null);
296296
} else {
297297
$("#main-nav, #top-navbar").hide();
298298

299299
if (token) {
300300
requestTokenAuthorization(token);
301301

302302
const loginEvent = await waitForEvent("cmd-authorize-login");
303-
handleLogin(loginEvent);
303+
handleLogin(loginEvent, true);
304304
} else {
305305
loadContentTo("#page-content", "login");
306306
}
307307
}
308308
}
309309

310-
function handleLogin(event) {
311-
if (window.defaultPasswordIsSet && getStorage("suppressDefaultPwWarning") !== "true") {
310+
function handleLogin(event, isLoggedIn = false) {
311+
if (isLoggedIn && window.defaultPasswordIsSet && getStorage("suppressDefaultPwWarning") !== "true") {
312312
const msg = `
313313
<div class="text-right">
314314
${$.i18n('dashboard_message_do_not_show_again')}
@@ -336,7 +336,6 @@ function handleLogin(event) {
336336
async function handleSchema(event) {
337337
window.serverSchema = event.response.info;
338338
window.schema = window.serverSchema.properties;
339-
340339
}
341340

342341
function getStoredInstance() {

0 commit comments

Comments
 (0)