File tree Expand file tree Collapse file tree 7 files changed +37
-31
lines changed Expand file tree Collapse file tree 7 files changed +37
-31
lines changed Original file line number Diff line number Diff line change 11< div class ="flex flex-column fit ">
22 < div class ="flex-item flex-item-grow ">
3- < button class ="btn " data-bind ="click: publish ">
3+ < button class ="btn btn-default " data-bind ="click: publish ">
44 < i class ="paperbits-icon paperbits-send "> </ i >
55 Publish website
66 </ button >
77 </ div >
88 < div class ="flex-item ">
9- < button class ="btn " data-bind ="click: reset ">
9+ < button class ="btn btn-default " data-bind ="click: reset ">
1010 < i class ="paperbits-icon paperbits-simple-remove "> </ i >
1111 Reset content
1212 </ button >
Original file line number Diff line number Diff line change 11import { IInjectorModule , IInjector } from "@paperbits/common/injection" ;
22import { ContentWorkshop } from "./content" ;
3- import { ContentWorkshopSection } from "./contentSection " ;
3+ import { OperationsSectionToolButton } from "./operationsSection " ;
44import { ResetDetailsWorkshop } from "./resetDetails" ;
55
66export class ContentModule implements IInjectorModule {
77 public register ( injector : IInjector ) : void {
88 injector . bind ( "contentWorkshop" , ContentWorkshop ) ;
99 injector . bind ( "resetDetailsWorkshop" , ResetDetailsWorkshop ) ;
10- injector . bindToCollection ( "workshopSections" , ContentWorkshopSection ) ;
10+ injector . bindToCollection ( "workshopSections" , OperationsSectionToolButton ) ;
1111 }
12- }
12+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11export * from "./content.module" ;
2- export * from "./contentSection " ;
2+ export * from "./operationsSection " ;
33export * from "./content" ;
Original file line number Diff line number Diff line change 1+ import { ToolButton , ViewManager , View } from "@paperbits/common/ui" ;
2+
3+ const helpText = "<h1>Operations</h1><p>Publish your portal to make the latest version available to visitors.</p><p>Reset content to roll back to portal's default state.</p>" ;
4+
5+ export class OperationsSectionToolButton implements ToolButton {
6+ public readonly iconClass : string = "paperbits-icon paperbits-send" ;
7+ public readonly title : string = "Operations" ;
8+ public readonly tooltip : string = helpText ;
9+
10+ constructor ( private readonly viewManager : ViewManager ) { }
11+
12+ public onActivate ( ) : void {
13+ this . viewManager . clearJourney ( ) ;
14+
15+ const view : View = {
16+ heading : this . title ,
17+ helpText : helpText ,
18+ component : { name : "content-workshop" }
19+ } ;
20+
21+ this . viewManager . openViewAsWorkshop ( view ) ;
22+ }
23+ }
Original file line number Diff line number Diff line change 11import { IInjectorModule , IInjector } from "@paperbits/common/injection" ;
2- import { HelpWorkshop , HelpDetailsWorkshop , HelpWorkshopSection } from "." ;
2+ import { HelpWorkshop , HelpDetailsWorkshop , HelpSectionToolButton } from "." ;
33
44export class HelpModule implements IInjectorModule {
55 public register ( injector : IInjector ) : void {
66 injector . bind ( "helpWorkshop" , HelpWorkshop ) ;
77 injector . bind ( "helpDetailsWorkshop" , HelpDetailsWorkshop ) ;
8- injector . bindToCollection ( "workshopSections" , HelpWorkshopSection ) ;
8+ injector . bindToCollection ( "workshopSections" , HelpSectionToolButton ) ;
99 }
1010}
Original file line number Diff line number Diff line change 11import { ToolButton , ViewManager , View } from "@paperbits/common/ui" ;
22
3- export class HelpWorkshopSection implements ToolButton {
4- public iconClass : string = "paperbits-icon paperbits-c-question" ;
5- public title : string = "Help" ;
3+ const helpText = "<h1>Help</h1><p>Get help with configuring the developer portal.</p>" ;
4+
5+ export class HelpSectionToolButton implements ToolButton {
6+ public readonly iconClass : string = "paperbits-icon paperbits-c-question" ;
7+ public readonly title : string = "Help" ;
8+ public readonly tooltip : string = helpText ;
69
710 constructor ( private readonly viewManager : ViewManager ) { }
811
You can’t perform that action at this time.
0 commit comments