mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-15 22:01:56 +00:00
Merge pull request #18 from avatao-content/webide_enhancements
Webide enhancements
This commit is contained in:
commit
ce97228a51
@ -41,14 +41,9 @@ export class WebSocketService {
|
||||
}
|
||||
|
||||
public send(key: string, data?: any, trigger?: any): void {
|
||||
// TODO: do this nicer?
|
||||
const message = {'key': key};
|
||||
if (data) {
|
||||
message['data'] = data;
|
||||
}
|
||||
if (trigger) {
|
||||
message['trigger'] = trigger;
|
||||
}
|
||||
if (data) { message['data'] = data; }
|
||||
if (trigger) { message['trigger'] = trigger; }
|
||||
this.uplink.next(message);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import { DeploymentNotificationService } from '../services/deployment-notificati
|
||||
|
||||
const modelist = brace.acequire('ace/ext/modelist');
|
||||
|
||||
const defaultSourceCode = 'Oops! Something went wrong :(';
|
||||
const defaultSourceCode = 'Loading your file...';
|
||||
const autosave_interval = 2000;
|
||||
|
||||
@Component({
|
||||
@ -69,7 +69,7 @@ export class WebideComponent implements OnInit {
|
||||
updateFileData(data: SourceCode) {
|
||||
this.filename = data.filename;
|
||||
this.directory = data.directory;
|
||||
this.code = data.content;
|
||||
this.code = (data.content != null) ? data.content : this.code;
|
||||
this.language = modelist.getModeForPath(this.filename).name;
|
||||
this.files = data.files;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user