Add function to show manual login form if not public users are found

This commit is contained in:
Prayag committed 2022-03-11 17:32:46 +05:30
1 parent af678d9445
commit 8e6b33f630
2 files changed
+17 -1

No files matched your search

+6 -1
View File
@@ -74,7 +74,12 @@ class LoginPage {
this.window.once('ready-to-show', () => {
ipcMain.on('waiting-for-userlist', async (event) => {
let users = await this.api.userApi.getPublicUsers();
event.sender.send('userlist', users.data);
if (users.data.length == 0) {
event.sender.send('no-public-users');
} else {
console.log(users.data);
event.sender.send('userlist', users.data);
}
console.log('sending');
});
});