Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
biaogebusy committed Dec 2, 2024
2 parents 02aabe4 + 505aa92 commit ac7f719
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"ang-jsoneditor": "^3.1.1",
"angulartics2": "^13.1.0",
"crypto-js": "^4.1.1",
"dompurify": "^3.1.0",
"dompurify": "3.1.5",
"drupal-jsonapi-params": "^2.3.1",
"echarts": "^5.0.2",
"express": "^4.18.2",
Expand Down
1 change: 1 addition & 0 deletions src/app/core/interface/IDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface IDialog {
title?: string;
inputData: any;
renderInputComponent: any;
closeLabel?: string;
}
22 changes: 20 additions & 2 deletions src/app/core/service/builder.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,27 @@ export class BuilderService extends ApiService {
this.nodeService
.fetch(`/api/v3/landingPage/json/${nid}`, 'noCache=1', '', lang)
.subscribe((page: IPage) => {
console.log(page);
if (Number(changed) < Number(page.changed)) {
this.util.openSnackbar(`当前${title}页面不是最新版本!`, 'ok');
const dialogRef = this.dialog.open(DialogComponent, {
width: '340px',
data: {
title: `当前页面不是最新版本`,
closeLabel: '确认',
inputData: {
content: {
type: 'text',
fullWidth: true,
body: `是否要拉取<strong class="text-primary">[${title}]</strong>最新的更新覆盖当前页面?`,
},
},
},
});

dialogRef.afterClosed().subscribe(result => {
if (result) {
this.builder.loadNewPage(this.formatToExtraData(page));
}
});
}
});
}
Expand Down
4 changes: 3 additions & 1 deletion src/app/uiux/widgets/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ <h2 mat-dialog-title>{{ data.title }}</h2>
</mat-dialog-content>
@if (!data.disableCloseButton) {
<div class="flex !justify-center !items-center" mat-dialog-actions>
<button mat-raised-button color="primary" [mat-dialog-close]="true">关闭</button>
<button mat-raised-button color="primary" [mat-dialog-close]="true">
{{ data.closeLabel ?? '关闭' }}
</button>
</div>
}
</div>
12 changes: 5 additions & 7 deletions src/theme/component/_tour.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
$black100: #f4f4f4;
$white: #ffffff;

$font_family: 'Helvetica Neue', Inter, ui-sans-serif, 'Apple Color Emoji',
Helvetica, Arial, sans-serif;
$font_family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
'微软雅黑', Arial, sans-serif;
$background_color_9: #08c;
$background_color_10: rgba(136, 136, 136, 0.24);

Expand Down Expand Up @@ -249,11 +249,7 @@
text-decoration: none;
font-size: 14px;
color: mat.m2-get-color-from-palette($primary, default-contrast);
@include mat.elevation(
4,
mat.m2-get-color-from-palette($foreground, text),
0.35
);
@include mat.elevation(4, mat.m2-get-color-from-palette($foreground, text), 0.35);
white-space: nowrap;
cursor: pointer;
outline: none;
Expand Down Expand Up @@ -309,6 +305,8 @@

.introjs-prevbutton {
float: left;
background-color: #fff;
color: mat.m2-get-color-from-palette($foreground, text);
}

.introjs-nextbutton {
Expand Down

0 comments on commit ac7f719

Please sign in to comment.