mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	WebView: Remove redundant name property.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		@@ -23,5 +23,4 @@ export interface TabData {
 | 
			
		||||
  role: TabRole;
 | 
			
		||||
  name: string;
 | 
			
		||||
  index: number;
 | 
			
		||||
  webviewName: string;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -348,7 +348,7 @@ ${error}`,
 | 
			
		||||
      AppMenu.setMenu(props);
 | 
			
		||||
      if (props.activeTabIndex !== undefined) {
 | 
			
		||||
        const activeTab = props.tabs[props.activeTabIndex];
 | 
			
		||||
        mainWindow.setTitle(`Zulip - ${activeTab.webviewName}`);
 | 
			
		||||
        mainWindow.setTitle(`Zulip - ${activeTab.name}`);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  );
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,6 @@ interface WebViewProps {
 | 
			
		||||
  tabIndex: number;
 | 
			
		||||
  url: string;
 | 
			
		||||
  role: TabRole;
 | 
			
		||||
  name: string;
 | 
			
		||||
  isActive: () => boolean;
 | 
			
		||||
  switchLoading: (loading: boolean, url: string) => void;
 | 
			
		||||
  onNetworkError: (index: number) => void;
 | 
			
		||||
@@ -63,7 +62,6 @@ export default class WebView {
 | 
			
		||||
        ${new HTML({html: this.props.nodeIntegration ? "nodeIntegration" : ""})}
 | 
			
		||||
        ${new HTML({html: this.props.preload ? 'preload="js/preload.js"' : ""})}
 | 
			
		||||
        partition="persist:webviewsession"
 | 
			
		||||
        name="${this.props.name}"
 | 
			
		||||
        webpreferences="
 | 
			
		||||
          contextIsolation=${!this.props.nodeIntegration},
 | 
			
		||||
          spellcheck=${Boolean(
 | 
			
		||||
 
 | 
			
		||||
@@ -371,7 +371,6 @@ class ServerManagerView {
 | 
			
		||||
          tabIndex,
 | 
			
		||||
          url: server.url,
 | 
			
		||||
          role: "server",
 | 
			
		||||
          name: server.alias,
 | 
			
		||||
          hasPermission: (origin: string, permission: string) =>
 | 
			
		||||
            origin === server.url && permission === "notifications",
 | 
			
		||||
          isActive: () => index === this.activeTabIndex,
 | 
			
		||||
@@ -566,7 +565,6 @@ class ServerManagerView {
 | 
			
		||||
          tabIndex,
 | 
			
		||||
          url: tabProps.url,
 | 
			
		||||
          role: "function",
 | 
			
		||||
          name: tabProps.name,
 | 
			
		||||
          isActive: () =>
 | 
			
		||||
            this.functionalTabs.get(tabProps.name) === this.activeTabIndex,
 | 
			
		||||
          switchLoading: (loading: boolean, url: string) => {
 | 
			
		||||
@@ -644,7 +642,6 @@ class ServerManagerView {
 | 
			
		||||
      role: tab.props.role,
 | 
			
		||||
      name: tab.props.name,
 | 
			
		||||
      index: tab.props.index,
 | 
			
		||||
      webviewName: tab.webview.props.name,
 | 
			
		||||
    }));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -1060,7 +1057,6 @@ class ServerManagerView {
 | 
			
		||||
            );
 | 
			
		||||
            serverTooltips[index].textContent = realmName;
 | 
			
		||||
            this.tabs[index].props.name = realmName;
 | 
			
		||||
            this.tabs[index].webview.props.name = realmName;
 | 
			
		||||
 | 
			
		||||
            domain.alias = realmName;
 | 
			
		||||
            DomainUtil.updateDomain(index, domain);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user