Skip to content

Commit

Permalink
Merge pull request #70 from Shubha-accenture/sprint12_plugin_enable_f…
Browse files Browse the repository at this point in the history
…ixes

dpms load in settings fix
  • Loading branch information
Shubha-accenture authored Oct 9, 2023
2 parents 8430206 + 54550af commit b63ccaa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ const extension: JupyterFrontEndPlugin<void> = {
onPreviewEnabledChanged();
});

/**
/**
* Handler for when the Jupyter Lab theme changes.
*/
const onThemeChanged = () => {
const onThemeChanged = () => {
if (!panelDpms || !panelGcs) return;
const isLightTheme = themeManager.theme
? themeManager.isLight(themeManager.theme)
Expand Down Expand Up @@ -181,8 +181,6 @@ const extension: JupyterFrontEndPlugin<void> = {
new NotebookButtonExtension(app as JupyterLab, launcher, themeManager)
);



const loadDpmsWidget = (value: string) => {
// If DPMS is not enabled, no-op.
if (!panelDpms) return;
Expand Down Expand Up @@ -275,7 +273,8 @@ const extension: JupyterFrontEndPlugin<void> = {
(newValue.title.label === 'Launcher' ||
newValue.title.label === 'Config Setup' ||
newValue.title.label === 'Clusters' ||
newValue.title.label === 'Serverless') &&
newValue.title.label === 'Serverless' ||
newValue.title.label === 'Settings') &&
lastClusterName !== ''
) {
localStorage.setItem('oldNotebookValue', lastClusterName || '');
Expand All @@ -289,7 +288,8 @@ const extension: JupyterFrontEndPlugin<void> = {
newValue.title.label !== 'Config Setup' &&
newValue.title.label !== 'Clusters' &&
newValue.title.label !== 'Serverless' &&
newValue.title.label !== 'Runtime template'
newValue.title.label !== 'Runtime template' &&
newValue.title.label !== 'Settings'
) {
let oldNotebook = localStorage.getItem('oldNotebookValue');
localStorage.setItem('notebookValue', oldNotebook || '');
Expand Down

0 comments on commit b63ccaa

Please sign in to comment.