Skip to content

Commit

Permalink
update: remove quick module
Browse files Browse the repository at this point in the history
  • Loading branch information
kainonly committed May 5, 2023
1 parent 72b41db commit f98ab53
Show file tree
Hide file tree
Showing 37 changed files with 558 additions and 343 deletions.
5 changes: 0 additions & 5 deletions library/quick/ng-package.json

This file was deleted.

3 changes: 0 additions & 3 deletions library/quick/public-api.ts

This file was deleted.

109 changes: 0 additions & 109 deletions library/quick/quick.component.html

This file was deleted.

86 changes: 0 additions & 86 deletions library/quick/quick.component.ts

This file was deleted.

13 changes: 0 additions & 13 deletions library/quick/quick.module.ts

This file was deleted.

10 changes: 0 additions & 10 deletions library/quick/types.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/admin/orgs/orgs.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nz-layout class="common-layout">
<nz-sider style="height: 100%" nzWidth="180px" nzTheme="light">
<ul nz-menu nzMode="inline" style="border: none">
<nz-sider class="nav" nzWidth="240px" nzTheme="light">
<ul nz-menu>
<li nz-menu-group nzTitle="成员" i18n-nzTitle>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/', 'admin', 'orgs', 'users']">
Expand Down
4 changes: 2 additions & 2 deletions src/app/admin/settings/settings.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nz-layout class="common-layout">
<nz-sider style="height: 100%" nzWidth="180px" nzTheme="light">
<ul nz-menu nzMode="inline" style="border: none">
<nz-sider class="nav" nzWidth="240px" nzTheme="light">
<ul nz-menu>
<li nz-menu-group nzTitle="集成" i18n-nzTitle>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/', 'admin', 'settings', 'integrated', 'cloud']">
Expand Down
4 changes: 2 additions & 2 deletions src/app/admin/space/space.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nz-layout class="common-layout">
<nz-sider style="height: 100%" nzWidth="180px" nzTheme="light">
<ul nz-menu nzMode="inline" style="border: none">
<nz-sider class="nav" nzWidth="240px" nzTheme="light">
<ul nz-menu>
<li nz-menu-group nzTitle="项目" i18n-nzTitle>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/', 'admin', 'space', 'projects', 'managed']">
Expand Down
2 changes: 1 addition & 1 deletion src/app/admin/work/work.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nz-layout class="common-layout">
<nz-page-header [nzGhost]="false" nzTitle="工作区" i18n-nzTitle nzSubtitle="让开发管理便利起来" i18n-nzSubtitle>
<nz-page-header-content>
<nz-row nzJustify="space-between">
<nz-row nzJustify="space-between" nzAlign="bottom">
<nz-col>
<ng-container *ngIf="app.user as user">
<div class="user">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
</nz-space>
<p>
<span nz-icon nzType="copyright"></span>
<span> {{ year }} 研发于 </span>
<a href="https://github.com/weplanx" target="_blank"> <b>WEPLANX </b> <span nz-icon nzType="github"></span></a>
<a href="https://github.com/weplanx" target="_blank"> <b> WEPLANX </b> <span nz-icon nzType="github"></span></a>
</p>
</nz-footer>
</nz-layout>
5 changes: 2 additions & 3 deletions src/app/common/components/pictures/form/form.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Component, Inject, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';

import { Picture } from '@common/interfaces/picture';
import { Picture, PictureTag } from '@common/interfaces/picture';
import { PictureTagsService } from '@common/services/picture-tags.service';
import { AnyDto } from '@weplanx/ng';
import { PicturesService } from '@weplanx/ng/media';
import { WpxQuick } from '@weplanx/ng/quick';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NZ_MODAL_DATA, NzModalRef } from 'ng-zorro-antd/modal';
import { NzNotificationService } from 'ng-zorro-antd/notification';
Expand All @@ -27,7 +26,7 @@ export class FormComponent implements OnInit {
}
}
};
tagItems: Array<AnyDto<WpxQuick>> = [];
tagItems: Array<AnyDto<PictureTag>> = [];

constructor(
@Inject(NZ_MODAL_DATA) public data: InputData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<ng-template #footer>
<nz-space>
<ng-container *nzSpaceItem>
<wpx-quick #tagsRef [wpxApi]="instance.tags"> </wpx-quick>
<button nz-button (click)="tagsRef.open()" i18n> 设置标签 </button>
<button nz-button (click)="instance.openTags()" i18n> 设置标签 </button>
</ng-container>
<ng-container *nzSpaceItem>
<ng-container *ngTemplateOutlet="instance.uploadRef"></ng-container>
Expand Down
1 change: 0 additions & 1 deletion src/app/common/components/pictures/pictures.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
></wpx-upload-transport>
</ng-template>

<wpx-quick [wpxApi]="tags"> </wpx-quick>
<ng-template #tagSearchRef>
<nz-select
style="min-width: 180px"
Expand Down
37 changes: 23 additions & 14 deletions src/app/common/components/pictures/pictures.component.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';

import { FormComponent, InputData } from '@common/components/pictures/form/form.component';
import { Picture } from '@common/interfaces/picture';
import { TagsComponent } from '@common/components/pictures/tags/tags.component';
import { Picture, PictureTag } from '@common/interfaces/picture';
import { PictureTagsService } from '@common/services/picture-tags.service';
import { AnyDto } from '@weplanx/ng';
import { AnyDto, Filter } from '@weplanx/ng';
import { PicturesService, WpxMediaComponent, WpxMediaDataSource } from '@weplanx/ng/media';
import { WpxQuick, WpxQuickComponent } from '@weplanx/ng/quick';
import { Transport } from '@weplanx/ng/upload';
import { NzDrawerService } from 'ng-zorro-antd/drawer';
import { NzModalService } from 'ng-zorro-antd/modal';

export interface PicturesData {
height?: string;
}

@Component({
selector: 'app-pictures',
templateUrl: './pictures.component.html'
Expand All @@ -22,15 +19,19 @@ export class PicturesComponent implements OnInit {
@ViewChild('tagSearchRef', { static: true }) tagSearchRef!: TemplateRef<any>;
@ViewChild('searchRef', { static: true }) searchRef!: TemplateRef<any>;
@ViewChild(WpxMediaComponent, { static: true }) mediaRef!: WpxMediaComponent;
@ViewChild(WpxQuickComponent, { static: true }) tagsRef!: WpxQuickComponent;

ds!: WpxMediaDataSource;
searchText = '';

tagItems: Array<AnyDto<WpxQuick>> = [];
tagItems: Array<AnyDto<PictureTag>> = [];
tagIds: string[] = [];

constructor(private pictures: PicturesService, public tags: PictureTagsService, private modal: NzModalService) {}
constructor(
private pictures: PicturesService,
public tags: PictureTagsService,
private modal: NzModalService,
private drawer: NzDrawerService
) {}

ngOnInit(): void {
this.ds = new WpxMediaDataSource(this.pictures);
Expand All @@ -49,8 +50,13 @@ export class PicturesComponent implements OnInit {
this.ds.fetch(refresh);
}

clear(): void {
this.searchText = '';
this.getData(true);
}

getTags(name?: string): void {
const filter: Record<string, any> = {};
const filter: Filter<PictureTag> = {};
if (name) {
filter['name'] = { $regex: name };
}
Expand All @@ -59,9 +65,12 @@ export class PicturesComponent implements OnInit {
});
}

clear(): void {
this.searchText = '';
this.getData(true);
openTags(): void {
this.drawer.create({
nzWidth: 600,
nzClosable: false,
nzContent: TagsComponent
});
}

upload(data: Transport[]): void {
Expand Down
Loading

0 comments on commit f98ab53

Please sign in to comment.