Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.12.8 #62

Merged
merged 7 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
var start = true;
window.eruptSiteConfig = {
domain: "",
fileDomain: "https://oos.erupt.xyz",
fileDomain: "",
title: "Erupt Framework",
desc: "通用后台管理框架",
dialogLogin: false,
copyright: true, //是否保留显示版权信息
// copyrightTxt: () => {
// return "x_x_x";
// },
logoPath: null,
loginLogoPath: null,
logoText: "Erupt",
Expand Down Expand Up @@ -61,14 +64,6 @@ window.eruptSiteConfig = {
};

window.eruptRouterEvent = {
login: {
load() {
console.log("in login page");
},
unload() {
console.log("out login page");
}
},
// $: {
// load(e) {
// // console.log('load', e)
Expand All @@ -77,14 +72,6 @@ window.eruptRouterEvent = {
// // console.log("unload ", e)
// }
// },
EruptDict: {
load(e) {
console.log(e)
},
unload(e) {
console.log("unload ", e)
}
}
}

let eruptEvent = {
Expand Down
22 changes: 22 additions & 0 deletions src/app/build/bi/chart-table/chart-table.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,25 @@
}
}
}

[data-theme='dark'] {
:host {
::ng-deep {
table {
tr {
td, th {
color: #dcdcdc !important;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
line-height: 1;
border: 1px solid #333;
}

&:hover {

}
}
}
}
}
}
10 changes: 5 additions & 5 deletions src/app/build/erupt/view/table/table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<ng-container *ngIf="eruptBuildModel.eruptModel.eruptJson.power.query">
<button nz-button nzType="default" [nzSearch]="true"
class="mb-sm" [nzLoading]="st._loading" id="erupt-btn-query"
class="mb-sm" [nzLoading]="st?._loading" id="erupt-btn-query"
(click)="query()">
<i nz-icon nzType="search" nzTheme="outline"></i>{{'table.query'|translate}}
</button>
Expand All @@ -77,7 +77,7 @@
<ng-template [ngTemplateOutlet]="operationButtons"></ng-template>
</ng-container>
</div>
<div class="condition-btn">
<div class="condition-btn" *ngIf="eruptBuildModel.eruptModel.eruptJson.power.query">
<div>
<button nz-button nzType="default" nz-popover style="padding: 4px 8px"
[(nzPopoverVisible)]="showColCtrl" [nzPopoverContent]="tableColumnCtrl"
Expand All @@ -90,7 +90,7 @@
<div *ngIf="col.title&&col.index" nz-col nzSpan="6">
<label nz-checkbox [(ngModel)]="col['show']"
style="width: 130px;"
(ngModelChange)="st.resetColumns()">{{col.title['text'] | nzEllipsis:6:'...'}}</label>
(ngModelChange)="st?.resetColumns()">{{col.title['text'] | nzEllipsis:6:'...'}}</label>
</div>
</ng-container>
</div>
Expand All @@ -102,7 +102,7 @@
<i nz-icon [nzType]="hideCondition?'caret-down':'caret-up'" nzTheme="outline"></i>
</button>
<button class="mb-sm" nz-button (click)="clearCondition()" id="erupt-btn-reset"
[disabled]="st._loading">
[disabled]="st?._loading">
<i nz-icon nzType="sync" nzTheme="outline"></i>{{'table.reset'|translate}}
</button>
</ng-container>
Expand All @@ -113,7 +113,7 @@
<ng-template [ngTemplateOutlet]="operationButtons"></ng-template>
</div>

<ng-container>
<ng-container *ngIf="eruptBuildModel.eruptModel.eruptJson.power.query">
<nz-card *ngIf="hasSearchFields" [nzBodyStyle]="{padding:'10px'}" class="search-card"
[hidden]="hideCondition">
<erupt-search [searchEruptModel]="searchErupt" (search)="query()" [size]="'default'">
Expand Down
4 changes: 3 additions & 1 deletion src/app/build/erupt/view/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ export class TableComponent implements OnInit {
}

query(page?: number, size?: number, sort?: object) {
if (!this.eruptBuildModel.power.query) {
return;
}
let query = {};
query["condition"] = this.dataHandler.eruptObjectToCondition(
this.dataHandler.searchEruptToObject({
Expand Down Expand Up @@ -812,7 +815,6 @@ export class TableComponent implements OnInit {
this.showTable = true;
this.eruptBuildModel.eruptModel.eruptJson.linkTree.value = event;
this.searchErupt.eruptJson.linkTree.value = event;
console.log(this.dataPage)
this.query(1);
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/core/startup/startup.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class StartupService {
}

async load(): Promise<any> {
console.group(WindowModel.copyright ? "Erupt All rights reserved." : WindowModel.title);
console.group(WindowModel.title);
console.log("%c" +
" __ \n" +
" /\\ \\__ \n" +
Expand All @@ -39,8 +39,8 @@ export class StartupService {
"\\ \\____\\\\ \\_\\ \\ \\____/ \\ \\ ,__/ \\ \\__\\\n" +
" \\/____/ \\/_/ \\/___/ \\ \\ \\/ \\/__/\n" +
" \\ \\_\\ \n" +
" \\/_/ ", "color:#2196f3;font-weight:800");
console.log("%chttps://www.erupt.xyz", "color:#2196f3;font-size:1.3em;padding:16px 0;");
" \\/_/ \n" +
"https://www.erupt.xyz", "color:#2196f3;font-weight:800");
console.groupEnd();
(window as any).eruptWebSuccess = true;
await new Promise<void>((resolve) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout/erupt/erupt.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
height: 44px;
padding: 0 16px;
background: #fff;
border-top: 1px solid #e5e5e5;
//border-top: 1px solid #efffff;
border-bottom: 1px solid #e5e5e5;
//box-shadow: 0 1px 10px rgb(0 0 0 / 20%);
}
Expand Down
9 changes: 7 additions & 2 deletions src/app/layout/passport/passport.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ <h3 style="margin-bottom: 26px;text-align: center">{{'login.account_pwd_login'|t
</div>
</div>
<global-footer *ngIf="copyright">
<i nz-icon nzType="copyright" nzTheme="outline"></i> 2018 - {{nowYear}}
<a href="https://www.erupt.xyz" target="_blank">Erupt Framework</a>&nbsp; All rights reserved.
<ng-container *ngIf="copyrightTxt">
{{copyrightTxt}}
</ng-container>
<ng-container *ngIf="!copyrightTxt">
<i nz-icon nzType="copyright" nzTheme="outline"></i> 2018 - {{nowYear}}
<a href="https://www.erupt.xyz" target="_blank">Erupt Framework</a>&nbsp; All rights reserved.
</ng-container>
</global-footer>
</div>
</div>
9 changes: 9 additions & 0 deletions src/app/layout/passport/passport.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ export class LayoutPassportComponent implements AfterViewInit {

copyright = WindowModel.copyright;

copyrightTxt = WindowModel.copyrightTxt;

constructor(private modalSrv: NzModalService) {
if (WindowModel.copyrightTxt) {
if (typeof (WindowModel.copyrightTxt) === 'function') {
this.copyrightTxt = WindowModel.copyrightTxt();
} else {
this.copyrightTxt = WindowModel.copyrightTxt;
}
}
}

ngAfterViewInit(): void {
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/component/i18n.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export class HeaderI18nComponent {
this.langs.push(lang);
}
}
console.log(this.langs)
}

change(lang: string): void {
Expand Down
8 changes: 4 additions & 4 deletions src/app/shared/model/window.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export class WindowModel {
public static loginLogoPath: string = WindowModel.config["loginLogoPath"] === '' ? null : (WindowModel.config["loginLogoPath"] || WindowModel.logoPath);

public static logoText: string = WindowModel.config["logoText"] || "";
//注册页面地址
public static registerPage: string = WindowModel.config["registerPage"] || undefined;

public static dialogLogin: boolean = WindowModel.config["dialogLogin"] || false;
public static registerPage: string = WindowModel.config["registerPage"] || undefined; //注册页面地址

public static copyright: boolean = WindowModel.config["copyright"] !== false;
public static copyright: boolean = WindowModel.config["copyright"];

public static copyrightTxt: any = WindowModel.config["copyrightTxt"]; //授权文本

public static upload: Function = WindowModel.config["upload"] || false;

Expand Down
3 changes: 2 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<link href="pre.css" rel="stylesheet">
<script src="pre.js"></script>
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#fff">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#E7E9E8">
</head>
<body>
<div class="preloader">
Expand Down