sidebar entry rework
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'exclamations',
|
||||
selector: 'settings',
|
||||
template: `
|
||||
<span style="color: blue">!!!</span>
|
||||
<span style="color: red">!!!</span>
|
||||
`
|
||||
})
|
||||
export class ANestedComponent implements OnInit {
|
||||
|
||||
@@ -1,16 +1,29 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
declare const fb
|
||||
@Component({
|
||||
selector: 'PLUGINMANAGER', //!!!!
|
||||
template: `
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-title">
|
||||
PLUGINMANAGER <br> ${Object.keys(fb.PluginManager).join("<br>")}
|
||||
</div>
|
||||
<div class="card-text">
|
||||
Hello World <exclamations></exclamations>
|
||||
</div>
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-lg-5 clr-col-md-8 clr-col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Plugin manager
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-title">
|
||||
Block
|
||||
</div>
|
||||
<div class="card-text">
|
||||
${Object.keys(fb.PluginManager).join("<br>")}
|
||||
<button class="btn btn-success">Success</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="btn btn-sm btn-link">Footer Action 1</button>
|
||||
<button class="btn btn-sm btn-link">Footer Action 2</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
@@ -3,10 +3,10 @@ import { CommonModule } from '@angular/common';
|
||||
import { PluginComponent } from './component';
|
||||
import { ANestedComponent } from './a-nested.component';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { FrontendPlugin, SidebarEntry } from 'frontblock-generic/Plugin';
|
||||
import { FrontendPlugin, SidebarEntries } from 'frontblock-generic/Plugin';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule.forChild([{path: "pluginmanager", component: PluginComponent}])],
|
||||
imports: [CommonModule, RouterModule.forChild([{path: "debug", component: PluginComponent}])],
|
||||
exports: [RouterModule],
|
||||
declarations: [
|
||||
PluginComponent,
|
||||
@@ -19,7 +19,15 @@ import { FrontendPlugin, SidebarEntry } from 'frontblock-generic/Plugin';
|
||||
}]
|
||||
})
|
||||
export class PluginModule implements FrontendPlugin{
|
||||
getSidebarEntry(): SidebarEntry {
|
||||
return {icon: 'check', text: 'Plugin manager', route: 'pluginmanager'}
|
||||
getSidebarEntry(): SidebarEntries {
|
||||
return {
|
||||
icon: 'cog',
|
||||
text: 'pluginmanager',
|
||||
type: "multi",
|
||||
links: [{
|
||||
route: 'debug',
|
||||
text: 'DEBUG'
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user