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