update to 14
This commit is contained in:
@@ -134,7 +134,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "index",
|
|
||||||
"cli": {
|
"cli": {
|
||||||
"analytics": false
|
"analytics": false
|
||||||
}
|
}
|
||||||
|
|||||||
26
package.json
26
package.json
@@ -12,15 +12,15 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^13.3.12",
|
"@angular/animations": "^14.2.12",
|
||||||
"@angular/common": "^13.3.12",
|
"@angular/common": "^14.2.12",
|
||||||
"@angular/compiler": "^13.3.12",
|
"@angular/compiler": "^14.2.12",
|
||||||
"@angular/core": "^13.3.12",
|
"@angular/core": "^14.2.12",
|
||||||
"@angular/forms": "^13.3.12",
|
"@angular/forms": "^14.2.12",
|
||||||
"@angular/platform-browser": "^13.3.12",
|
"@angular/platform-browser": "^14.2.12",
|
||||||
"@angular/platform-browser-dynamic": "^13.3.12",
|
"@angular/platform-browser-dynamic": "^14.2.12",
|
||||||
"@angular/router": "^13.3.12",
|
"@angular/router": "^14.2.12",
|
||||||
"@angular/service-worker": "^13.3.12",
|
"@angular/service-worker": "^14.2.12",
|
||||||
"jquery": "^3.5.1",
|
"jquery": "^3.5.1",
|
||||||
"js-base64": "^3.6.0",
|
"js-base64": "^3.6.0",
|
||||||
"ng-zorro-antd": "^11.2.0",
|
"ng-zorro-antd": "^11.2.0",
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
"zone.js": "^0.11.3"
|
"zone.js": "^0.11.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^13.3.10",
|
"@angular-devkit/build-angular": "^14.2.10",
|
||||||
"@angular/cli": "^13.3.10",
|
"@angular/cli": "^14.2.10",
|
||||||
"@angular/compiler-cli": "^13.3.12",
|
"@angular/compiler-cli": "^14.2.12",
|
||||||
"@angular/language-service": "^13.2.0",
|
"@angular/language-service": "^14.2.12",
|
||||||
"@types/jasmine": "^3.6.2",
|
"@types/jasmine": "^3.6.2",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
"@types/node": "^16.11.6",
|
"@types/node": "^16.11.6",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {RequestObj, Response} from '../../../class/HttpReqAndResp';
|
|||||||
import {Link} from '../../../class/Link';
|
import {Link} from '../../../class/Link';
|
||||||
import {ApiService} from '../../../api/api.service';
|
import {ApiService} from '../../../api/api.service';
|
||||||
import {NzMessageService} from 'ng-zorro-antd/message';
|
import {NzMessageService} from 'ng-zorro-antd/message';
|
||||||
import {FormControl, FormGroup, Validators} from '@angular/forms';
|
import {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {CommonTableComponent} from '../components/common-table/common-table.component';
|
import {CommonTableComponent} from '../components/common-table/common-table.component';
|
||||||
@@ -18,27 +18,27 @@ export class AdminLinkComponent implements OnInit {
|
|||||||
@ViewChild('commonTableComponent') commonTableComponent: CommonTableComponent<Link>;
|
@ViewChild('commonTableComponent') commonTableComponent: CommonTableComponent<Link>;
|
||||||
modalVisible: boolean = false;
|
modalVisible: boolean = false;
|
||||||
modalTitle: string = '';
|
modalTitle: string = '';
|
||||||
formGroup: FormGroup;
|
formGroup: UntypedFormGroup;
|
||||||
request: RequestObj;
|
request: RequestObj;
|
||||||
headData: Data<Link>[];
|
headData: Data<Link>[];
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private messageService: NzMessageService, private title: Title) {
|
constructor(private apiService: ApiService, private messageService: NzMessageService, private title: Title) {
|
||||||
this.title.setTitle('小海博客 | 友链管理');
|
this.title.setTitle('小海博客 | 友链管理');
|
||||||
this.formGroup = new FormGroup({
|
this.formGroup = new UntypedFormGroup({
|
||||||
id: new FormControl(null),
|
id: new UntypedFormControl(null),
|
||||||
name: new FormControl(null, [Validators.required]),
|
name: new UntypedFormControl(null, [Validators.required]),
|
||||||
url: new FormControl(null, [
|
url: new UntypedFormControl(null, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
Validators.pattern(/^(https:\/\/|http:\/\/|)([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/)
|
Validators.pattern(/^(https:\/\/|http:\/\/|)([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/)
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
open: new FormControl(null, [Validators.required]),
|
open: new UntypedFormControl(null, [Validators.required]),
|
||||||
desc: new FormControl(null, [Validators.maxLength(255)]),
|
desc: new UntypedFormControl(null, [Validators.maxLength(255)]),
|
||||||
iconPath: new FormControl(null, [
|
iconPath: new UntypedFormControl(null, [
|
||||||
Validators.pattern(/^(https:\/\/|http:\/\/|)([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/)
|
Validators.pattern(/^(https:\/\/|http:\/\/|)([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/)
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
oper: new FormControl(null)
|
oper: new UntypedFormControl(null)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {NzMessageService} from 'ng-zorro-antd/message';
|
import {NzMessageService} from 'ng-zorro-antd/message';
|
||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {FormControl, FormGroup} from '@angular/forms';
|
import {UntypedFormControl, UntypedFormGroup} from '@angular/forms';
|
||||||
import {RequestObj} from '../../../class/HttpReqAndResp';
|
import {RequestObj} from '../../../class/HttpReqAndResp';
|
||||||
import {ApiService} from '../../../api/api.service';
|
import {ApiService} from '../../../api/api.service';
|
||||||
import {User} from '../../../class/User';
|
import {User} from '../../../class/User';
|
||||||
@@ -21,20 +21,20 @@ export class AdminUserComponent implements OnInit {
|
|||||||
isEdit: false,
|
isEdit: false,
|
||||||
resetPwd: false
|
resetPwd: false
|
||||||
};
|
};
|
||||||
formGroup: FormGroup;
|
formGroup: UntypedFormGroup;
|
||||||
headData: Data<User>[];
|
headData: Data<User>[];
|
||||||
request: RequestObj;
|
request: RequestObj;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private title: Title, private messageService: NzMessageService,
|
constructor(private apiService: ApiService, private title: Title, private messageService: NzMessageService,
|
||||||
private userService: GlobalUserService) {
|
private userService: GlobalUserService) {
|
||||||
this.formGroup = new FormGroup({
|
this.formGroup = new UntypedFormGroup({
|
||||||
id: new FormControl(null),
|
id: new UntypedFormControl(null),
|
||||||
email: new FormControl(''),
|
email: new UntypedFormControl(''),
|
||||||
displayName: new FormControl(''),
|
displayName: new UntypedFormControl(''),
|
||||||
emailStatus: new FormControl(null),
|
emailStatus: new UntypedFormControl(null),
|
||||||
desc: new FormControl(null),
|
desc: new UntypedFormControl(null),
|
||||||
role: new FormControl(null),
|
role: new UntypedFormControl(null),
|
||||||
pwd: new FormControl(''),
|
pwd: new UntypedFormControl(''),
|
||||||
});
|
});
|
||||||
this.userService.watchUserInfo({
|
this.userService.watchUserInfo({
|
||||||
next: data => this.user = data.result,
|
next: data => this.user = data.result,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {AbstractControl, FormControl, FormGroup, Validators} from '@angular/forms';
|
import {AbstractControl, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
||||||
import {NzMessageService} from 'ng-zorro-antd/message';
|
import {NzMessageService} from 'ng-zorro-antd/message';
|
||||||
import {NzUploadFile} from 'ng-zorro-antd/upload';
|
import {NzUploadFile} from 'ng-zorro-antd/upload';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
@@ -23,8 +23,8 @@ export class AdminComponent implements OnInit {
|
|||||||
sayHelloContent: string;
|
sayHelloContent: string;
|
||||||
editInfoModalVisible: boolean = false;
|
editInfoModalVisible: boolean = false;
|
||||||
resetPwdModalVisible: boolean = false;
|
resetPwdModalVisible: boolean = false;
|
||||||
editInfoFormGroup: FormGroup;
|
editInfoFormGroup: UntypedFormGroup;
|
||||||
resetPwdFormGroup: FormGroup;
|
resetPwdFormGroup: UntypedFormGroup;
|
||||||
noAvatarUrl = 'https://cdn.celess.cn/';
|
noAvatarUrl = 'https://cdn.celess.cn/';
|
||||||
host: string;
|
host: string;
|
||||||
|
|
||||||
@@ -39,17 +39,17 @@ export class AdminComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.editInfoFormGroup = new FormGroup({
|
this.editInfoFormGroup = new UntypedFormGroup({
|
||||||
desc: new FormControl(),
|
desc: new UntypedFormControl(),
|
||||||
displayName: new FormControl(),
|
displayName: new UntypedFormControl(),
|
||||||
email: new FormControl({value: null, disabled: true})
|
email: new UntypedFormControl({value: null, disabled: true})
|
||||||
});
|
});
|
||||||
this.resetPwdFormGroup = new FormGroup({
|
this.resetPwdFormGroup = new UntypedFormGroup({
|
||||||
originPwd: new FormControl(null, [Validators.required]),
|
originPwd: new UntypedFormControl(null, [Validators.required]),
|
||||||
newPwd: new FormControl(null, [
|
newPwd: new UntypedFormControl(null, [
|
||||||
Validators.required, Validators.minLength(6), Validators.maxLength(16), Validators.pattern(/^[\w_-]{6,16}$/)
|
Validators.required, Validators.minLength(6), Validators.maxLength(16), Validators.pattern(/^[\w_-]{6,16}$/)
|
||||||
]),
|
]),
|
||||||
newPwdConfirm: new FormControl(null, [
|
newPwdConfirm: new UntypedFormControl(null, [
|
||||||
Validators.required, Validators.minLength(6), Validators.maxLength(16), Validators.pattern(/^[\w_-]{6,16}$/),
|
Validators.required, Validators.minLength(6), Validators.maxLength(16), Validators.pattern(/^[\w_-]{6,16}$/),
|
||||||
this.checkSamePwd()
|
this.checkSamePwd()
|
||||||
]),
|
]),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {NzModalService} from 'ng-zorro-antd/modal';
|
|||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {ApiService} from '../../api/api.service';
|
import {ApiService} from '../../api/api.service';
|
||||||
import {ApplyLinkReq, Link} from '../../class/Link';
|
import {ApplyLinkReq, Link} from '../../class/Link';
|
||||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
|
||||||
import {Color, randomColor} from '../../utils/color';
|
import {Color, randomColor} from '../../utils/color';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -19,14 +19,14 @@ export class LinkComponent implements OnInit {
|
|||||||
link: Link;
|
link: Link;
|
||||||
linkList: Link[];
|
linkList: Link[];
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
applyFormGroup: FormGroup;
|
applyFormGroup: UntypedFormGroup;
|
||||||
colors: Color[];
|
colors: Color[];
|
||||||
private lastUrl: string = '';
|
private lastUrl: string = '';
|
||||||
|
|
||||||
constructor(private message: NzMessageService,
|
constructor(private message: NzMessageService,
|
||||||
private titleService: Title,
|
private titleService: Title,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private fb: FormBuilder,
|
private fb: UntypedFormBuilder,
|
||||||
private modal: NzModalService) {
|
private modal: NzModalService) {
|
||||||
titleService.setTitle('小海博客 | 友链');
|
titleService.setTitle('小海博客 | 友链');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
|
import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
|
||||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
|
||||||
import {Category} from '../../../../class/Tag';
|
import {Category} from '../../../../class/Tag';
|
||||||
import {COLOR_LIST} from '../../../../utils/color';
|
import {COLOR_LIST} from '../../../../utils/color';
|
||||||
|
|
||||||
@@ -22,14 +22,14 @@ export class PublishFormComponent implements OnInit {
|
|||||||
isUpdate: boolean;
|
isUpdate: boolean;
|
||||||
url?: string;
|
url?: string;
|
||||||
}>();
|
}>();
|
||||||
formGroup: FormGroup;
|
formGroup: UntypedFormGroup;
|
||||||
tagTmpList: string[] = [];
|
tagTmpList: string[] = [];
|
||||||
tagInputVisible: boolean = false;
|
tagInputVisible: boolean = false;
|
||||||
tagListTouched: boolean = false;
|
tagListTouched: boolean = false;
|
||||||
editTagText: string = '新增';
|
editTagText: string = '新增';
|
||||||
color: string[] = [];
|
color: string[] = [];
|
||||||
|
|
||||||
constructor(private fb: FormBuilder) {
|
constructor(private fb: UntypedFormBuilder) {
|
||||||
}
|
}
|
||||||
|
|
||||||
randomColor = () => this.color = COLOR_LIST.map(c => c.bgColor).sort(() => Math.floor(Math.random() * 2));
|
randomColor = () => this.color = COLOR_LIST.map(c => c.bgColor).sort(() => Math.floor(Math.random() * 2));
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "es2015",
|
"target": "es2020",
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"node_modules/@types"
|
"node_modules/@types"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user