11import blessed from "blessed" ;
22import contrib from "blessed-contrib" ;
33import { removeANSI } from "../../libs/generateTable" ;
4- import { welcomeMessage } from "../../libs/getResponses" ;
4+ import { lines , welcomeMessage } from "../../libs/getResponses" ;
5+ import { getSaying } from "../../libs/getSaying" ;
56import { blessedConfig } from "./blessedConfig" ;
67import { DashboardSize } from "./dashboardHandlers" ;
78
@@ -201,7 +202,17 @@ export const generateDashboardOutput: (
201202 let response = screen . screenshot ( 0 , screenshotX , 0 , screenshotY ) ;
202203 screen . destroy ( ) ;
203204
205+ // Remove garbage lines
204206 response = removeUnneededLines ( response ) ;
207+ response += "\n" ;
208+
209+ response += getSaying ( ) + "\n" ;
210+ response += lines . WNrepoLink + "\n\n" ;
211+ response += lines . BMCLink + "\n" ;
212+ response += lines . sponsorMessage + "\n" ;
213+ response += lines . twitterPlug ;
214+ response += lines . handleHashtag . join ( " " ) + "\n" ;
215+
205216 return response ;
206217} ;
207218
@@ -212,7 +223,7 @@ const removeUnneededLines: (str: string) => string = (str) => {
212223 // Lines with ansi removed
213224 let rawLines = splitLines . map ( ( line ) => {
214225 // If line contains a background color code then replace it with NON ansi string
215- // This is mostly to preserve bars since they are just whitespace
226+ // This is mostly to preserve bars since they are just colored whitespace
216227 if ( line . includes ( "\x1B[4" ) ) line . replace ( "\x1B[4" , "_" ) ;
217228 return removeANSI ( line ) ;
218229 } ) ;
@@ -221,11 +232,9 @@ const removeUnneededLines: (str: string) => string = (str) => {
221232 let goodLines : number [ ] = [ ] ;
222233
223234 rawLines . forEach ( ( line , index ) => {
224- // remove border
225- line = line . replace ( / │ / g, "" ) ;
235+ // remove border and spaces
236+ line = line . replace ( / │ / g, "" ) . replace ( / \s / g , "" ) ;
226237
227- // remove spaces
228- line = line . replace ( / \s / g, "" ) ;
229238 if ( line . length !== 0 ) goodLines . push ( index ) ;
230239 } ) ;
231240
0 commit comments