improve handling of previous connections
This commit is contained in:
Binary file not shown.
Binary file not shown.
+40
-37
@@ -95,44 +95,47 @@ export function ChatPage(
|
||||
toggle:hidden={
|
||||
chatViewModel.connectionViewModel.isConnected
|
||||
}
|
||||
>
|
||||
<span class="icon">signal_disconnected</span>
|
||||
</button>
|
||||
toggle:disabled={
|
||||
chatViewModel.connectionViewModel.hasNoPreviousConnections
|
||||
}
|
||||
>
|
||||
<span class="icon">signal_disconnected</span>
|
||||
</button>
|
||||
|
||||
<span class="marquee" children:set={marqueeContent}></span>
|
||||
<span class="marquee" children:set={marqueeContent}></span>
|
||||
|
||||
<span class="navigation-buttons">
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.calendar,
|
||||
"calendar_month",
|
||||
ChatPageTypes.Calendar,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.tasks,
|
||||
"task_alt",
|
||||
ChatPageTypes.Tasks,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.messages,
|
||||
"forum",
|
||||
ChatPageTypes.Messages,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.settings,
|
||||
"settings",
|
||||
ChatPageTypes.Settings,
|
||||
chatViewModel,
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
id="main"
|
||||
children:set={ViewController.chatPages.state}
|
||||
></div>
|
||||
</div>
|
||||
</article>
|
||||
<span class="navigation-buttons">
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.calendar,
|
||||
"calendar_month",
|
||||
ChatPageTypes.Calendar,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.tasks,
|
||||
"task_alt",
|
||||
ChatPageTypes.Tasks,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.messages,
|
||||
"forum",
|
||||
ChatPageTypes.Messages,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
coreViewModel.translations.chatPage.pages.settings,
|
||||
"settings",
|
||||
ChatPageTypes.Settings,
|
||||
chatViewModel,
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
id="main"
|
||||
children:set={ViewController.chatPages.state}
|
||||
></div>
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -47,6 +47,8 @@ export default class ConnectionViewModel {
|
||||
this.coreViewModel.connectionModel.address,
|
||||
);
|
||||
}
|
||||
|
||||
this.hideConnectionModal();
|
||||
};
|
||||
|
||||
// methods
|
||||
@@ -66,6 +68,9 @@ export default class ConnectionViewModel {
|
||||
removePreviousAddress = (address: string): void => {
|
||||
this.coreViewModel.connectionModel.removeAddress(address);
|
||||
this.updatePreviousAddresses();
|
||||
|
||||
if (this.previousAddresses.value.size > 0) return;
|
||||
this.hideConnectionModal();
|
||||
};
|
||||
|
||||
// view
|
||||
|
||||
Reference in New Issue
Block a user