From ec980e1b874395b73281e4bb6e47aa2b6709d1e4 Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 23 May 2024 12:55:45 +0300 Subject: [PATCH] [plugins-functionality | DONE | FIXED ] plugins minor fixes --- .../search-bar/plugin-search-bar.component.ts | 15 +++++++++------ .../plugin-search-deposit-link.component.ts | 5 +++-- .../plugins-form/pluginsForm.component.html | 2 +- dashboard/plugins/plugins.component.html | 10 +++++----- dashboard/plugins/plugins.component.ts | 2 +- dashboard/plugins/plugins.module.ts | 3 ++- .../templates/pluginTemplates.component.html | 12 ++++++------ .../templates/pluginTemplates.component.ts | 17 ++++++++--------- .../plugins/wrapper/plugin-wrapper.module.ts | 3 ++- 9 files changed, 37 insertions(+), 32 deletions(-) diff --git a/dashboard/plugins/components/search-bar/plugin-search-bar.component.ts b/dashboard/plugins/components/search-bar/plugin-search-bar.component.ts index acc35887..2d07087e 100644 --- a/dashboard/plugins/components/search-bar/plugin-search-bar.component.ts +++ b/dashboard/plugins/components/search-bar/plugin-search-bar.component.ts @@ -88,19 +88,22 @@ export class PluginSearchBarComponent extends PluginBaseComponent { this.community = community; - this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe( - community => { - this.getLayout(community.communityId); + if(community) { + this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe( + community => { + this.getLayout(community.communityId); - })); + })); + } } )); } ngOnInit() { this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe( community => { - this.getLayout(community.communityId); - + if(community) { + this.getLayout(community.communityId); + } })); } diff --git a/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts index 1d191685..76872444 100644 --- a/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts +++ b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts @@ -41,8 +41,9 @@ export class PluginSearchDepositLinkComponent extends PluginBaseComponent { - this.getLayout(community.communityId); - + if(community) { + this.getLayout(community.communityId); + } })); } diff --git a/dashboard/plugins/plugins-form/pluginsForm.component.html b/dashboard/plugins/plugins-form/pluginsForm.component.html index 693fe2fe..e3c205b9 100644 --- a/dashboard/plugins/plugins-form/pluginsForm.component.html +++ b/dashboard/plugins/plugins-form/pluginsForm.component.html @@ -86,7 +86,7 @@ -
+
diff --git a/dashboard/plugins/plugins.component.html b/dashboard/plugins/plugins.component.html index e4db7ba9..d9da4791 100644 --- a/dashboard/plugins/plugins.component.html +++ b/dashboard/plugins/plugins.component.html @@ -36,7 +36,6 @@
-
@@ -74,11 +73,12 @@
{{placement.value}}
+
-
+
@@ -157,7 +157,7 @@
+
-
diff --git a/dashboard/plugins/plugins.component.ts b/dashboard/plugins/plugins.component.ts index 59b131f2..58fead75 100644 --- a/dashboard/plugins/plugins.component.ts +++ b/dashboard/plugins/plugins.component.ts @@ -467,7 +467,7 @@ export class PluginsComponent implements OnInit { this.pluginsByPlacement.get(placement)[index].plugin = saved; this.clearCache(); }, - error => this.handleUpdateError("System error creating template", error) + error => this.handleUpdateError("System error saving plugin", error) )); } else { diff --git a/dashboard/plugins/plugins.module.ts b/dashboard/plugins/plugins.module.ts index ca4fa834..063aaa85 100644 --- a/dashboard/plugins/plugins.module.ts +++ b/dashboard/plugins/plugins.module.ts @@ -26,6 +26,7 @@ import {MatSlideToggleModule} from "@angular/material/slide-toggle"; import {PluginWrapperModule} from "./wrapper/plugin-wrapper.module"; import {SideBarModule} from "../sharedComponents/sidebar/sideBar.module"; import {PluginEditWrapperModule} from "./wrapper/plugin-edit-wrapper.module"; +import {TransitionGroupModule} from "../../utils/transition-group/transition-group.module"; @NgModule({ @@ -33,7 +34,7 @@ import {PluginEditWrapperModule} from "./wrapper/plugin-edit-wrapper.module"; CommonModule, RouterModule, FormsModule, AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatAutocompleteModule, MatFormFieldModule, MatChipsModule, MatCheckboxModule, AdminTabsModule, PageContentModule, PluginsRoutingModule, SearchInputModule, IconsModule, LoadingModule, CKEditorModule, - MatSlideToggleModule, PluginWrapperModule, SideBarModule, PluginEditWrapperModule + MatSlideToggleModule, PluginWrapperModule, SideBarModule, PluginEditWrapperModule, TransitionGroupModule ], providers:[PluginsService], declarations: [PluginsComponent], diff --git a/dashboard/plugins/templates/pluginTemplates.component.html b/dashboard/plugins/templates/pluginTemplates.component.html index 7cd753cf..8e9412c1 100644 --- a/dashboard/plugins/templates/pluginTemplates.component.html +++ b/dashboard/plugins/templates/pluginTemplates.component.html @@ -52,7 +52,7 @@ *ngIf="templatesByPlacement.get(placement.value) && templatesByPlacement.get(placement.value).length >0 && page" class="uk-heading-divider uk-h6 uk-margin-left uk-padding-remove-left uk-text-capitalize ">{{placement.value}}
-
+
{{template.name}}
@@ -90,23 +90,23 @@