From 6b37fd2eae8678f0151b7059b6cd2452b012f10c Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 2 Feb 2022 16:49:18 -0500 Subject: [PATCH] comment server selector functional now, some cleanup --- ui/component/common/item-panel-input-row.jsx | 2 +- ui/component/settingCommentsServer/view.jsx | 14 +------------- ui/scss/component/_comment-create.scss | 2 ++ ui/scss/component/_item-panel.scss | 10 ++++++++++ ui/scss/component/section.scss | 1 + 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ui/component/common/item-panel-input-row.jsx b/ui/component/common/item-panel-input-row.jsx index e561669e0..10d71d5a7 100644 --- a/ui/component/common/item-panel-input-row.jsx +++ b/ui/component/common/item-panel-input-row.jsx @@ -85,7 +85,7 @@ function ServerInputRow(props: Props) {
{ - // const timer = setTimeout(() => { - // Comments.setServerUrl(customServerEnabled ? url : undefined); - // if (url !== customServerUrl) { - // setCustomServerUrl(url); - // } - // }, DEBOUNCE_TEXT_INPUT_MS); - // - // return () => clearTimeout(timer); - // }, [url, customServerUrl, customServerEnabled, setCustomServerUrl]); - const handleSelectServer = (serverItem: CommentServerDetails) => { if (serverItem.url !== COMMENT_SERVER_API) { - alert(`set ${serverItem.url}`); Comments.setServerUrl(serverItem.url); setCustomServerUrl(serverItem.url); setCustomServerEnabled(true); } else { - alert('reset'); Comments.setServerUrl(undefined); setCustomServerEnabled(false); } @@ -63,6 +50,7 @@ function SettingCommentsServer(props: Props) { newCustomServers.push(serverItem); setCustomServers(newCustomServers); handleSelectServer(serverItem); + setAddServer(false); }; const handleRemoveServer = (serverItem) => { diff --git a/ui/scss/component/_comment-create.scss b/ui/scss/component/_comment-create.scss index 017b45bff..28c93d8c9 100644 --- a/ui/scss/component/_comment-create.scss +++ b/ui/scss/component/_comment-create.scss @@ -43,11 +43,13 @@ $thumbnailWidthSmall: 1rem; .commentCreate__labelWrapper { display: flex; + flex-direction: row; justify-content: flex-start; align-items: baseline; flex-wrap: wrap; width: 100%; + max-width: 50%; .commentCreate__label { white-space: nowrap; diff --git a/ui/scss/component/_item-panel.scss b/ui/scss/component/_item-panel.scss index 51c2bdace..7bc53dcd0 100644 --- a/ui/scss/component/_item-panel.scss +++ b/ui/scss/component/_item-panel.scss @@ -38,5 +38,15 @@ } .itemPanel--input { + min-height: var(--spacing-l); padding: 0 0 var(--spacing-s) 0; + fieldset-section, + .fieldset-group { + margin-top: var(--spacing-m); + } + &.checkbox, + .checkbox:only-child { + height: var(--spacing-l); + float: left; + } } diff --git a/ui/scss/component/section.scss b/ui/scss/component/section.scss index 56c4d12f9..96f392f79 100644 --- a/ui/scss/component/section.scss +++ b/ui/scss/component/section.scss @@ -224,6 +224,7 @@ min-width: 60%; max-width: 60%; } + margin-bottom: var(--spacing-m); } .settings__row-section-title {