Skip to content

Commit 0572c46

Browse files
committed
feat: update tag visibility and UI enhancements
- Filter tagList based on login status to exclude non-open tags. - Refactor move-web component HTML to improve layout with responsive design. - Add new localization keys for "No open" in English and Chinese. - Extend ITagPropValues interface to include optional noOpen property. - Update tag management UI to include a switch for tag visibility. - Import NzSwitchModule in tag component for toggle functionality.
1 parent a8a788c commit 0572c46

File tree

9 files changed

+585
-300
lines changed

9 files changed

+585
-300
lines changed

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
"type": "module",
2222
"private": true,
2323
"dependencies": {
24-
"@angular/animations": "^19.2.9",
25-
"@angular/common": "^19.2.9",
26-
"@angular/compiler": "^19.2.9",
27-
"@angular/core": "^19.2.9",
28-
"@angular/forms": "^19.2.9",
29-
"@angular/platform-browser": "^19.2.9",
30-
"@angular/platform-browser-dynamic": "^19.2.9",
31-
"@angular/router": "^19.2.9",
24+
"@angular/animations": "^19.2.10",
25+
"@angular/common": "^19.2.10",
26+
"@angular/compiler": "^19.2.10",
27+
"@angular/core": "^19.2.10",
28+
"@angular/forms": "^19.2.10",
29+
"@angular/platform-browser": "^19.2.10",
30+
"@angular/platform-browser-dynamic": "^19.2.10",
31+
"@angular/router": "^19.2.10",
3232
"axios": "^1.9.0",
3333
"chrome-finder": "^1.0.7",
3434
"clipboard": "^2.0.11",
@@ -42,21 +42,21 @@
4242
"mitt": "^3.0.1",
4343
"ng-zorro-antd": "^19.2.2",
4444
"nprogress": "^0.2.0",
45-
"puppeteer": "^24.7.2",
45+
"puppeteer": "^24.8.1",
4646
"qs": "^6.14.0",
4747
"rough-notation": "^0.5.1",
4848
"rxjs": "~7.8.2",
4949
"sharp": "^0.34.1",
5050
"zone.js": "~0.15.0"
5151
},
5252
"devDependencies": {
53-
"@angular-devkit/build-angular": "^19.2.10",
54-
"@angular/cli": "^19.2.10",
55-
"@angular/compiler-cli": "^19.2.9",
53+
"@angular-devkit/build-angular": "^19.2.11",
54+
"@angular/cli": "^19.2.11",
55+
"@angular/compiler-cli": "^19.2.10",
5656
"@tailwindcss/postcss": "^4.1.5",
5757
"@types/compression": "^1.7.5",
5858
"@types/file-saver": "^2.0.7",
59-
"@types/jasmine": "~5.1.7",
59+
"@types/jasmine": "~5.1.8",
6060
"@types/js-yaml": "^4.0.9",
6161
"@types/nodemailer": "^6.4.17",
6262
"@types/nprogress": "^0.2.3",
@@ -66,9 +66,9 @@
6666
"connect-history-api-fallback": "^2.0.0",
6767
"cors": "^2.8.5",
6868
"info-web": "^0.0.46",
69-
"jasmine-core": "~5.7.0",
70-
"lint-staged": "^15.5.1",
71-
"nodemailer": "^6.10.1",
69+
"jasmine-core": "~5.7.1",
70+
"lint-staged": "^15.5.2",
71+
"nodemailer": "^7.0.2",
7272
"pm2": "^6.0.5",
7373
"postcss": "^8.5.3",
7474
"prettier": "^3.5.3",

pnpm-lock.yaml

Lines changed: 513 additions & 241 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/create-web/index.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class CreateWebComponent {
8181
readonly permissions = getPermissions(settings)
8282
readonly DEFAULT_SORT_INDEX = DEFAULT_SORT_INDEX
8383
validateForm!: FormGroup
84-
tagList = tagList
84+
tagList = tagList.filter((item) => !(!isLogin && item.noOpen))
8585
submitting = false
8686
getting = false
8787
translating = false

src/components/move-web/index.component.html

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,60 @@
66
(nzOnOk)="hanldeOk()"
77
>
88
<ng-container *nzModalContent>
9-
<nz-select
10-
[ngModel]="oneSelect"
11-
nzShowSearch
12-
[nzPlaceHolder]="$t('_sel1')"
13-
(ngModelChange)="hanldeOneSelect($event)"
14-
style="width: 160px"
15-
>
16-
<nz-option
17-
*ngFor="let item of websiteList"
18-
[nzLabel]="item.title"
19-
[nzValue]="item.id"
9+
<div class="grid grid-cols-1 gap-4 md:grid-cols-3">
10+
<nz-select
11+
[ngModel]="oneSelect"
12+
nzShowSearch
13+
[nzPlaceHolder]="$t('_sel1')"
14+
(ngModelChange)="hanldeOneSelect($event)"
15+
class="w-full md:w-[160px]"
2016
>
21-
</nz-option>
22-
</nz-select>
17+
<nz-option
18+
*ngFor="let item of websiteList"
19+
[nzLabel]="item.title"
20+
[nzValue]="item.id"
21+
>
22+
</nz-option>
23+
</nz-select>
2324

24-
<nz-select
25-
[ngModel]="twoSelect"
26-
nzShowSearch
27-
[nzPlaceHolder]="$t('_sel2')"
28-
(ngModelChange)="hanldeTwoSelect($event)"
29-
style="width: 160px; margin-left: 15px"
30-
*ngIf="level > 2"
31-
>
32-
<nz-option
33-
*ngFor="let item of twoOptions"
34-
[nzLabel]="item.title"
35-
[nzValue]="item.id"
25+
<nz-select
26+
[ngModel]="twoSelect"
27+
nzShowSearch
28+
[nzPlaceHolder]="$t('_sel2')"
29+
(ngModelChange)="hanldeTwoSelect($event)"
30+
class="w-full md:w-[160px]"
31+
*ngIf="level > 2"
3632
>
37-
</nz-option>
38-
</nz-select>
33+
<nz-option
34+
*ngFor="let item of twoOptions"
35+
[nzLabel]="item.title"
36+
[nzValue]="item.id"
37+
>
38+
</nz-option>
39+
</nz-select>
3940

40-
<nz-select
41-
[ngModel]="threeSelect"
42-
nzShowSearch
43-
[nzPlaceHolder]="$t('_sel3')"
44-
(ngModelChange)="hanldeThreeSelect($event)"
45-
style="width: 160px; margin-left: 15px"
46-
*ngIf="level === 4"
47-
>
48-
<nz-option
49-
*ngFor="let item of threeOptions"
50-
[nzLabel]="item.title"
51-
[nzValue]="item.id"
41+
<nz-select
42+
[ngModel]="threeSelect"
43+
nzShowSearch
44+
[nzPlaceHolder]="$t('_sel3')"
45+
(ngModelChange)="hanldeThreeSelect($event)"
46+
class="w-full md:w-[160px]"
47+
*ngIf="level === 4"
5248
>
53-
</nz-option>
54-
</nz-select>
49+
<nz-option
50+
*ngFor="let item of threeOptions"
51+
[nzLabel]="item.title"
52+
[nzValue]="item.id"
53+
>
54+
</nz-option>
55+
</nz-select>
56+
</div>
5557

5658
<div class="act select-none">
5759
<label nz-checkbox [(ngModel)]="isCopy">{{ $t('_copy') }}</label>
58-
<label nz-checkbox [(ngModel)]="isSame" *ngIf="isCopy">{{ $t('_same') }}</label>
60+
<label nz-checkbox [(ngModel)]="isSame" *ngIf="isCopy">{{
61+
$t('_same')
62+
}}</label>
5963
</div>
6064
</ng-container>
6165
</nz-modal>

src/locale/english.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ const english: Record<string, any> = {
334334
_logoDarkImg: 'Logo Dark Picture',
335335
_errLogo: 'The logo image cannot be accessed',
336336
_logoMaxHeight: 'Max height',
337+
_noPublic: 'No open',
337338
}
338339

339340
export default english

src/locale/zh_CN.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ const zhCN: Record<string, any> = {
321321
_logoDarkImg: 'Logo暗黑图',
322322
_errLogo: '该LOGO图无法访问',
323323
_logoMaxHeight: 'Logo最大高度',
324+
_noPublic: '不公开',
324325
}
325326

326327
export default zhCN

src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export interface ITagPropValues {
128128
color: string
129129
desc: string
130130
isInner: boolean
131+
noOpen?: boolean
131132
sort?: number | string
132133

133134
[key: string]: any

src/view/system/tag/index.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<nz-table #basicTable [nzData]="tagList">
2424
<thead>
2525
<tr>
26+
<th nzWidth="80px">{{ $t('_noPublic') }}</th>
2627
<th nzWidth="150px">{{ $t('_tagName') }}</th>
2728
<th nzWidth="160px">{{ $t('_color') }}</th>
2829
<th nzWidth="150px">{{ $t('_sort') }}</th>
@@ -32,6 +33,9 @@
3233
</thead>
3334
<tbody>
3435
<tr *ngFor="let data of tagList; index as idx; trackBy: trackByItem">
36+
<td>
37+
<nz-switch [(ngModel)]="data.noOpen"></nz-switch>
38+
</td>
3539
<td>
3640
<input nz-input [(ngModel)]="data.name" maxlength="10" />
3741
</td>

src/view/system/tag/index.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { NzButtonModule } from 'ng-zorro-antd/button'
1717
import { NzInputModule } from 'ng-zorro-antd/input'
1818
import { NzTableModule } from 'ng-zorro-antd/table'
1919
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
20+
import { NzSwitchModule } from 'ng-zorro-antd/switch'
2021

2122
@Component({
2223
standalone: true,
@@ -27,6 +28,7 @@ import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'
2728
NzInputModule,
2829
NzTableModule,
2930
NzPopconfirmModule,
31+
NzSwitchModule,
3032
],
3133
providers: [NzModalService, NzMessageService],
3234
selector: 'system-tag',

0 commit comments

Comments
 (0)