From d3b23682d742cd2c0d4c4556326c5284b178670a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 16:26:54 +0300 Subject: [PATCH 01/67] create card component --- .../components/card/card-body.component.ts | 7 +++++ .../components/card/card-title.component.ts | 7 +++++ .../src/lib/components/card/card.component.ts | 27 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts new file mode 100644 index 0000000000..fc540e0002 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts @@ -0,0 +1,7 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'abp-card-body', + template: ``, +}) +export class CardBodyComponent {} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts new file mode 100644 index 0000000000..b40e5b1767 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts @@ -0,0 +1,7 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'abp-card-title', + template: ``, +}) +export class CardTitleComponent {} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts new file mode 100644 index 0000000000..9a97fa33b2 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts @@ -0,0 +1,27 @@ +import { Component, ContentChild, Input } from '@angular/core'; +import { CardBodyComponent } from './card-body.component'; +import { CardTitleComponent } from './card-title.component'; + +@Component({ + selector: 'abp-card', + template: ` +
+
+ +
+
+ +
+
`, +}) +export class CardComponent { + @Input() class:string + + @Input() style:string + + @ContentChild(CardBodyComponent) + cardBodyTemplate?: CardBodyComponent; + + @ContentChild(CardTitleComponent) + cardTitleTemplate?: CardTitleComponent; +} From bb9f29a5a7ca341dc5ebc5be7c49bdf708d01c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 16:27:52 +0300 Subject: [PATCH 02/67] import card component to theme-shared module --- .../theme-shared/src/lib/components/index.ts | 3 +++ .../theme-shared/src/lib/theme-shared.module.ts | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts index 810d5a991a..09ae029a7e 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts @@ -11,3 +11,6 @@ export * from './modal/modal.component'; export * from './toast-container/toast-container.component'; export * from './toast/toast.component'; export * from './password/password.component'; +export * from './card/card.component'; +export * from './card/card-title.component'; +export * from './card/card-body.component'; \ No newline at end of file diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index fd9a0cd236..492cff0aa8 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -36,6 +36,9 @@ import { HTTP_ERROR_CONFIG, httpErrorConfigFactory } from './tokens/http-error.t import { DateParserFormatter } from './utils/date-parser-formatter'; import { CONFIRMATION_ICONS, DEFAULT_CONFIRMATION_ICONS } from './tokens/confirmation-icons.token'; import { PasswordComponent } from './components/password/password.component'; +import { CardComponent } from './components/card/card.component'; +import { CardTitleComponent } from './components/card/card-title.component'; +import { CardBodyComponent } from './components/card/card-body.component'; const declarationsWithExports = [ BreadcrumbComponent, @@ -52,6 +55,9 @@ const declarationsWithExports = [ NgxDatatableListDirective, LoadingDirective, ModalCloseDirective, + CardComponent, + CardTitleComponent, + CardBodyComponent, ]; @NgModule({ @@ -62,11 +68,14 @@ const declarationsWithExports = [ NgbPaginationModule, EllipsisModule, ], - declarations: [...declarationsWithExports, HttpErrorWrapperComponent], + declarations: [ + ...declarationsWithExports, + HttpErrorWrapperComponent, + ], exports: [NgxDatatableModule, EllipsisModule, NgxValidateCoreModule, ...declarationsWithExports], providers: [DatePipe], }) -export class BaseThemeSharedModule {} +export class BaseThemeSharedModule { } @NgModule({ imports: [BaseThemeSharedModule], From efc71e3ec7868e3c6ddc453ab4f53b5ec2869e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 16:31:56 +0300 Subject: [PATCH 03/67] use abp-card component instead of card class --- .../dev-app/src/app/home/home.component.html | 156 ++++++------------ 1 file changed, 54 insertions(+), 102 deletions(-) diff --git a/npm/ng-packs/apps/dev-app/src/app/home/home.component.html b/npm/ng-packs/apps/dev-app/src/app/home/home.component.html index 2d249da3d8..ae646f2b6b 100644 --- a/npm/ng-packs/apps/dev-app/src/app/home/home.component.html +++ b/npm/ng-packs/apps/dev-app/src/app/home/home.component.html @@ -10,15 +10,8 @@

{{ '::LongWelcomeMessage' | abpLocalization }}

- + {{ 'AbpAccount::Login' | abpLocalization }} @@ -26,11 +19,11 @@

Let's improve your application!

Here are some links to help you get started:

-
-
+ + +
- + "> - + "> - + ">
- + ">

- - + + "> - + style="width: 72px; height: 28px; border: none; display: inline-block">

- + "> - + ">
-
-
+ +

Meet the ABP Commercial

A Complete Web Application Platform Built on the ABP Framework

- -
-
+ +

ABP Commercial is a platform based on the open source ABP framework. It provides pre-built application modules, rapid @@ -199,8 +174,7 @@

- + "> - + "> - + "> - + "> - + "> - + ">
-
-
+ + +

- Abp Framework - Abp Commercial - abpframework + Abp Framework + Abp Commercial + abpframework

@@ -295,17 +256,9 @@ {{ context.title }}

- - {{ link.label }} + + {{ link.label + }} @@ -316,9 +269,8 @@
- Details + Details
@@ -338,4 +290,4 @@ border-left: 0 !important; } } - + \ No newline at end of file From a9651a14910dd98232323617fb5526dd8e035d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:38:33 +0300 Subject: [PATCH 04/67] lint html --- npm/ng-packs/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index e45e1d255c..72c8ffd062 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -131,8 +131,8 @@ }, "dependencies": {}, "lint-staged": { - "**/*.{js,jsx,ts,tsx}": [ + "**/*.{js,jsx,ts,tsx,html,css,scss}": [ "npx prettier --write --config .prettierrc " ] } -} +} \ No newline at end of file From bbd2ad99f3e3be857507f3a0d70333e04b4b7e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:59:10 +0300 Subject: [PATCH 05/67] move card components to card module --- .../components/card/card-body.component.ts | 4 +++- .../components/card/card-title.component.ts | 4 +++- .../src/lib/components/card/card.component.ts | 17 ++++++----------- .../src/lib/components/card/card.module.ts | 14 ++++++++++++++ .../src/lib/theme-shared.module.ts | 19 +++++++++---------- 5 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/components/card/card.module.ts diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts index fc540e0002..b7efd90236 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-body.component.ts @@ -2,6 +2,8 @@ import { Component } from '@angular/core'; @Component({ selector: 'abp-card-body', - template: ``, + template: `
+ +
`, }) export class CardBodyComponent {} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts index b40e5b1767..f629636854 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card-title.component.ts @@ -2,6 +2,8 @@ import { Component } from '@angular/core'; @Component({ selector: 'abp-card-title', - template: ``, + template: `
+ +
`, }) export class CardTitleComponent {} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts index 9a97fa33b2..317e5800b9 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.component.ts @@ -4,20 +4,15 @@ import { CardTitleComponent } from './card-title.component'; @Component({ selector: 'abp-card', - template: ` -
-
- -
-
- -
-
`, + template: `
+ + +
`, }) export class CardComponent { - @Input() class:string + @Input() cardClass: string; - @Input() style:string + @Input() cardStyle: string; @ContentChild(CardBodyComponent) cardBodyTemplate?: CardBodyComponent; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.module.ts new file mode 100644 index 0000000000..d8050a40cd --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/card.module.ts @@ -0,0 +1,14 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { CardBodyComponent } from './card-body.component'; +import { CardTitleComponent } from './card-title.component'; +import { CardComponent } from './card.component'; + +const declarationsWithExports = [CardComponent, CardBodyComponent, CardTitleComponent]; + +@NgModule({ + declarations: [...declarationsWithExports], + imports: [CommonModule], + exports: [...declarationsWithExports], +}) +export class CardModule {} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 492cff0aa8..58f93b1bda 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -36,9 +36,7 @@ import { HTTP_ERROR_CONFIG, httpErrorConfigFactory } from './tokens/http-error.t import { DateParserFormatter } from './utils/date-parser-formatter'; import { CONFIRMATION_ICONS, DEFAULT_CONFIRMATION_ICONS } from './tokens/confirmation-icons.token'; import { PasswordComponent } from './components/password/password.component'; -import { CardComponent } from './components/card/card.component'; -import { CardTitleComponent } from './components/card/card-title.component'; -import { CardBodyComponent } from './components/card/card-body.component'; +import { CardModule } from './components/card/card.module'; const declarationsWithExports = [ BreadcrumbComponent, @@ -55,9 +53,6 @@ const declarationsWithExports = [ NgxDatatableListDirective, LoadingDirective, ModalCloseDirective, - CardComponent, - CardTitleComponent, - CardBodyComponent, ]; @NgModule({ @@ -67,15 +62,19 @@ const declarationsWithExports = [ NgxValidateCoreModule, NgbPaginationModule, EllipsisModule, + CardModule, ], - declarations: [ + declarations: [...declarationsWithExports, HttpErrorWrapperComponent], + exports: [ + NgxDatatableModule, + EllipsisModule, + NgxValidateCoreModule, ...declarationsWithExports, - HttpErrorWrapperComponent, + CardModule, ], - exports: [NgxDatatableModule, EllipsisModule, NgxValidateCoreModule, ...declarationsWithExports], providers: [DatePipe], }) -export class BaseThemeSharedModule { } +export class BaseThemeSharedModule {} @NgModule({ imports: [BaseThemeSharedModule], From b486e2619d3b25919536a7b344e7efb66e78b2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 18:00:09 +0300 Subject: [PATCH 06/67] use cardClass --- .../dev-app/src/app/home/home.component.html | 144 ++++++++++++------ 1 file changed, 96 insertions(+), 48 deletions(-) diff --git a/npm/ng-packs/apps/dev-app/src/app/home/home.component.html b/npm/ng-packs/apps/dev-app/src/app/home/home.component.html index ae646f2b6b..7024ab69e5 100644 --- a/npm/ng-packs/apps/dev-app/src/app/home/home.component.html +++ b/npm/ng-packs/apps/dev-app/src/app/home/home.component.html @@ -10,8 +10,15 @@

{{ '::LongWelcomeMessage' | abpLocalization }}

- + {{ 'AbpAccount::Login' | abpLocalization }} @@ -19,11 +26,11 @@

Let's improve your application!

Here are some links to help you get started:

- - +
- + " + > - + " + > - + " + >
- + " + >

- - + + " + > - + style="width: 72px; height: 28px; border: none; display: inline-block" + >

- + " + > - + " + >
@@ -165,7 +189,7 @@

Meet the ABP Commercial

A Complete Web Application Platform Built on the ABP Framework

- +

ABP Commercial is a platform based @@ -174,7 +198,8 @@

- + " + > - + " + > - + " + > - + " + > - + " + > - + " + >
- + @@ -256,9 +295,17 @@ {{ context.title }}

- - {{ link.label - }} + + {{ link.label }} @@ -269,8 +316,9 @@
- Details + Details
@@ -290,4 +338,4 @@ border-left: 0 !important; } } - \ No newline at end of file + From 9c7efc346cc21046e989317e0f385d51538c2fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 18:12:32 +0300 Subject: [PATCH 07/67] export card module --- .../packages/theme-shared/src/lib/components/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts index 09ae029a7e..095af5ef26 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts @@ -11,6 +11,4 @@ export * from './modal/modal.component'; export * from './toast-container/toast-container.component'; export * from './toast/toast.component'; export * from './password/password.component'; -export * from './card/card.component'; -export * from './card/card-title.component'; -export * from './card/card-body.component'; \ No newline at end of file +export * from './card/index'; From de5a33026e8981efe22060520564583ee8465141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Thu, 2 Feb 2023 18:13:28 +0300 Subject: [PATCH 08/67] export card components from input --- .../packages/theme-shared/src/lib/components/card/index.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/components/card/index.ts diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/card/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/card/index.ts new file mode 100644 index 0000000000..8d6bbd86d8 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/card/index.ts @@ -0,0 +1,4 @@ +export * from './card.module'; +export * from './card.component'; +export * from './card-body.component'; +export * from './card-title.component'; From 9c2b4dbb67f24699f334b9101a9ac96939dffbd5 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Mon, 6 Feb 2023 16:07:40 +0300 Subject: [PATCH 09/67] Update Basic-Theme documentation --- docs/en/UI/Blazor/Basic-Theme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/UI/Blazor/Basic-Theme.md b/docs/en/UI/Blazor/Basic-Theme.md index 4060f097ba..e4124d9a2c 100644 --- a/docs/en/UI/Blazor/Basic-Theme.md +++ b/docs/en/UI/Blazor/Basic-Theme.md @@ -85,6 +85,27 @@ You can simply override the styles in the Global Styles file of your application See the [Customization / Overriding Components](Customization-Overriding-Components.md) to learn how you can replace components, customize and extend the user interface. +### Overriding the Menu Item +Basic theme supports overriding a single menu item with a custom component. You can create a custom component and call `UseComponent` extension method of Basic Theme in the **MenuContributor**. + +```csharp +using Volo.Abp.AspNetCore.Components.Web.BasicTheme.Navigation; + +//... + +context.Menu.Items.Add( + new ApplicationMenuItem("Custom.1", "My Custom Menu", "#") + .UseComponent(typeof(MyMenuItemComponent))); +``` + +```html + +``` + ### Copy & Customize You can run the following [ABP CLI](../../CLI.md) command in **Blazor{{if UI == "Blazor"}}WebAssembly{{else}} Server{{end}}** project directory to copy the source code to your solution: From b4f007c59d99daa3bb148fe5ffa8f18de48bfd45 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Tue, 7 Feb 2023 09:33:48 +0300 Subject: [PATCH 10/67] Fix mistaken check from #15611 --- .../Themes/Basic/FirstLevelNavMenuItem.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor index b3ecb41862..1f469a809a 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor @@ -13,7 +13,7 @@ { } - else if (url != null) + else if (MenuItem.Url != null) { From d8ec85868c5852633d64ba7b6a2e90ec6317e627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:21:43 +0300 Subject: [PATCH 51/67] give checkbox default class --- .../src/lib/components/checkbox/checkbox.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts index 26d73f16b6..1e7e1ab972 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts @@ -7,7 +7,6 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; template: `
(); @Output() onFocus = new EventEmitter(); From 0f91fb664acb756beb7688b81c1bb7ae6ace4678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:24:08 +0300 Subject: [PATCH 52/67] add checkbox labelClass input --- .../src/lib/components/checkbox/checkbox.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts index 1e7e1ab972..3ead2f929d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts @@ -16,7 +16,7 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; (blur)="onBlur.next()" (focus)="onFocus.next()" > - +
`, providers: [ @@ -30,13 +30,14 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; export class FormCheckboxComponent extends AbstractNgModelComponent { @Input() label?: string; + @Input() labelClass = 'form-check-label'; @Input() checkboxId!: string; @Input() checkboxStyle = ''; @Input() checkboxClass = 'form-check-input'; @Input() checkboxReadonly = false; @Output() onBlur = new EventEmitter(); @Output() onFocus = new EventEmitter(); - + constructor(injector: Injector) { super(injector); } From 4cede4eb5cddbc2447e9a35833a5bdebb58c90e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:26:59 +0300 Subject: [PATCH 53/67] add default form-control class --- .../src/lib/components/form-input/form-input.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts index fc306288e2..01ce27dec5 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts @@ -6,9 +6,8 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; selector: 'abp-form-input', template: `
- + (); @Output() onFocus = new EventEmitter(); From 0b38c50fd6ed289f9342b6fc883187f0d91a0a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:27:36 +0300 Subject: [PATCH 54/67] add default form-label class --- .../src/lib/components/form-input/form-input.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts index 01ce27dec5..d7f1f48c9d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts @@ -31,7 +31,7 @@ export class FormInputComponent extends AbstractNgModelComponent { @Input() inputId!: string; @Input() inputReadonly: boolean = false; @Input() label: string = ''; - @Input() labelClass: string = ''; + @Input() labelClass = 'form-label'; @Input() inputPlaceholder: string = ''; @Input() inputType: string = 'text'; @Input() inputStyle: string = ''; From 6ec46d58dd1c04530f380f70a24911fd748e3eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?= Date: Tue, 21 Feb 2023 10:57:23 +0300 Subject: [PATCH 55/67] fix blog menu item --- .../BloggingAdminMenuContributor.cs | 4 ++-- .../Navigation/BloggingAdminMenuNames.cs | 8 ++++++++ .../Pages/Blogging/Admin/Blogs/Index.cshtml | 13 +++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) rename modules/blogging/src/Volo.Blogging.Admin.Web/{ => Navigation}/BloggingAdminMenuContributor.cs (77%) create mode 100644 modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuNames.cs diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuContributor.cs similarity index 77% rename from modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs rename to modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuContributor.cs index 93fe6c60d7..5ecbd864f9 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminMenuContributor.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuContributor.cs @@ -19,9 +19,9 @@ namespace Volo.Blogging.Admin { var l = context.GetLocalizer(); - var managementRootMenuItem = new ApplicationMenuItem("BlogManagement", l["Menu:BlogManagement"]).RequirePermissions(BloggingPermissions.Blogs.Management); + var managementRootMenuItem = new ApplicationMenuItem(BloggingAdminMenuNames.GroupName, l["Menu:BlogManagement"]).RequirePermissions(BloggingPermissions.Blogs.Management); - managementRootMenuItem.AddItem(new ApplicationMenuItem("BlogManagement.Blogs", l["Menu:Blogs"], "~/Blogging/Admin/Blogs").RequirePermissions(BloggingPermissions.Blogs.Management)); + managementRootMenuItem.AddItem(new ApplicationMenuItem(BloggingAdminMenuNames.Blogs, l["Menu:Blogs"], "~/Blogging/Admin/Blogs").RequirePermissions(BloggingPermissions.Blogs.Management)); context.Menu.GetAdministration().AddItem(managementRootMenuItem); diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuNames.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuNames.cs new file mode 100644 index 0000000000..6c872fa536 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Navigation/BloggingAdminMenuNames.cs @@ -0,0 +1,8 @@ +namespace Volo.Blogging.Admin; + +public class BloggingAdminMenuNames +{ + public const string GroupName = "BlogManagement"; + + public const string Blogs = GroupName + ".Blogs"; +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml index 9cda27c462..702394dcdb 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml @@ -4,6 +4,13 @@ @using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs @using Volo.Blogging @using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Alert +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Button +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Card +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table +@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers +@using Volo.Abp.AspNetCore.Mvc.UI.Layout @using Volo.Blogging.Localization @inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage @model IndexModel @@ -12,6 +19,12 @@ @{ ViewBag.PageTitle = "Blogs"; } +@inject IPageLayout PageLayout +@{ + PageLayout.Content.Title = L["Blogs"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:Blogs"].Value); + PageLayout.Content.MenuItemName = BloggingAdminMenuNames.Blogs; +} @section scripts { From eda2af56c63166c4a4eae8999a0fbb289962f9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?= Date: Tue, 21 Feb 2023 11:05:24 +0300 Subject: [PATCH 56/67] Update Index.cshtml --- .../Pages/Blogging/Admin/Blogs/Index.cshtml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml index 702394dcdb..29d42be4db 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml @@ -22,7 +22,6 @@ @inject IPageLayout PageLayout @{ PageLayout.Content.Title = L["Blogs"].Value; - PageLayout.Content.BreadCrumb.Add(L["Menu:Blogs"].Value); PageLayout.Content.MenuItemName = BloggingAdminMenuNames.Blogs; } From c89c528550933342a4993a4f2955abda111a6abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?= Date: Tue, 21 Feb 2023 16:11:13 +0300 Subject: [PATCH 57/67] Update en.json --- .../AbpIoLocalization/Base/Localization/Resources/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json index 89f7648368..743c5bfc2a 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json @@ -27,6 +27,7 @@ "Volo.AbpIo.Domain:030010": "To purchase the trial license, you first need to activate your trial license!", "Volo.AbpIo.Domain:030011": "You cannot delete a trial license when it is purchased!", "Volo.AbpIo.Domain:030012": "A user is entitled to have only 1 free trial period. You already used your trial license.", + "Volo.AbpIo.Domain:030013": "A user with an activate license cannot start a trial license.", "Volo.AbpIo.Domain:070000": "The organization name can only contain latin letters, numbers, dots and hyphens!", "Volo.AbpIo.Domain:070001": "The company name can only contain latin letters, numbers, dots, space and hyphens!", "WantToLearn?": "Want to learn?", From 511e9542a8cab48d2c098a7997de0719ae4af002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?= Date: Tue, 21 Feb 2023 16:56:05 +0300 Subject: [PATCH 58/67] refactoring --- .../AbpIoLocalization/Base/Localization/Resources/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json index 743c5bfc2a..246095c064 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json @@ -27,7 +27,7 @@ "Volo.AbpIo.Domain:030010": "To purchase the trial license, you first need to activate your trial license!", "Volo.AbpIo.Domain:030011": "You cannot delete a trial license when it is purchased!", "Volo.AbpIo.Domain:030012": "A user is entitled to have only 1 free trial period. You already used your trial license.", - "Volo.AbpIo.Domain:030013": "A user with an activate license cannot start a trial license.", + "Volo.AbpIo.Domain:030013": "A user with an active license cannot start a trial license.", "Volo.AbpIo.Domain:070000": "The organization name can only contain latin letters, numbers, dots and hyphens!", "Volo.AbpIo.Domain:070001": "The company name can only contain latin letters, numbers, dots, space and hyphens!", "WantToLearn?": "Want to learn?", From ad320babc2c3a8898b4beb8fbaab0ab07b316e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?= Date: Tue, 21 Feb 2023 20:55:52 +0300 Subject: [PATCH 59/67] refactoring --- .../Pages/Blogging/Admin/Blogs/Index.cshtml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml index 29d42be4db..5133555cc6 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml @@ -4,12 +4,6 @@ @using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs @using Volo.Blogging @using Microsoft.AspNetCore.Mvc.Localization -@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Alert -@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Button -@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Card -@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid -@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table -@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers @using Volo.Abp.AspNetCore.Mvc.UI.Layout @using Volo.Blogging.Localization @inherits Volo.Blogging.Admin.Pages.Blogging.BloggingAdminPage From 3954fe95bb214bb05f537041aa87e58453225c3b Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 22 Feb 2023 16:42:49 +0800 Subject: [PATCH 60/67] Update AuthService.cs --- .../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs index 6e5ea8d222..ec2074434a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs @@ -58,7 +58,7 @@ public class AuthService : IAuthService, ITransientDependency { if (!response.IsSuccessStatusCode) { - Logger.LogError("Remote server returns '{response.StatusCode}'"); + Logger.LogError($"Remote server returns '{response.StatusCode}'"); return null; } From 19ec4921216dab8f3e19fec5a297601ba9fbaaa8 Mon Sep 17 00:00:00 2001 From: Lee Richardson Date: Thu, 23 Feb 2023 11:25:11 -0500 Subject: [PATCH 61/67] If local login disabled go to home page --- .../Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs index 1920cdd8ad..097c00c307 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs @@ -28,7 +28,13 @@ public class LogoutModel : AccountPageModel return RedirectSafely(ReturnUrl, ReturnUrlHash); } - return RedirectToPage("/Account/Login"); + var enableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); + if (enableLocalLogin) + { + return RedirectToPage("/Account/Login"); + } + + return RedirectToPage("/"); } public virtual Task OnPostAsync() From ee3c2bcbf661b811f660b0d14284dd7a02176e9c Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 24 Feb 2023 10:32:43 +0800 Subject: [PATCH 62/67] Update Logout.cshtml.cs --- .../src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs index 097c00c307..ce1ecd0e82 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs @@ -1,6 +1,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Account.Settings; using Volo.Abp.Identity; +using Volo.Abp.Settings; namespace Volo.Abp.Account.Web.Pages.Account; @@ -28,8 +30,7 @@ public class LogoutModel : AccountPageModel return RedirectSafely(ReturnUrl, ReturnUrlHash); } - var enableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); - if (enableLocalLogin) + if (await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin)) { return RedirectToPage("/Account/Login"); } From abdcae1d0b832cdac53884d8c78abe2e1a18e64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20Ebi=C3=A7o=C4=9Flu?= <9526587+ebicoglu@users.noreply.github.com> Date: Fri, 24 Feb 2023 16:31:27 +0300 Subject: [PATCH 63/67] Update en.json --- .../AbpIoLocalization/Commercial/Localization/Resources/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index 6e5e69f079..d4a60bde09 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -196,7 +196,7 @@ "ChangingDevelopers": "Can I change the registered developers of my organization in the future?", "ChangingDevelopersExplanation": "In addition to adding new developers to your license, you can also change the existing developers (you can remove a developer and add a new one to the same seat) without any additional cost.", "WhatHappensWhenLicenseEnds": "What happens when my license period ends?", - "WhatHappensWhenLicenseEndsExplanation1": "The ABP Commercial license is a perpetual license. After your license expires, you can continue developing your project. And you are not obliged to renew your license. Your license comes with a one-year update and support plan out of the box. In order to continue to get new features, performance enhancements, bug fixes, support and continue using ABP Suite, you need to renew your license. When your license expires, you will not get the following benefits:", + "WhatHappensWhenLicenseEndsExplanation1": "The ABP Commercial license is a perpetual license. After your license expires, you can continue developing your project. And you are not obliged to renew your license. Your license comes with a one-year update and support plan out of the box. In order to continue to get new features, performance enhancements, bug fixes, support and continue using ABP Suite, you need to renew your license. When your license expires;", "WhatHappensWhenLicenseEndsExplanation2": "You can not create new solutions using the ABP Commercial, but you can continue developing your existing applications forever.", "WhatHappensWhenLicenseEndsExplanation3": "You will be able to get updates for the modules and themes within your MINOR version (except RC or Preview versions). For example: if you are using v3.2.0 of a module, you can still get updates for v3.2.x (v3.2.1, v3.2.5... etc.) of that module. But you cannot get updates for the next major or minor version (like v3.3.0, v3.3.3, 4.x.x.. etc.). For example, when your license expired, the latest release was v4.4.3, and later, it published both 4.4.4 version and 4.5.0 version, you would be able to access the v4.4.X but you wouldn't be access the v4.5.X.", "WhatHappensWhenLicenseEndsExplanation4": "You can not install new modules and themes added to the ABP Commercial platform after your license ends.", From 389ca103ee114bb638da3e1f40a37561fc30fe18 Mon Sep 17 00:00:00 2001 From: Eric Johnson Date: Fri, 24 Feb 2023 16:12:27 -0600 Subject: [PATCH 64/67] Fix localization links to show english link since this is en documentation --- docs/en/UI/Angular/Quick-Start.md | 2 +- docs/en/UI/AspNetCore/Tag-Helpers/Form-elements.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/UI/Angular/Quick-Start.md b/docs/en/UI/Angular/Quick-Start.md index 768b3b7b67..dd26dd3efe 100644 --- a/docs/en/UI/Angular/Quick-Start.md +++ b/docs/en/UI/Angular/Quick-Start.md @@ -179,7 +179,7 @@ This command will download and start a simple static server, a browser window at Of course, you need your application to run on an optimized web server and become available to everyone. This is quite straight-forward: -1. Create a new static web server instance. You can use a service like [Azure App Service](https://azure.microsoft.com/tr-tr/services/app-service/web/), [Firebase](https://firebase.google.com/docs/hosting), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or even [GitHub Pages](https://angular.io/guide/deployment#deploy-to-github-pages). Another option is maintaining own web server with [NGINX](https://www.nginx.com/), [IIS](https://www.iis.net/), [Apache HTTP Server](https://httpd.apache.org/), or equivalent. +1. Create a new static web server instance. You can use a service like [Azure App Service](https://azure.microsoft.com/en-us/services/app-service/web/), [Firebase](https://firebase.google.com/docs/hosting), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), or even [GitHub Pages](https://angular.io/guide/deployment#deploy-to-github-pages). Another option is maintaining own web server with [NGINX](https://www.nginx.com/), [IIS](https://www.iis.net/), [Apache HTTP Server](https://httpd.apache.org/), or equivalent. 2. Copy the files from `dist/MyProjectName` [1](#f-dist-folder-name) to a publicly served destination on the server via CLI of the service provider, SSH, or FTP (whichever is available). This step would be defined as a job if you have a CI/CD flow. 3. [Configure the server](https://angular.io/guide/deployment#server-configuration) to redirect all requests to the _index.html_ file. Some services do that automatically. Others require you [to add a file to the bundle via assets](https://angular.io/guide/workspace-config#assets-configuration) which describes the server how to do the redirections. Occasionally, you may need to do manual configuration. diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Form-elements.md b/docs/en/UI/AspNetCore/Tag-Helpers/Form-elements.md index 8f664a80a5..15a8b0819c 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Form-elements.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Form-elements.md @@ -10,7 +10,7 @@ See the [form elements demo page](https://bootstrap-taghelpers.abp.io/Components ## abp-input -`abp-input` tag creates a Bootstrap form input for a given c# property. It uses [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/tr-tr/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-3.1#the-input-tag-helper) in background, so every data annotation attribute of `input` tag helper of Asp.Net Core is also valid for `abp-input`. +`abp-input` tag creates a Bootstrap form input for a given c# property. It uses [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-7.0#the-input-tag-helper) in background, so every data annotation attribute of `input` tag helper of Asp.Net Core is also valid for `abp-input`. Usage: @@ -88,7 +88,7 @@ You can set some of the attributes on your c# property, or directly on html tag. * `label`: Sets the label for input. * `display-required-symbol`: Adds the required symbol (*) to label if input is required. Default `True`. -`asp-format`, `name` and `value` attributes of [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-3.1#the-input-tag-helper) are also valid for `abp-input` tag helper. +`asp-format`, `name` and `value` attributes of [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-7.0#the-input-tag-helper) are also valid for `abp-input` tag helper. ### Label & Localization @@ -100,7 +100,7 @@ You can set label of your input in different ways: ## abp-select -`abp-select` tag creates a Bootstrap form select for a given c# property. It uses [Asp.Net Core Select Tag Helper](https://docs.microsoft.com/tr-tr/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-3.1#the-select-tag-helper) in background, so every data annotation attribute of `select` tag helper of Asp.Net Core is also valid for `abp-select`. +`abp-select` tag creates a Bootstrap form select for a given c# property. It uses [Asp.Net Core Select Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-7.0#the-select-tag-helper) in background, so every data annotation attribute of `select` tag helper of Asp.Net Core is also valid for `abp-select`. `abp-select` tag needs a list of `Microsoft.AspNetCore.Mvc.Rendering.SelectListItem ` to work. It can be provided by `asp-items` attriube on the tag or `[SelectItems()]` attribute on c# property. (if you are using [abp-dynamic-form](Dynamic-forms.md), c# attribute is the only way.) From 7f0e1e3ee57defb856d4365c4b2df746eac1e73e Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 27 Feb 2023 09:50:42 +0800 Subject: [PATCH 65/67] Remove the key from the exception. Resolve #15808 --- framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs index cc29fd23a8..8713b2ec7b 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs @@ -193,7 +193,7 @@ public class UnitOfWork : IUnitOfWork, ITransientDependency if (_databaseApis.ContainsKey(key)) { - throw new AbpException("There is already a database API in this unit of work with given key: " + key); + throw new AbpException("There is already a database API in this unit of work with given key."); } _databaseApis.Add(key, api); @@ -221,7 +221,7 @@ public class UnitOfWork : IUnitOfWork, ITransientDependency if (_transactionApis.ContainsKey(key)) { - throw new AbpException("There is already a transaction API in this unit of work with given key: " + key); + throw new AbpException("There is already a transaction API in this unit of work with given key."); } _transactionApis.Add(key, api); From 8c82aae791e245625b4ac83bcd03cff45043efde Mon Sep 17 00:00:00 2001 From: "Galip T. ERDEM" Date: Sun, 26 Feb 2023 23:17:34 -0500 Subject: [PATCH 66/67] IdentityServer module docs update --- docs/en/Modules/IdentityServer.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en/Modules/IdentityServer.md b/docs/en/Modules/IdentityServer.md index f754a29687..90c08f6c6b 100644 --- a/docs/en/Modules/IdentityServer.md +++ b/docs/en/Modules/IdentityServer.md @@ -1,10 +1,12 @@ # IdentityServer Module -IdentityServer module provides a full integration with the [IdentityServer](https://github.com/IdentityServer/IdentityServer4) (IDS) framework, which provides advanced authentication features like single sign-on and API access control. This module persists clients, resources and other IDS-related objects to database. +IdentityServer module provides a full integration with the [IdentityServer4](https://github.com/IdentityServer/IdentityServer4) (IDS) framework, which provides advanced authentication features like single sign-on and API access control. This module persists clients, resources and other IDS-related objects to database. **This module is replaced by** [OpenIddict module](https://docs.abp.io/en/abp/latest/Modules/OpenIddict) after ABP v6.0 in the startup templates. + +> Note: You can not use IdentityServer and OpenIddict modules together. They are separate OpenID provider libraries for the same job. ## How to Install -This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +You don't need this module when you are using OpenIddict module. However, if you want to keep using IdentityServer4 for your applications, you can install this module and remove the OpenIddict module. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code From 5b300c1653968dcaf6c548a2bb99ffb7684c7b58 Mon Sep 17 00:00:00 2001 From: "Galip T. ERDEM" Date: Sun, 26 Feb 2023 23:17:52 -0500 Subject: [PATCH 67/67] Added IdentityServer migration guide --- .../IdentityServer4-Step-by-Step.md | 230 ++++++++++++++++++ docs/en/docs-nav.json | 20 +- 2 files changed, 243 insertions(+), 7 deletions(-) create mode 100644 docs/en/Migration-Guides/IdentityServer4-Step-by-Step.md diff --git a/docs/en/Migration-Guides/IdentityServer4-Step-by-Step.md b/docs/en/Migration-Guides/IdentityServer4-Step-by-Step.md new file mode 100644 index 0000000000..aff389ccf8 --- /dev/null +++ b/docs/en/Migration-Guides/IdentityServer4-Step-by-Step.md @@ -0,0 +1,230 @@ +# Migrating from OpenIddict to IdentityServer4 Step by Step Guide + +ABP startup templates use `OpenIddict` OpenID provider from v6.0.0 by default and `IdentityServer` projects are renamed to `AuthServer` in tiered/separated solutions. Since OpenIddict is the default OpenID provider library for ABP templates since v6.0, you may want to keep using [IdentityServer4](https://github.com/IdentityServer/IdentityServer4) library, even it is **archived and no longer maintained by the owners**. ABP doesn't provide support for newer versions of IdentityServer. This guide provides layer-by-layer guidance for migrating your existing [OpenIddict](https://github.com/openiddict/openiddict-core) application to IdentityServer4. + +## IdentityServer4 Migration Steps + +Use the `abp update` command to update your existing application. See [Upgrading docs](../Upgrading.md) for more info. Apply required migrations by following the [Migration Guides](Index.md) based on your application version. + +### Domain.Shared Layer + +- In **MyApplication.Domain.Shared.csproj** replace **project reference**: + +```csharp + +``` + + with + +```csharp + +``` + +- In **MyApplicationDomainSharedModule.cs** replace usings and **module dependencies:** + +```csharp +using Volo.Abp.OpenIddict; +... +typeof(AbpOpenIddictDomainSharedModule) +``` + + with + +```csharp +using Volo.Abp.IdentityServer; +... +typeof(AbpIdentityServerDomainSharedModule) +``` + +### Domain Layer + +- In **MyApplication.Domain.csproj** replace **project references**: + +```csharp + + +``` + + with + +```csharp + + +``` + +- In **MyApplicationDomainModule.cs** replace usings and **module dependencies**: + +```csharp +using Volo.Abp.OpenIddict; +using Volo.Abp.PermissionManagement.OpenIddict; +... +typeof(AbpOpenIddictDomainModule), +typeof(AbpPermissionManagementDomainOpenIddictModule), +``` + + with + +```csharp +using Volo.Abp.IdentityServer; +using Volo.Abp.PermissionManagement.IdentityServer; +... +typeof(AbpIdentityServerDomainModule), +typeof(AbpPermissionManagementDomainIdentityServerModule), +``` + +#### OpenIddictDataSeedContributor + +DataSeeder is the most important part for starting the application since it seeds the initial data for both OpenID providers. + +- Create a folder named *IdentityServer* under the Domain project and copy the [IdentityServerDataSeedContributor.cs](https://github.com/abpframework/abp-samples/blob/master/Ids2OpenId/src/Ids2OpenId.Domain/IdentityServer/IdentityServerDataSeedContributor.cs) under this folder. **Rename** all the `OpenId2Ids` with your project name. +- Delete *OpenIddict* folder that contains `OpenIddictDataSeedContributor.cs` which is no longer needed. + +### EntityFrameworkCore Layer + +If you are using MongoDB, skip this step and check the *MongoDB* layer section. + +- In **MyApplication.EntityFrameworkCore.csproj** replace **project reference**: + + ```csharp + + ``` + + with + + ```csharp + + ``` + +- In **MyApplicationEntityFrameworkCoreModule.cs** replace usings and **module dependencies**: + +```csharp +using Volo.Abp.OpenIddict.EntityFrameworkCore; +... +typeof(AbpOpenIddictEntityFrameworkCoreModule), +``` + + with + +```csharp +using Volo.Abp.IdentityServer.EntityFrameworkCore; +... +typeof(AbpIdentityServerEntityFrameworkCoreModule), +``` + +- In **MyApplicationDbContext.cs** replace usings and **fluent api configurations**: + + ```csharp + using Volo.Abp.OpenIddict.EntityFrameworkCore; + ... + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + /* Include modules to your migration db context */ + + ... + builder.ConfigureOpenIddict(); + ``` + + with + + ```csharp + using Volo.Abp.IdentityServer.EntityFrameworkCore; + ... + using Volo.Abp.OpenIddict.EntityFrameworkCore; + ... + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + /* Include modules to your migration db context */ + + ... + builder.ConfigureIdentityServer(); + ``` + +> Not: You need to create new migration after updating the fluent api. Navigate to *EntityFrameworkCore* folder and add a new migration. Ex, `dotnet ef migrations add Updated_To_IdentityServer ` + +### MongoDB Layer + +If you are using EntityFrameworkCore, skip this step and check the *EntityFrameworkCore* layer section. + +- In **MyApplication.MongoDB.csproj** replace **project reference**: + + ```csharp + + ``` + + with + + ```csharp + + ``` + +- In **MyApplicationMongoDbModule.cs** replace usings and **module dependencies**: + +```csharp +using Volo.Abp.OpenIddict.MongoDB; +... +typeof(AbpOpenIddictMongoDbModule), +``` + + with + +```csharp +using Volo.Abp.IdentityServer.MongoDB; +... +typeof(AbpIdentityServerMongoDbModule), +``` + +### DbMigrator Project + +- In `appsettings.json` **replace OpenIddict section with IdentityServer** since IdentityServerDataSeeder will be using these information for initial data seeding: + + ```json + "IdentityServer": { // Rename OpenIddict to IdentityServer + "Clients ": { // Rename Applications to Clients + ... + } + } + ``` + + +### Test Project + +- In **MyApplicationTestBaseModule.cs** **add** the IdentityServer related using and PreConfigurations: + + ```csharp + using Volo.Abp.IdentityServer; + ``` + + and + + ```csharp + PreConfigure(options => + { + options.AddDeveloperSigningCredential = false; + }); + + PreConfigure(identityServerBuilder => + { + identityServerBuilder.AddDeveloperSigningCredential(false, System.Guid.NewGuid().ToString()); + }); + ``` + + to `PreConfigureServices` to run authentication related unit tests. + +### UI Layer + +You can follow the migrations guides from IdentityServer to OpenIddict in **reverse order** to update your UIs. You can also check the source-code for [Index.cshtml.cs](https://github.com/abpframework/abp-samples/blob/master/OpenId2Ids/src/OpenId2Ids.AuthServer/Pages/Index.cshtml) and [Index.cshtml](https://github.com/abpframework/abp-samples/blob/master/OpenId2Ids/src/OpenId2Ids.AuthServer/Pages/Index.cshtml.cs) files for **AuthServer** project. + +- [Angular UI Migration](OpenIddict-Angular.md) +- [MVC/Razor UI Migration](OpenIddict-Mvc.md) +- [Blazor-Server UI Migration](OpenIddict-Blazor-Server.md) +- [Blazor-Wasm UI Migration](OpenIddict-Blazor.md) + +## Source code of samples and module + +* [Open source tiered & separate auth server application migrate OpenIddict to Identity Server](https://github.com/abpframework/abp-samples/tree/master/OpenId2Ids) +* [IdentityServer module document](https://docs.abp.io/en/abp/6.0/Modules/IdentityServer) +* [IdentityServer module source code](https://github.com/abpframework/abp/tree/rel-6.0/modules/identityserver) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 351bfde88f..2ce69e69a9 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -1370,16 +1370,22 @@ }, { "text": "IdentityServer", - "path": "Modules/IdentityServer.md" + "path": "Modules/IdentityServer.md", + "items": [ + { + "text": "IdentityServer Migration Guide", + "path": "Migration-Guides/IdentityServer4-Step-by-Step.md" + } + ] }, { "text": "OpenIddict", - "items": [ - { - "text": "OpenIddict Migration Guide", - "path": "Migration-Guides/OpenIddict-Step-by-Step.md" - } - ], + "items": [ + { + "text": "OpenIddict Migration Guide", + "path": "Migration-Guides/OpenIddict-Step-by-Step.md" + } + ], "path": "Modules/OpenIddict.md" }, {