Skip to content

Commit 0ccb108

Browse files
committed
update publc drive component
1 parent 32c59f2 commit 0ccb108

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

src/plugins/drivelistmanager.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import {
99
} from '@jupyter/react-components';
1010
import { useState } from 'react';
1111
import { IDriveInfo } from '../token';
12-
import { getDrivesList, getExcludedDrives, includeDrive } from '../requests';
12+
import {
13+
addPublicDrive,
14+
getDrivesList,
15+
getExcludedDrives,
16+
includeDrive
17+
} from '../requests';
1318
import { ISignal, Signal } from '@lumino/signaling';
1419
import { driveBrowserIcon } from '../icons';
1520

@@ -22,12 +27,20 @@ export interface IDriveInputProps {
2227
value: string;
2328
getValue: (event: any) => void;
2429
}
30+
2531
export function DriveInputComponent(props: IDriveInputProps) {
2632
return (
2733
<div>
2834
<div className="add-public-drive-section">
29-
<Search className="drive-search-input" onInput={props.getValue} />
30-
<Button className="input-add-drive-button" onClick={() => {}}>
35+
<Search
36+
className="drive-search-input"
37+
onInput={props.getValue}
38+
placeholder="Enter drive name"
39+
/>
40+
<Button
41+
className="input-add-drive-button"
42+
onClick={() => addPublicDrive(props.value)}
43+
>
3144
add
3245
</Button>
3346
</div>
@@ -168,7 +181,7 @@ export function DriveListManagerComponent({ model }: IProps) {
168181
</div>
169182

170183
<div className="drives-manager-section">
171-
<div> Enter public drive name</div>
184+
<div className="drives-section-title"> Add public drive</div>
172185
<DriveInputComponent
173186
isName={false}
174187
value={driveUrl}
@@ -177,7 +190,7 @@ export function DriveListManagerComponent({ model }: IProps) {
177190
</div>
178191

179192
<div className="drives-manager-section">
180-
<div> Available drives </div>
193+
<div className="drives-section-title"> Browser available drives </div>
181194
<DriveSearchListComponent
182195
isName={true}
183196
value={searchDrive}

style/base.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ li {
1919
} */
2020

2121
/* Clear floats after the columns */
22+
2223
/* .row::after {
2324
content: '';
2425
display: table;
@@ -39,8 +40,8 @@ li {
3940
.search-add-drive-button {
4041
background-color: var(--md-blue-700);
4142
color: white;
42-
4343
width: 8px;
44+
4445
/* height: 1em; */
4546
border-radius: 4px;
4647
}
@@ -73,6 +74,7 @@ li {
7374
min-width: 200px;
7475
border-right: 5px;
7576
border-left: 2px;
77+
7678
/* background-color: var(--jp-layout-color2); */
7779
}
7880

@@ -82,6 +84,7 @@ li {
8284
min-width: 100px;
8385
border-right: 2px;
8486
border-left: 2px;
87+
8588
/* background-color: var(--jp-layout-color2); */
8689
}
8790

@@ -91,6 +94,7 @@ li {
9194
width: 50px;
9295
border-right: 2px;
9396
border-left: 2px;
97+
9498
/* background-color: var(--jp-layout-color2); */
9599
}
96100

@@ -136,3 +140,7 @@ li {
136140
align-items: center;
137141
gap: 0.2rem;
138142
}
143+
144+
.drives-section-title {
145+
font-weight: 500;
146+
}

0 commit comments

Comments
 (0)