Compare commits

..
Author SHA1 Message Date
R. Richard d8545c48be Stop filtering JS code in bot messages 2020-05-18 18:01:30 +02:00
ni-richard 031a9916a0 Make webservice optional 2020-05-15 14:46:33 +02:00
R. Richard 68f9a2c57d Enable Kotlin syntax highlighting 2020-03-31 14:42:11 +02:00
5 changed files with 18 additions and 4 deletions
+2 -1
View File
@@ -17,7 +17,7 @@ import { TerminalComponent } from './terminal/terminal.component';
import { AppRoutingModule } from './app-routing.module';
import { TestmessengerComponent } from './testmessenger/testmessenger.component';
import { DeploymentNotificationService } from './services/deployment-notification.service';
import { SafePipe } from './pipes/safe.pipe';
import { SafePipe, SafeHtmlPipe } from './pipes/safe.pipe';
import { ConsoleComponent } from './console/console.component';
import { MonacoEditorModule } from 'ngx-monaco-editor';
import {
@@ -41,6 +41,7 @@ import { LoaderComponent } from './loader/loader.component';
DashboardComponent,
TestmessengerComponent,
SafePipe,
SafeHtmlPipe,
ConsoleComponent,
LoaderComponent
],
+3 -1
View File
@@ -30,5 +30,7 @@ export const LanguageMap: { [extension: string]: string; } = {
css: 'css',
less: 'less',
scss: 'scss',
sh: 'shell'
sh: 'shell',
kt: 'kotlin',
kts: 'kotlin'
};
+1 -1
View File
@@ -8,7 +8,7 @@
<div class="tao-grid-center-left originator">{{message.originator}}</div>
<div class="timestamp tao-grid-center-right">{{message.timestamp | date:'HH:mm:ss'}}</div>
</div>
<div class="tfw-grid-message-body" [innerHtml]="message.message"></div>
<div class="tfw-grid-message-body" [innerHtml]="message.message | safeHtml"></div>
</div>
<div *ngIf="showTypingIndicator"
class="tfw-grid-message jumping-circle-container"
+11
View File
@@ -11,3 +11,14 @@ export class SafePipe implements PipeTransform {
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
}
}
@Pipe({
name: 'safeHtml'
})
export class SafeHtmlPipe implements PipeTransform {
constructor(private sanitized: DomSanitizer) {}
transform(value) {
return this.sanitized.bypassSecurityTrustHtml(value);
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ export class DashboardConfigService extends ConfigServiceBase {
layout = new BehaviorSubject<string>('terminal-ide-web');
hideMessages = new BehaviorSubject<boolean>(false);
iframeUrl = new BehaviorSubject<string>('/webservice');
iframeUrl = new BehaviorSubject<string>('');
showUrlBar = new BehaviorSubject<boolean>(false);
terminalMenuItem = new BehaviorSubject<string>('terminal');
reloadIframeOnDeploy = new BehaviorSubject<boolean>(false);