// closed.
this.openTab(this.activeTab);
} else {
- this.openNotifications();
+ if (this.isInMaintenanceMode()) {
+ this.openTab(this.tabs[0]);
+ } else {
+ this.openNotifications();
+ }
}
this.refreshTabUnreadIndicators();
this.refreshUnreadIndicator();
}
+ private isInMaintenanceMode(): boolean {
+ return document.body.dataset.application === "wcf" && document.body.dataset.template === "offline";
+ }
+
private openNotifications(): void {
const notifications = this.tabs.find((element) => element.dataset.origin === "userNotifications");
if (!notifications) {
this.openTab(this.activeTab);
}
else {
- this.openNotifications();
+ if (this.isInMaintenanceMode()) {
+ this.openTab(this.tabs[0]);
+ }
+ else {
+ this.openNotifications();
+ }
}
this.refreshTabUnreadIndicators();
this.refreshUnreadIndicator();
}
+ isInMaintenanceMode() {
+ return document.body.dataset.application === "wcf" && document.body.dataset.template === "offline";
+ }
openNotifications() {
const notifications = this.tabs.find((element) => element.dataset.origin === "userNotifications");
if (!notifications) {