Skip to content

Commit

Permalink
Merge branch 'main' into web
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed Feb 7, 2023
2 parents a72ec1c + e97c169 commit d9a67ba
Show file tree
Hide file tree
Showing 10 changed files with 1,195 additions and 1,751 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
"start": "npm-run-all -p start:web electron:dev",
"start:web": "yarn workspace postcat-web run start",
"start:electron": "npm-run-all -p web:start:direct electron:dev",
"build": "npx patch-package && npm-run-all -s build:web clear:electron:tsc electron:tsc && electron-builder build",
"build": "npx patch-package && npm-run-all -s electron:build:web clear:electron:tsc electron:tsc && electron-builder build",
"build:web": "yarn workspace postcat-web run build:web",
"build:static": "npm run clear:electron:tsc&&npm run electron:tsc && electron-builder build",
"build:web": "yarn workspace postcat-web run build",
"electron:build:web": "yarn workspace postcat-web run build",
"electron:static": "npm run electron:tsc && electron .",
"release": "npm-run-all -s build:web electron:tsc && electron-builder --publish=always && node upload.js",
"release:m1": "npm-run-all -s build:web electron:tsc && electron-builder -m=dmg --arm64 -p onTagOrDraft && node upload.js",
Expand Down
120 changes: 65 additions & 55 deletions src/workbench/browser/locale/messages.xlf

Large diffs are not rendered by default.

106 changes: 74 additions & 32 deletions src/workbench/browser/locale/messages.zh.xlf

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions src/workbench/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,42 @@
},
"dependencies": {
"@angular-cli/base-href-webpack": "1.0.16",
"@angular/animations": "14.2.0",
"@angular/common": "14.2.0",
"@angular/compiler": "14.2.0",
"@angular/core": "14.2.0",
"@angular/forms": "14.2.0",
"@angular/language-service": "14.2.0",
"@angular/platform-browser": "14.2.0",
"@angular/platform-browser-dynamic": "14.2.0",
"@angular/router": "14.2.0",
"@angular/upgrade": "^14.2.0",
"@angular/animations": "15.1.3",
"@angular/common": "15.1.3",
"@angular/compiler": "15.1.3",
"@angular/core": "15.1.3",
"@angular/forms": "15.1.3",
"@angular/language-service": "15.1.3",
"@angular/platform-browser": "15.1.3",
"@angular/platform-browser-dynamic": "15.1.3",
"@angular/router": "15.1.3",
"@angular/upgrade": "^15.1.3",
"@micro-zoe/micro-app": "1.0.0-alpha.10",
"@xmagic/ngx-wujie": "1.0.0-rc.20",
"ajv": "8.12.0",
"color": "^4.2.3",
"core-js": "3.27.2",
"eo-ng-auto-complete": "0.1.0",
"eo-ng-button": "0.1.2",
"eo-ng-checkbox": "0.1.0",
"eo-ng-dropdown": "0.1.0",
"eo-ng-feedback": "0.1.1",
"eo-ng-input": "0.1.0",
"eo-ng-layout": "0.1.0",
"eo-ng-menu": "0.1.0",
"eo-ng-radio": "0.1.0",
"eo-ng-select": "0.1.0",
"eo-ng-switch": "0.1.0",
"eo-ng-table": "0.1.2",
"eo-ng-tabs": "0.1.1",
"eo-ng-tree": "0.1.0",
"eo-ng-auto-complete": "0.1.5",
"eo-ng-button": "0.1.5",
"eo-ng-checkbox": "0.1.5",
"eo-ng-dropdown": "0.1.5",
"eo-ng-feedback": "0.1.5",
"eo-ng-input": "0.1.5",
"eo-ng-layout": "0.1.5",
"eo-ng-menu": "0.1.5",
"eo-ng-radio": "0.1.5",
"eo-ng-select": "0.1.5",
"eo-ng-switch": "0.1.5",
"eo-ng-table": "0.1.5",
"eo-ng-tabs": "0.1.5",
"eo-ng-tree": "0.1.5",
"is-xml": "0.1.0",
"js-beautify": "1.14.7",
"lodash-es": "4.17.21",
"markdown-it": "13.0.1",
"mobx": "6.7.0",
"monaco-editor": "0.33.0",
"ng-zorro-antd": "14.2.0",
"ng-zorro-antd": "15.0.3",
"omit-deep-lodash": "1.1.7",
"qs": "6.11.0",
"rxjs": "7.8.0",
Expand All @@ -69,16 +69,16 @@
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-builders/custom-webpack": "14.1.0",
"@angular-devkit/build-angular": "14.2.0",
"@angular-eslint/builder": "14.2.0",
"@angular-eslint/eslint-plugin": "14.2.0",
"@angular-eslint/eslint-plugin-template": "14.2.0",
"@angular-eslint/schematics": "14.2.0",
"@angular-eslint/template-parser": "14.2.0",
"@angular/cli": "14.2.0",
"@angular/compiler-cli": "14.2.0",
"@angular/localize": "14.2.0",
"@angular-builders/custom-webpack": "15.0.0",
"@angular-devkit/build-angular": "15.1.4",
"@angular-eslint/builder": "15.2.0",
"@angular-eslint/eslint-plugin": "15.2.0",
"@angular-eslint/eslint-plugin-template": "15.2.0",
"@angular-eslint/schematics": "15.2.0",
"@angular-eslint/template-parser": "15.2.0",
"@angular/cli": "15.1.4",
"@angular/compiler-cli": "15.1.3",
"@angular/localize": "15.1.3",
"@ngx-translate/core": "14.0.0",
"@ngx-translate/http-loader": "7.0.0",
"@types/color": "3.0.3",
Expand All @@ -88,8 +88,8 @@
"@types/markdown-it": "12.2.3",
"@types/node": "18.11.18",
"@types/omit-deep-lodash": "1.1.1",
"@typescript-eslint/eslint-plugin": "5.49.0",
"@typescript-eslint/parser": "5.49.0",
"@typescript-eslint/eslint-plugin": "5.50.0",
"@typescript-eslint/parser": "5.50.0",
"autoprefixer": "10.4.13",
"conventional-changelog-cli": "2.2.2",
"dexie": "^4.0.1-alpha.7",
Expand All @@ -103,7 +103,7 @@
"npm-run-all": "4.1.5",
"tailwindcss": "3.2.4",
"ts-node": "10.9.1",
"typescript": "~4.9.4",
"typescript": "~4.9.5",
"webpack": "5.75.0",
"webpack-bundle-analyzer": "4.7.0"
},
Expand Down
23 changes: 18 additions & 5 deletions src/workbench/browser/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { WarningFill } from '@ant-design/icons-angular/icons';
import { EoNgFeedbackTooltipModule, EoNgFeedbackMessageModule } from 'eo-ng-feedback';
import { LanguageService } from 'eo/workbench/browser/src/app/core/services/language/language.service';
import { NotificationService } from 'eo/workbench/browser/src/app/core/services/notification.service';
import { ExtensionService } from 'eo/workbench/browser/src/app/shared/services/extensions/extension.service';
import { GlobalProvider } from 'eo/workbench/browser/src/app/shared/services/globalProvider';
import { IndexedDBStorage } from 'eo/workbench/browser/src/app/shared/services/storage/IndexedDB/lib/';
Expand Down Expand Up @@ -83,22 +84,34 @@ export class AppModule {
private mockService: MockService,
private global: GlobalProvider,
private theme: ThemeService,
private extensionService: ExtensionService
private extensionService: ExtensionService,
private notification: NotificationService
) {
this.init();
this.mockService.init();
this.global.injectGlobalData();
}
async init() {
//* Init language
if (APP_CONFIG.production) {
this.lang.init();
}
}
async init() {

//* Init theme
const promiseSystem = this.theme.initTheme();
//* Init Extension
await this.extensionService.init();
this.theme.queryExtensionThemes();
//*Reset theme after theme/extension theme loading
Promise.all([promiseSystem]).then(() => {
this.theme.afterAllThemeLoad();
this.theme.watchInstalledExtensionsChange();
});

//* Init local mock server
this.mockService.init();
//* Inject extension global data
this.global.injectGlobalData();

//* Init notification
this.notification.init();
}
}
2 changes: 1 addition & 1 deletion src/workbench/browser/src/app/core/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { NgModule } from '@angular/core';

@NgModule({
declarations: [],
imports: [CommonModule],
imports: [CommonModule]
})
export class CoreModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Injectable } from '@angular/core';
import { ModalService } from 'eo/workbench/browser/src/app/shared/services/modal.service';
import StorageUtil from 'eo/workbench/browser/src/app/utils/storage/storage.utils';

@Injectable({
providedIn: 'root'
})
export class NotificationService {
constructor(private modal: ModalService) {}
init() {
const hasShow = StorageUtil.get('notification_has_show');
if (hasShow) return;

const logInfo = {
startTime: new Date('2023-02-07 16:00:00'),
endTime: new Date('2023-02-07 18:00:00')
};
const currentData = new Date();

//Curent data is greater than end time
if (currentData.getTime() > logInfo.endTime.getTime()) {
return;
}

this.modal.create({
nzTitle: $localize`Release Notes`,
nzContent: $localize`There will be downtime updates from ${logInfo.startTime.getHours()}\:00 to ${logInfo.endTime.getHours()}\:00 today, and may be temporarily inaccessible.`
});
StorageUtil.set('notification_has_show', true, 60 * 60 * 24);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const createStorage = ({ prefixKey = '', storage = localStorage } = {}) =
* @description 设置缓存
* @param {string} key 缓存键
* @param {*} value 缓存值
* @param expire
* @param expire unit second
*/
set(key: string, value: any, expire: number | null = DEFAULT_CACHE_TIME) {
const stringData = JSON.stringify({
Expand Down
24 changes: 12 additions & 12 deletions src/workbench/browser/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
@import './styles/atom';
@import '../../../node_modules/eo-ng-checkbox/styles';
@import '../../../node_modules/eo-ng-select/styles';
@import '../../../node_modules/eo-ng-button/styles';
@import '../../../node_modules/eo-ng-radio/styles';
@import '../../../node_modules/eo-ng-input/styles';
@import '../../../node_modules/eo-ng-auto-complete/styles';
@import '../../../node_modules/eo-ng-tabs/styles';
@import '../../../node_modules/eo-ng-tree/styles';
@import '../../../node_modules/eo-ng-table/styles';
@import '../../../node_modules/eo-ng-layout/styles';
@import '../../../node_modules/eo-ng-feedback/styles';
@import '../../../node_modules/eo-ng-dropdown/styles';
@import '../../../../node_modules/eo-ng-checkbox/styles';
@import '../../../../node_modules/eo-ng-select/styles';
@import '../../../../node_modules/eo-ng-button/styles';
@import '../../../../node_modules/eo-ng-radio/styles';
@import '../../../../node_modules/eo-ng-input/styles';
@import '../../../../node_modules/eo-ng-auto-complete/styles';
@import '../../../../node_modules/eo-ng-tabs/styles';
@import '../../../../node_modules/eo-ng-tree/styles';
@import '../../../../node_modules/eo-ng-table/styles';
@import '../../../../node_modules/eo-ng-layout/styles';
@import '../../../../node_modules/eo-ng-feedback/styles';
@import '../../../../node_modules/eo-ng-dropdown/styles';

html,
body {
Expand Down
Loading

1 comment on commit d9a67ba

@vercel
Copy link

@vercel vercel bot commented on d9a67ba Feb 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.