Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
biaogebusy committed Dec 6, 2024
2 parents ac7f719 + 3ca0d17 commit 5bd2b63
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 16 deletions.
62 changes: 46 additions & 16 deletions src/app/modules/builder/sidebar/page-list/page-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,8 @@ export class PageListComponent extends BaseComponent implements OnInit {
loading = false;
pager: IPager;
currentEditeTitle: string;
fields: FormlyFieldConfig[] = [
{
key: 'title',
type: 'input',
props: {
label: '搜索标题',
type: 'search',
},
modelOptions: {
updateOn: 'submit',
},
},
];
currentPage?: IPage;
langs = environment.langs;
currentPage?: IPage;
builder = inject(BuilderState);
cd = inject(ChangeDetectorRef);
util = inject(UtilitiesService);
Expand All @@ -71,12 +58,54 @@ export class PageListComponent extends BaseComponent implements OnInit {
private destroyRef = inject(DestroyRef);
private tagService = inject(TagsService);
user: IUser;

fields: FormlyFieldConfig[] = [
{
fieldGroupClassName: 'grid grid-cols-12 gap-2',
fieldGroup: [
{
key: 'title',
type: 'input',
className: 'col-span-7',
props: {
label: '搜索标题',
type: 'search',
},
modelOptions: {
updateOn: 'submit',
},
},
{
key: 'langcode',
type: 'select',
className: 'col-span-5',
props: {
label: '语言',
options: [
{
label: '全部',
value: '',
},
...(this.langs
? this.langs.map(lang => {
return {
label: lang.label,
value: lang.langCode,
};
})
: []),
],
},
},
],
},
];
constructor(
@Inject(BUILDER_CURRENT_PAGE) public currentPage$: Observable<IPage>,
@Inject(USER) private user$: Observable<IUser>
) {
super();
this.user$.subscribe(user => {
this.user$.pipe(takeUntilDestroyed()).subscribe(user => {
this.user = user;
});
this.tagService.setTitle('着陆页管理');
Expand All @@ -94,7 +123,7 @@ export class PageListComponent extends BaseComponent implements OnInit {
}
});

this.router.queryParams.subscribe(query => {
this.router.queryParams.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(query => {
const { nid, langcode } = query;
if (nid) {
this.loadPage({
Expand Down Expand Up @@ -148,6 +177,7 @@ export class PageListComponent extends BaseComponent implements OnInit {
},
}
)
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(res => {
this.builder.loading$.next(false);
this.util.openSnackbar(`已更新标题为${textContent}`, 'ok');
Expand Down
3 changes: 3 additions & 0 deletions src/app/uiux/combs/video/video-bg/video-bg.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@if (content) {
<div class="video-bg relative">
@if (content.bg) {
<app-bg [content]="content.bg" />
}
@if (video) {
<app-video [content]="video" />
}
Expand Down
5 changes: 5 additions & 0 deletions src/app/uiux/combs/video/video-bg/video-bg.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
}

:host ::ng-deep {
app-video {
> .video {
position: static;
}
}
.bg-fill-width.overlay {
z-index: 2;
}
Expand Down

0 comments on commit 5bd2b63

Please sign in to comment.