Skip to content

Commit

Permalink
[web-app]bugfix:fix input blocking when input error in dark theme (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 authored May 29, 2022
1 parent 3d98cde commit 6b1841c
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 28 deletions.
2 changes: 1 addition & 1 deletion web-app/src/app/layout/basic/basic.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import { CONSTS } from 'src/app/shared/consts';
<router-outlet></router-outlet>
</ng-template>
</layout-default>
<global-footer style="border-top: 1px solid #e5e5e5; min-height: 120px; text-shadow: 0 1px 0 #fff;margin:0;">
<global-footer style="border-top: 1px solid #e5e5e5; min-height: 120px; margin:0;">
<div style="margin-top: 30px">
HertzBeat {{ version }}<br />
Copyright
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/app/layout/passport/passport.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<router-outlet></router-outlet>
<global-footer [links]="links">
<div style="margin-top: 0px">
<div style="margin-top: 0">
HertzBeat {{ version }}<br />
Copyright
<i nz-icon nzType="copyright" nzTheme="outline"></i>
Expand Down
1 change: 0 additions & 1 deletion web-app/src/app/layout/passport/passport.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, Inject, OnInit } from '@angular/core';
import { I18NService } from '@core';
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
import { ALAIN_I18N_TOKEN } from '@delon/theme';

import { CONSTS } from 'src/app/shared/consts';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { NzNotificationService } from 'ng-zorro-antd/notification';
import { NzTableQueryParams } from 'ng-zorro-antd/table';

import { Alert } from '../../../pojo/Alert';
import { AlertService } from '../../../service/alert.service';
import { Tag } from '../../../pojo/Tag';
import { AlertService } from '../../../service/alert.service';

@Component({
selector: 'app-alert-center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('MonitorDataChartComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ MonitorDataChartComponent ]
})
.compileComponents();
declarations: [MonitorDataChartComponent]
}).compileComponents();
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { switchMap } from 'rxjs/operators';
import { Monitor } from '../../../pojo/Monitor';
import { Param } from '../../../pojo/Param';
import { ParamDefine } from '../../../pojo/ParamDefine';
import { Tag } from '../../../pojo/Tag';
import { AppDefineService } from '../../../service/app-define.service';
import { MonitorService } from '../../../service/monitor.service';
import { TagService } from '../../../service/tag.service';
import { Tag } from '../../../pojo/Tag';

@Component({
selector: 'app-monitor-add',
Expand Down
23 changes: 17 additions & 6 deletions web-app/src/app/routes/setting/setting.module.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
import { NgModule, Type } from '@angular/core';
import { SharedModule } from '@shared';

import { SettingRoutingModule } from './setting-routing.module';
import { SettingTagsComponent } from './tags/tags.component';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
import { NzCascaderModule } from 'ng-zorro-antd/cascader';
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzListModule } from 'ng-zorro-antd/list';
import { NzSwitchModule } from 'ng-zorro-antd/switch';
import { ColorPickerModule } from 'ngx-color-picker';
import { NzTagModule } from 'ng-zorro-antd/tag';
import { ColorPickerModule } from 'ngx-color-picker';

import { SettingRoutingModule } from './setting-routing.module';
import { SettingTagsComponent } from './tags/tags.component';

const COMPONENTS: Array<Type<void>> = [SettingTagsComponent];

@NgModule({
imports: [SharedModule, SettingRoutingModule, NzDividerModule, NzBreadCrumbModule, NzCascaderModule, NzCollapseModule, NzListModule, NzSwitchModule, ColorPickerModule, NzTagModule],
imports: [
SharedModule,
SettingRoutingModule,
NzDividerModule,
NzBreadCrumbModule,
NzCascaderModule,
NzCollapseModule,
NzListModule,
NzSwitchModule,
ColorPickerModule,
NzTagModule
],
declarations: COMPONENTS
})
export class SettingModule {}
9 changes: 5 additions & 4 deletions web-app/src/app/routes/setting/tags/tags.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';

import { SettingTagsComponent } from './tags.component';

describe('SettingTagsComponent', () => {
Expand All @@ -7,11 +8,11 @@ describe('SettingTagsComponent', () => {

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SettingTagsComponent ]
TestBed.configureTestingModule({
declarations: [SettingTagsComponent]
}).compileComponents();
})
.compileComponents();
}));
);

beforeEach(() => {
fixture = TestBed.createComponent(SettingTagsComponent);
Expand Down
6 changes: 3 additions & 3 deletions web-app/src/app/routes/setting/tags/tags.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { ALAIN_I18N_TOKEN } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { NzTableQueryParams } from 'ng-zorro-antd/table';
import { finalize } from 'rxjs/operators';

import { Tag } from '../../../pojo/Tag';
import { TagService } from '../../../service/tag.service';
import { AlertDefine } from '../../../pojo/AlertDefine';
import { finalize } from 'rxjs/operators';
import { NoticeReceiver } from '../../../pojo/NoticeReceiver';
import { Tag } from '../../../pojo/Tag';
import { TagService } from '../../../service/tag.service';

@Component({
selector: 'app-setting-tags',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ describe('KeyValueInputComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ KeyValueInputComponent ]
})
.compileComponents();
declarations: [KeyValueInputComponent]
}).compileComponents();
});

beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions web-app/src/app/shared/consts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const CONSTS = {
VERSION: 'v1.0-beta.8'
};
VERSION: 'v1.0'
};
3 changes: 1 addition & 2 deletions web-app/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.

import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
5 changes: 5 additions & 0 deletions web-app/src/styles/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
border-color: #ff4081;
}

// bugfix https://github.com/dromara/hertzbeat/issues/133
.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover, .ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {
background: inherit;
}

.ant-radio-wrapper:hover .ant-radio,
.ant-radio:hover .ant-radio-inner,
.ant-radio-input:focus + .ant-radio-inner {
Expand Down

0 comments on commit 6b1841c

Please sign in to comment.