mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 05:53:21 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			834 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			834 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import {html} from "../../../../common/html.js";
 | 
						|
import * as t from "../../../../common/translation-util.js";
 | 
						|
 | 
						|
import {reloadApp} from "./base-section.js";
 | 
						|
import {initNewServerForm} from "./new-server-form.js";
 | 
						|
 | 
						|
type ServersSectionProps = {
 | 
						|
  $root: Element;
 | 
						|
};
 | 
						|
 | 
						|
export function initServersSection({$root}: ServersSectionProps): void {
 | 
						|
  $root.innerHTML = html`
 | 
						|
    <div class="add-server-modal">
 | 
						|
      <div class="modal-container">
 | 
						|
        <div class="settings-pane" id="server-settings-pane">
 | 
						|
          <div class="page-title">${t.__("Add a Zulip organization")}</div>
 | 
						|
          <div id="new-server-container"></div>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  `.html;
 | 
						|
  const $newServerContainer = $root.querySelector("#new-server-container")!;
 | 
						|
 | 
						|
  initNewServerForm({
 | 
						|
    $root: $newServerContainer,
 | 
						|
    onChange: reloadApp,
 | 
						|
  });
 | 
						|
}
 |