浏览代码

Re-arranged elements in about dialog box code to be closer together and added comments

cameronoelsen 7 年之前
父节点
当前提交
cce0db195c
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      packages/help-extension/src/index.ts

+ 5 - 3
packages/help-extension/src/index.ts

@@ -217,7 +217,8 @@ function activate(app: JupyterLab, mainMenu: IMainMenu, palette: ICommandPalette
   commands.addCommand(CommandIDs.about, {
   commands.addCommand(CommandIDs.about, {
     label: `About ${info.name}`,
     label: `About ${info.name}`,
     execute: () => {
     execute: () => {
-      let jupyterURL = 'https://jupyter.org/about.html';
+
+      //Create the header of the about dialog
       let headerLogo = h.div({className: 'jp-About-header-logo'});
       let headerLogo = h.div({className: 'jp-About-header-logo'});
       let headerWordmark = h.div({className: 'jp-About-header-wordmark'});
       let headerWordmark = h.div({className: 'jp-About-header-wordmark'});
       let release = 'alpha release';
       let release = 'alpha release';
@@ -234,17 +235,18 @@ function activate(app: JupyterLab, mainMenu: IMainMenu, palette: ICommandPalette
         )
         )
       ));
       ));
 
 
-
+      //Create the body of the about dialog
+      let jupyterURL = 'https://jupyter.org/about.html';
       let externalLinks = h.span({className: 'jp-About-externalLinks'},
       let externalLinks = h.span({className: 'jp-About-externalLinks'},
         h.a({href: '#', className: 'jp-Button-flat'}, "CORE CONTRIBUTORS"),
         h.a({href: '#', className: 'jp-Button-flat'}, "CORE CONTRIBUTORS"),
         h.a({href: jupyterURL, target: '_blank', className: 'jp-Button-flat'}, "ABOUT PROJECT JUPYTER")
         h.a({href: jupyterURL, target: '_blank', className: 'jp-Button-flat'}, "ABOUT PROJECT JUPYTER")
       );
       );
       let copyright = h.span({className: 'jp-About-copyright'}, "© 2017 Project Jupyter");
       let copyright = h.span({className: 'jp-About-copyright'}, "© 2017 Project Jupyter");
-
       let body = VirtualDOM.realize(h.div({ className: 'jp-About-body' },
       let body = VirtualDOM.realize(h.div({ className: 'jp-About-body' },
         externalLinks,
         externalLinks,
         copyright
         copyright
       ));
       ));
+
       showDialog({
       showDialog({
         title,
         title,
         body,
         body,