Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
biaogebusy committed Nov 11, 2024
2 parents 7898bbd + 630b5d5 commit 1a123da
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</p>

<p align="center">
<img style="border-radius:10px" src="src/assets/images/mini/xinshi-mini.png" alt="logo" width="80%"/>
<img style="border-radius:10px" src="src/assets/images/mini/xinshi-mini.png" alt="logo" width="70%"/>
</p>

## 相关视频演示
Expand All @@ -77,6 +77,11 @@
- [多语言发布及媒体库管理](https://www.bilibili.com/video/BV1XohfeoEtz/)
- [自定义示例和模板库](https://www.bilibili.com/video/BV1wExPeBEdn)

<p>
<img style="border-radius:10px" src="src/assets/images/mini/wechat-video.jpg" alt="logo" width="160px"/>
<p>微信扫码查看更多视频</p>
</p>

## 对应版本

| Web builder | Angular | Node | TS |
Expand Down
15 changes: 6 additions & 9 deletions src/app/core/service/utilities.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DOCUMENT, formatDate } from '@angular/common';
import { Inject, Injectable } from '@angular/core';
import { Inject, Injectable, inject } from '@angular/core';
import { Clipboard } from '@angular/cdk/clipboard';
import { ScreenService } from './screen.service';
import { CORE_CONFIG } from '@core/token/token-providers';
Expand All @@ -10,14 +10,11 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
providedIn: 'root',
})
export class UtilitiesService {
constructor(
private clipboard: Clipboard,
private snackbar: MatSnackBar,
private screenService: ScreenService,
@Inject(DOCUMENT) private document: Document,
@Inject(CORE_CONFIG) private coreConfig: ICoreConfig
) {}

private clipboard = inject(Clipboard)
private snackbar = inject(MatSnackBar)
private screenService = inject(ScreenService)
private document = inject(DOCUMENT)
private coreConfig = inject(CORE_CONFIG)
getIndexTitle(title: string): string {
return title.substring(0, 1);
}
Expand Down
12 changes: 11 additions & 1 deletion src/app/core/state/BuilderState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,18 @@ export class BuilderState {
}

loadNewPage(page: IPage): void {
const currentPage = { ...page, current: true, time: new Date() }
let somePageIndex = -1;
this.version.forEach(version => (version.current = false));
this.version.unshift({ ...page, current: true, time: new Date() });
somePageIndex = this.version.findIndex(item => {
return item.uuid === page.uuid && item.langcode === page.langcode;
})
if(somePageIndex > -1){
this.version[somePageIndex] = currentPage
}else{
this.version.unshift(currentPage);
}

this.closeRightDrawer$.next(true);
this.saveLocalVersions();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@let content = component?.instance?.content;
<div class="relative overflow-hidden" [ngClass]="content?.containerClasses">
@if (content?.id) {
<a class="anchor" [id]="content.id"></a>
<span class="anchor" [id]="content.id"></span>
}
@if (content?.spacer) {
<app-spacer [size]="content.spacer" />
Expand Down
Binary file added src/assets/images/mini/wechat-video.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/stories/Changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { Meta } from '@storybook/blocks';

# 更新日志

## 9.0.1(2024-11-09)
## 9.0.1(2024-11-11)

- 优化了 builder 边栏菜单 icon 的样式;
- 编辑区中,当 hover 最外层组件时,显示新增布局或者新增基组件的入口,优化用户编辑体验;
- 优化 app 页面 loading 效果;
- 对所有的组件进行了重构,所有组件包括基组件都有是否全屏、间隔、背景色、蒙版、class、ID通用属性;
- 对所有的组件进行了优化重构,复合组件和基组件都有全屏、间隔、背景色、蒙版、class、ID通用属性;
- 添加了eslint,husky,统一了格式化;
- 成功更新页面后,如果页面已存在则更新最新的页面,不会新建记录;

## 9.0.0(2024-10-30)

Expand Down

0 comments on commit 1a123da

Please sign in to comment.