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

docs: unified NG-ALAIN text mark #1677

Merged
merged 6 commits into from
Nov 1, 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
2 changes: 1 addition & 1 deletion .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: build
run: |
yarn run site:build
yarn run site:build:ssr
cp ./src/dist/browser/index.html ./src/dist/browser/404.html
cp ./Dockerfile.docs ./src/dist/browser/Dockerfile.docs
cp -r ./_nginx/ ./src/dist/browser/_nginx
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-build-doc-site.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: docker-build-doc-site

# on: push
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type: Other

## Pull Request

Ng Alain 会关注所有的 pull request,我们会 review 以及合并你的代码,也有可能要求你做一些修改或者告诉你我们为什么不能接受这样的修改。
NG-ALAIN 会关注所有的 pull request,我们会 review 以及合并你的代码,也有可能要求你做一些修改或者告诉你我们为什么不能接受这样的修改。

**在你发送 Pull Request 之前**,请确认你是按照下面的步骤来做的:

Expand Down
3 changes: 2 additions & 1 deletion docs/server.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ Work in the form of the Restful API with the server application of any technolog
In NG-ALAIN, a complete front-end UI interaction to the server-side processing flow looks like this:

1. Start Angular for the first time to execute `APP_INITIALIZER`;
- Usually some APP general data is loaded before startup, such as currently authorized user data, menu data, dictionary data, configuration data, etc.
2. UI component interaction;
3. Send the request using the encapsulated [_HttpClient](/theme/http);
4. Trigger the user authentication interceptor [@delon/auth](/auth/getting-started) and add the `token` parameter uniformly;
- If there is no `token` or an expired interrupt subsequent request, jump directly to the login page;
- If there is no `token` or an expired interrupt subsequent request, jump directly to the login page;
5. Trigger the default interceptor to process the prefix and other information;
6. Get the server back;
7. Trigger the default interceptor to handle request exceptions, business exceptions, etc.
Expand Down
1 change: 1 addition & 0 deletions docs/server.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NG-ALAIN 是一套基于 Angular 技术栈的单页面应用,我们提供的
在 NG-ALAIN 中,一个完整的前端 UI 交互到服务端处理流程是这样的:

1. 首次启动 Angular 执行 `APP_INITIALIZER`;
- 通常会在启动前先加载一些APP通用数据,例如:当前已授权用户数据、菜单数据、字典数据、配置项等
2. UI 组件交互操作;
3. 使用封装的 [_HttpClient](/theme/http) 发送请求;
4. 触发用户认证拦截器 [@delon/auth](/auth/getting-started),统一加入 `token` 参数;
Expand Down
2 changes: 1 addition & 1 deletion schematics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Angular CLI Schematics of ng-alain.

# ng-alain

[Ng-zorro-antd](https://github.com/NG-ZORRO/ng-zorro-antd) admin panel front-end framework.
[NG-ZORRO](https://github.com/NG-ZORRO/ng-zorro-antd) admin panel front-end framework.

## Links

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export class StartupService {
}
<% } else { %>
private viaHttp(): Observable<void> {
// If http request allows anonymous access, you need to add `ALLOW_ANONYMOUS`:
// this.httpClient.get('assets/tmp/app-data.json', { context: new HttpContext().set(ALLOW_ANONYMOUS, true) })
return this.httpClient.get('assets/tmp/app-data.json').pipe(
catchError((res: NzSafeAny) => {
console.warn(`StartupService.load: Network request failed`, res);
Expand Down Expand Up @@ -103,8 +105,8 @@ export class StartupService {
// }
// mock
const app: any = {
name: `ng-alain`,
description: `Ng-zorro admin panel front-end framework`
name: `NG-ALAIN`,
description: `NG-ZORRO admin panel front-end framework`
};
const user: any = {
name: 'Admin',
Expand Down
2 changes: 1 addition & 1 deletion schematics/application/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainShell",
"title": "Ng Alain Shell Options Schema",
"title": "NG-ALAIN Shell Options Schema",
"type": "object",
"properties": {
"codeStyle": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/curd/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainCURDComponent",
"title": "Ng Alain CURD Component Options Schema",
"title": "NG-ALAIN CURD Component Options Schema",
"type": "object",
"properties": {
"path": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/edit/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainEditComponent",
"title": "Ng Alain Edit Component Options Schema",
"title": "NG-ALAIN Edit Component Options Schema",
"type": "object",
"additionalProperties": true,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/empty/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainEmptyComponent",
"title": "Ng Alain Empty Component Options Schema",
"title": "NG-ALAIN Empty Component Options Schema",
"type": "object",
"additionalProperties": true,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/list/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainListComponent",
"title": "Ng Alain List Component Options Schema",
"title": "NG-ALAIN List Component Options Schema",
"type": "object",
"additionalProperties": true,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/module/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainModule",
"title": "Ng Alain Module Options Schema",
"title": "NG-ALAIN Module Options Schema",
"type": "object",
"properties": {
"name": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/sta/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainSTAComponent",
"title": "Ng Alain Swagger To API Options Schema",
"title": "NG-ALAIN Swagger To API Options Schema",
"type": "object",
"additionalProperties": true,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/tpl/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainTplComponent",
"title": "Ng Alain Tpl Options Schema",
"title": "NG-ALAIN Tpl Options Schema",
"type": "object",
"additionalProperties": true,
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schematics/view/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsNgAlainViewComponent",
"title": "Ng Alain View Component Options Schema",
"title": "NG-ALAIN View Component Options Schema",
"type": "object",
"additionalProperties": true,
"properties": {
Expand Down
7 changes: 5 additions & 2 deletions src/app/core/meta.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ export class MetaService {
}

getPathByUrl(url: string): any {
url = url.split('=')[0].split('?')[0];
url = url
.split('=')[0]
.split('?')[0]
.replace(/\/(en|zh)$/, '/');
let ret: any;
(this._menus || []).forEach((cat: any) => {
if (ret) return;
ret = cat.list.find((i: any) => i.url === url);
ret = cat.list.find((i: { url: string }) => i.url.startsWith(url));
});
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/startup.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class StartupService {
if (slowEl) {
slowEl.remove();
}
this.injector.get(TitleService).suffix = 'Ng Alain';
this.injector.get(TitleService).suffix = 'NG-ALAIN';
if (this.platform.isBrowser) {
setTimeout(() => this.lazyLoad(), 100);
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="utf-8">
<title>Ng Alain - 一个基于 Antd 中后台前端解决方案</title>
<title>NG-ALAIN - 一个基于 Antd 中后台前端解决方案</title>
<base href="/">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="preconnect" href="https://gw.alipayobjects.com" crossorigin="anonymous">
Expand Down