Updated fav-icon Base URL from JupyterLab PageConfig. (#7109)

* Updated fav-icon Base URL from JupyterLab PageConfig.

* Reformatted code for reability.

* Used  for conncatinating fac-icon URL

* Lint

---------

Co-authored-by: jayesh.singh@fplabs.tech <jayesh.singh@fplabs.tech>
Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
pull/7111/head
Jayesh Singh 2 years ago committed by GitHub
parent 03a27f0972
commit c62caffb02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,7 @@ import {
import { Cell, CodeCell } from '@jupyterlab/cells';
import { Text, Time } from '@jupyterlab/coreutils';
import { PageConfig, Text, Time, URLExt } from '@jupyterlab/coreutils';
import { IDocumentManager } from '@jupyterlab/docmanager';
@ -411,8 +411,12 @@ const tabIcon: JupyterFrontEndPlugin<void> = {
requires: [INotebookTracker],
activate: (app: JupyterFrontEnd, tracker: INotebookTracker) => {
// the favicons are provided by Jupyter Server
const notebookIcon = ' /static/favicons/favicon-notebook.ico';
const busyIcon = ' /static/favicons/favicon-busy-1.ico';
const baseURL = PageConfig.getBaseUrl();
const notebookIcon = URLExt.join(
baseURL,
'static/favicons/favicon-notebook.ico'
);
const busyIcon = URLExt.join(baseURL, 'static/favicons/favicon-busy-1.ico');
const updateBrowserFavicon = (
status: ISessionContext.KernelDisplayStatus

Loading…
Cancel
Save