Skip to content

Commit c9beec2

Browse files
authored
Fix server style (#149)
* Fix server style * Updates * Fix for delete style
1 parent 32f05e9 commit c9beec2

File tree

5 files changed

+31
-23
lines changed

5 files changed

+31
-23
lines changed

ui/Connector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function Connector({
5858
</div>
5959
</div>
6060
{expanded && (
61-
<React.Fragment>
61+
<div className="connector-body">
6262
{connector.type === 'database' && (
6363
<DatabaseConnector
6464
connector={connector as DatabaseConnectorInfo}
@@ -70,7 +70,7 @@ export function Connector({
7070
Close
7171
</Button>
7272
</div>
73-
</React.Fragment>
73+
</div>
7474
)}
7575
</div>
7676
);

ui/Server.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function Server({
8383
</div>
8484
</div>
8585
{expanded && (
86-
<React.Fragment>
86+
<div className="server-body">
8787
<div className="form-row">
8888
<Input
8989
label="Address"
@@ -184,7 +184,7 @@ export function Server({
184184
</Button>
185185
</div>
186186
)}
187-
</React.Fragment>
187+
</div>
188188
)}
189189
</div>
190190
);

ui/Updates.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ import { SITE_ROOT, VERSION } from '../shared/constants';
33
import { request } from '../shared/http';
44
import log from '../shared/log';
55
import { ContentTypeInfo } from '../shared/state';
6+
import { SettingsContext } from './Settings';
67

78
export function Updates() {
9+
const { state: settings } = React.useContext(SettingsContext);
810
const [updates, setUpdates] = React.useState(null);
911
React.useEffect(function getUpdates() {
1012
async function run() {
1113
try {
1214
const updates = await request(
1315
window.fetch,
1416
'GET',
15-
`${SITE_ROOT}/api/updates?version=${VERSION}`,
17+
`${SITE_ROOT}/api/updates?version=${VERSION}&i=${settings.id}`,
1618
new ContentTypeInfo(),
1719
[],
1820
'',

ui/components/FileInput.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ export function FileInput({
8383
return (
8484
<label className={inputClass}>
8585
{label && <span className="input-label">{label}</span>}
86-
{allowManualEntry && manualInput}
87-
{allowFilePicker && input}
86+
<span>
87+
{allowManualEntry && manualInput}
88+
{allowFilePicker && input}
89+
</span>
8890
</label>
8991
);
9092
}

ui/style.css

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,23 @@ input + input[type='file'] {
430430
padding: 10px;
431431
border: 1px solid transparent;
432432
border-bottom: 1px solid #ccc;
433-
}
434433

435-
.server .hover-button,
436-
.connector .hover-button {
437-
visibility: hidden;
434+
.connector-body,
435+
.server-body {
436+
overflow-x: auto;
437+
}
438+
439+
.radio-label,
440+
.input-label,
441+
.select-label {
442+
display: inline-block;
443+
text-align: right;
444+
width: 100px; /* 200px should be more than enough for anyone */
445+
}
446+
447+
.hover-button {
448+
visibility: hidden;
449+
}
438450
}
439451

440452
.server:hover .hover-button,
@@ -459,20 +471,12 @@ input + input[type='file'] {
459471
overflow-x: hidden;
460472
}
461473

462-
.connector {
463-
overflow-x: auto;
464-
465-
.connector-header .input {
474+
.server--expanded,
475+
.connector--expanded {
476+
.connector-name,
477+
.server-name {
466478
width: 100%;
467479
}
468-
469-
.radio-label,
470-
.input-label,
471-
.select-label {
472-
display: inline-block;
473-
text-align: right;
474-
width: 100px; /* 200px should be more than enough for anyone */
475-
}
476480
}
477481

478482
.pages {

0 commit comments

Comments
 (0)