From 9aae8aa7c82acf9ed3edd503904d271597367b02 Mon Sep 17 00:00:00 2001 From: AllForNothing Date: Mon, 18 Apr 2022 12:55:51 +0800 Subject: [PATCH] Fix some css style issues Signed-off-by: AllForNothing --- .../create-edit-endpoint.component.html | 8 ++----- .../create-edit-endpoint.component.ts | 22 +++++++++++-------- .../immutable-tag.component.html | 4 ++-- .../tag-retention.component.html | 4 ++-- .../global-search.component.html | 2 +- .../global-search/search.component.scss | 6 +++++ src/portal/src/i18n/lang/zh-cn-lang.json | 2 +- 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.html b/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.html index 08d344caf0f..3f1fabb792c 100644 --- a/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.html +++ b/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.html @@ -94,16 +94,12 @@ [ngModel]="!target.insecure" (ngModelChange)="setInsecureValue($event)"> -
- - -
diff --git a/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.ts b/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.ts index da0527be2d0..4f0cec52514 100644 --- a/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.ts +++ b/src/portal/src/app/base/left-side-nav/registries/create-edit-endpoint/create-edit-endpoint.component.ts @@ -11,15 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import { - Component, - Output, - EventEmitter, - ViewChild, - AfterViewChecked, - OnDestroy, - OnInit -} from "@angular/core"; +import { AfterViewChecked, Component, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from "@angular/core"; import { NgForm } from "@angular/forms"; import { Subscription, throwError as observableThrowError } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; @@ -31,6 +23,7 @@ import { HttpClient } from "@angular/common/http"; import { catchError } from "rxjs/operators"; import { AppConfigService } from '../../../../services/app-config.service'; import { EndpointService, HELM_HUB } from "../../../../shared/services/endpoint.service"; +import { ClrLoadingState } from '@clr/angular'; const FAKE_PASSWORD = "rjGcfuRu"; const FAKE_JSON_KEY = "No Change"; @@ -73,6 +66,8 @@ export class CreateEditEndpointComponent adapterInfo: object; showEndpointList: boolean = false; endpointOnHover: boolean = false; + testButtonState: ClrLoadingState = ClrLoadingState.DEFAULT; + okButtonState: ClrLoadingState = ClrLoadingState.DEFAULT; constructor( private endpointService: EndpointService, private errorHandler: ErrorHandler, @@ -290,16 +285,19 @@ export class CreateEditEndpointComponent } this.testOngoing = true; + this.testButtonState = ClrLoadingState.LOADING; this.endpointService.pingEndpoint(payload).subscribe( response => { this.inlineAlert.showInlineSuccess({ message: "DESTINATION.TEST_CONNECTION_SUCCESS" }); this.testOngoing = false; + this.testButtonState = ClrLoadingState.SUCCESS; }, error => { this.inlineAlert.showInlineError("DESTINATION.TEST_CONNECTION_FAILURE"); this.testOngoing = false; + this.testButtonState = ClrLoadingState.ERROR; } ); } @@ -317,6 +315,7 @@ export class CreateEditEndpointComponent return; // Avoid duplicated submitting } this.onGoing = true; + this.okButtonState = ClrLoadingState.LOADING; this.endpointService.createEndpoint(this.target).subscribe( response => { this.translateService @@ -324,10 +323,12 @@ export class CreateEditEndpointComponent .subscribe(res => this.errorHandler.info(res)); this.reload.emit(true); this.onGoing = false; + this.okButtonState = ClrLoadingState.SUCCESS; this.close(); }, error => { this.onGoing = false; + this.okButtonState = ClrLoadingState.ERROR; this.inlineAlert.showInlineError(error); } ); @@ -358,6 +359,7 @@ export class CreateEditEndpointComponent } this.onGoing = true; + this.okButtonState = ClrLoadingState.LOADING; this.endpointService.updateEndpoint(this.target.id, payload).subscribe( response => { this.translateService @@ -366,10 +368,12 @@ export class CreateEditEndpointComponent this.reload.emit(true); this.close(); this.onGoing = false; + this.okButtonState = ClrLoadingState.SUCCESS; }, error => { this.inlineAlert.showInlineError(error); this.onGoing = false; + this.okButtonState = ClrLoadingState.ERROR; } ); } diff --git a/src/portal/src/app/base/project/tag-feature-integration/immutable-tag/immutable-tag.component.html b/src/portal/src/app/base/project/tag-feature-integration/immutable-tag/immutable-tag.component.html index f87f89e9511..b9a6c2cb5bd 100644 --- a/src/portal/src/app/base/project/tag-feature-integration/immutable-tag/immutable-tag.component.html +++ b/src/portal/src/app/base/project/tag-feature-integration/immutable-tag/immutable-tag.component.html @@ -25,8 +25,8 @@
- - + + {{'IMMUTABLE_TAG.IN_REPOSITORIES' | translate}} diff --git a/src/portal/src/app/base/project/tag-feature-integration/tag-retention/tag-retention.component.html b/src/portal/src/app/base/project/tag-feature-integration/tag-retention/tag-retention.component.html index 14178d6e352..1315058d932 100644 --- a/src/portal/src/app/base/project/tag-feature-integration/tag-retention/tag-retention.component.html +++ b/src/portal/src/app/base/project/tag-feature-integration/tag-retention/tag-retention.component.html @@ -30,8 +30,8 @@
- - + + {{'TAG_RETENTION.IN_REPOSITORIES' | translate}} diff --git a/src/portal/src/app/shared/components/global-search/global-search.component.html b/src/portal/src/app/shared/components/global-search/global-search.component.html index ee1ff592501..853ed0a08e6 100644 --- a/src/portal/src/app/shared/components/global-search/global-search.component.html +++ b/src/portal/src/app/shared/components/global-search/global-search.component.html @@ -1,5 +1,5 @@ diff --git a/src/portal/src/app/shared/components/global-search/search.component.scss b/src/portal/src/app/shared/components/global-search/search.component.scss index 04800e5081e..3d1d76fe676 100644 --- a/src/portal/src/app/shared/components/global-search/search.component.scss +++ b/src/portal/src/app/shared/components/global-search/search.component.scss @@ -68,3 +68,9 @@ #placeholder1 { height: 24px; } +.search-input { + outline: none; +} +.search-input::placeholder{ + color: #fafafa; +} diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index 90e4710facc..dd4c95cc5a7 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -68,7 +68,7 @@ }, "TOOLTIP": { "NAME_FILTER": "过滤资源的名字。不填或者填写“**”匹配所有资源;“library/**”只匹配“library”下的资源。更多的匹配模式请参考用户手册。", - "TAG_FILTER": "过滤资源的tag/version。不填或者“”匹配所有;“1.0*”只匹配以“1.0”开头的tag/version。", + "TAG_FILTER": "过滤资源的tag/version。不填或者“**”匹配所有;“1.0*”只匹配以“1.0”开头的tag/version。", "LABEL_FILTER": "根据标签筛选资源。", "RESOURCE_FILTER": "过滤资源的类型。", "PUSH_BASED": "把资源由本地Harbor推送到远端仓库。",