@@ -12,10 +12,12 @@ import * as ConfigUtil from "../../common/config-util.js";
1212import * as DNDUtil from "../../common/dnd-util.js" ;
1313import type { DndSettings } from "../../common/dnd-util.js" ;
1414import * as EnterpriseUtil from "../../common/enterprise-util.js" ;
15+ import { html } from "../../common/html.js" ;
1516import * as LinkUtil from "../../common/link-util.js" ;
1617import Logger from "../../common/logger-util.js" ;
1718import * as Messages from "../../common/messages.js" ;
1819import { bundlePath , bundleUrl } from "../../common/paths.js" ;
20+ import * as t from "../../common/translation-util.js" ;
1921import type {
2022 NavigationItem ,
2123 ServerConfig ,
@@ -607,7 +609,7 @@ export class ServerManagerView {
607609 ) : Promise < void > {
608610 await this . openFunctionalTab ( {
609611 page : "Settings" ,
610- label : "Settings" ,
612+ label : t . __ ( "Settings" ) ,
611613 materialIcon : "settings" ,
612614 makeView : async ( ) => {
613615 this . preferenceView = await PreferenceView . create ( ) ;
@@ -627,7 +629,7 @@ export class ServerManagerView {
627629 let aboutView : AboutView ;
628630 await this . openFunctionalTab ( {
629631 page : "About" ,
630- label : "About" ,
632+ label : t . __ ( "About" ) ,
631633 materialIcon : "sentiment_very_satisfied" ,
632634 async makeView ( ) {
633635 aboutView = await AboutView . create ( ) ;
@@ -817,7 +819,7 @@ export class ServerManagerView {
817819 event . preventDefault ( ) ;
818820 const template = [
819821 {
820- label : "Disconnect organization" ,
822+ label : t . __ ( "Disconnect organization" ) ,
821823 async click ( ) {
822824 const { response} = await dialog . showMessageBox ( {
823825 type : "warning" ,
@@ -838,7 +840,7 @@ export class ServerManagerView {
838840 } ,
839841 } ,
840842 {
841- label : "Notification settings" ,
843+ label : t . __ ( "Notification settings" ) ,
842844 enabled : await this . isLoggedIn ( index ) ,
843845 click : async ( ) => {
844846 // Switch to tab whose icon was right-clicked
@@ -849,7 +851,7 @@ export class ServerManagerView {
849851 } ,
850852 } ,
851853 {
852- label : "Copy Zulip URL" ,
854+ label : t . __ ( "Copy Zulip URL" ) ,
853855 click ( ) {
854856 clipboard . writeText ( DomainUtil . getDomain ( index ) . url ) ;
855857 } ,
@@ -1185,6 +1187,62 @@ export class ServerManagerView {
11851187}
11861188
11871189window . addEventListener ( "load" , async ( ) => {
1190+ document . body . innerHTML = html `
1191+ < div id ="content ">
1192+ < div class ="popup ">
1193+ < span class ="popuptext hidden " id ="fullscreen-popup "> </ span >
1194+ </ div >
1195+ < div id ="sidebar " class ="toggle-sidebar ">
1196+ < div id ="view-controls-container ">
1197+ < div id ="tabs-container "> </ div >
1198+ < div id ="add-tab " class ="tab functional-tab ">
1199+ < div class ="server-tab " id ="add-action ">
1200+ < i class ="material-icons "> add</ i >
1201+ </ div >
1202+ < span id ="add-server-tooltip " style ="display: none "
1203+ > ${ t . __ ( "Add Organization" ) } </ span
1204+ >
1205+ </ div >
1206+ </ div >
1207+ < div id ="actions-container ">
1208+ < div class ="action-button " id ="dnd-action ">
1209+ < i class ="material-icons md-48 "> notifications</ i >
1210+ < span id ="dnd-tooltip " style ="display: none "
1211+ > ${ t . __ ( "Do Not Disturb" ) } </ span
1212+ >
1213+ </ div >
1214+ < div class ="action-button hidden " id ="reload-action ">
1215+ < i class ="material-icons md-48 "> refresh</ i >
1216+ < span id ="reload-tooltip " style ="display: none "
1217+ > ${ t . __ ( "Reload" ) } </ span
1218+ >
1219+ </ div >
1220+ < div class ="action-button disable " id ="loading-action ">
1221+ < i class ="refresh material-icons md-48 "> loop</ i >
1222+ < span id ="loading-tooltip " style ="display: none "
1223+ > ${ t . __ ( "Loading" ) } </ span
1224+ >
1225+ </ div >
1226+ < div class ="action-button disable " id ="back-action ">
1227+ < i class ="material-icons md-48 "> arrow_back</ i >
1228+ < span id ="back-tooltip " style ="display: none "
1229+ > ${ t . __ ( "Go Back" ) } </ span
1230+ >
1231+ </ div >
1232+ < div class ="action-button " id ="settings-action ">
1233+ < i class ="material-icons md-48 "> settings</ i >
1234+ < span id ="setting-tooltip " style ="display: none "
1235+ > ${ t . __ ( "Settings" ) } </ span
1236+ >
1237+ </ div >
1238+ </ div >
1239+ </ div >
1240+ < div id ="main-container ">
1241+ < div id ="webviews-container "> </ div >
1242+ </ div >
1243+ </ div >
1244+ ` . html ;
1245+
11881246 const serverManagerView = new ServerManagerView ( ) ;
11891247 await serverManagerView . init ( ) ;
11901248} ) ;
0 commit comments