Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c06c539

Browse files
committed
add nb cloud checkpoints
1 parent 86c3d04 commit c06c539

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

‎packages/application/src/shell.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { DocumentRegistry, DocumentWidget } from '@jupyterlab/docregistry';
55
import { ITranslator, nullTranslator } from '@jupyterlab/translation';
66
import {
77
classes,
8+
cloudIcon,
89
DockPanelSvg,
910
LabIcon,
1011
TabBarSvg,
@@ -2122,6 +2123,7 @@ namespace Private {
21222123
}
21232124

21242125
export class TitleHandler extends Widget {
2126+
private tip: HTMLElement;
21252127
/**
21262128
* Construct a new title handler.
21272129
*/
@@ -2131,7 +2133,20 @@ namespace Private {
21312133
inputElement.type = 'text';
21322134
inputElement.id = 'jp-title-panel-title-ext';
21332135
this.node.appendChild(inputElement);
2136+
2137+
const tip = document.createElement('div');
2138+
tip.className = 'jp-title-ext';
2139+
2140+
const tipImg = document.createElement('div');
2141+
tipImg.className = 'jp-title-ext-tip-img';
2142+
tipImg.innerHTML = cloudIcon.svgstr;
2143+
2144+
tip.appendChild(tipImg);
2145+
2146+
this.node.appendChild(tip);
2147+
this.tip = tip;
21342148
this._shell = shell;
2149+
21352150
this.id = 'jp-title-panel-title';
21362151
}
21372152

@@ -2180,6 +2195,16 @@ namespace Private {
21802195
}
21812196
const oldName = widget.title.label;
21822197
const inputElement = this.inputElement;
2198+
2199+
if (this.tip.childElementCount == 1) {
2200+
const spanTip = document.createElement('span');
2201+
spanTip.className = 'jp-title-ext-tip';
2202+
spanTip.textContent = widget.title.caption.split('\n')[3];
2203+
this.tip.appendChild(spanTip);
2204+
} else {
2205+
// @ts-ignore
2206+
this.tip.lastChild.textContent = widget.title.caption.split('\n')[3];
2207+
}
21832208
const newName = inputElement.value;
21842209
inputElement.blur();
21852210

‎packages/application/style/titlepanel.css‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@
1515
}
1616

1717
#jp-title-panel-title {
18-
/*flex: 1 1 auto;*/
18+
/*flex: 0.5;*/
1919
margin-left: 12px;
2020
height: 56px;
2121
line-height: 56px;
2222
z-index: 200;
23+
display: flex;
24+
align-items: center;
2325
}
2426

2527
#jp-title-panel-title input {
2628
background: transparent;
2729
margin: 0;
2830
height: 28px;
29-
width: 100%;
31+
32+
/*width: 70%;*/
3033
padding: 0;
3134
box-sizing: border-box;
3235
border: none;
@@ -40,3 +43,20 @@
4043
-webkit-appearance: none;
4144
-moz-appearance: none;
4245
}
46+
47+
.jp-title-ext {
48+
display: flex;
49+
align-items: center;
50+
}
51+
52+
.jp-title-ext-tip {
53+
color: var(--jp-ui-font-color3);
54+
font-size: 10px;
55+
width: 100%;
56+
margin-left: 4px;
57+
}
58+
59+
.jp-title-ext-tip-img {
60+
display: flex;
61+
margin-left: 8px;
62+
}

‎packages/ui-components/src/icon/iconimports.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import runSvgstr from '../../style/icons/toolbar/run.svg';
8585
import runningSvgstr from '../../style/icons/sidebar/running.svg';
8686
import saveSvgstr from '../../style/icons/toolbar/save.svg';
8787
import searchSvgstr from '../../style/icons/toolbar/search.svg';
88+
import cloudSvgstr from '../../style/icons/toolbar/cloud.svg';
8889
import settingsSvgstr from '../../style/icons/filetype/settings.svg';
8990
import shareSvgstr from '../../style/icons/sidebar/share.svg';
9091
import spreadsheetSvgstr from '../../style/icons/filetype/spreadsheet.svg';
@@ -181,6 +182,7 @@ export const runIcon = new LabIcon({ name: 'ui-components:run', svgstr: runSvgst
181182
export const runningIcon = new LabIcon({ name: 'ui-components:running', svgstr: runningSvgstr });
182183
export const saveIcon = new LabIcon({ name: 'ui-components:save', svgstr: saveSvgstr });
183184
export const searchIcon = new LabIcon({ name: 'ui-components:search', svgstr: searchSvgstr });
185+
export const cloudIcon = new LabIcon({ name: 'ui-components:cloud', svgstr: cloudSvgstr });
184186
export const settingsIcon = new LabIcon({ name: 'ui-components:settings', svgstr: settingsSvgstr });
185187
export const shareIcon = new LabIcon({ name: 'ui-components:share', svgstr: shareSvgstr });
186188
export const spreadsheetIcon = new LabIcon({ name: 'ui-components:spreadsheet', svgstr: spreadsheetSvgstr });

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /