mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-14 01:57:32 +08:00
Add .editorconfig file for consistent styling (#76)
This should take effect when editors with [EditorConfig](http://editorconfig.org/) support are used. Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
This commit is contained in:
parent
1af2b3665f
commit
fd52a544d1
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# Tab indentation (no size specified)
|
||||
[{Makefile,*.go}]
|
||||
indent_style = tab
|
@ -1,4 +1,4 @@
|
||||
(function () {
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var app = angular.module('DockerPlay', ['ngMaterial']);
|
||||
@ -21,7 +21,7 @@
|
||||
$scope.ttl = '--:--:--';
|
||||
$scope.connected = true;
|
||||
|
||||
angular.element($window).bind('resize', function(){
|
||||
angular.element($window).bind('resize', function() {
|
||||
if ($scope.selectedInstance) {
|
||||
$scope.resize($scope.selectedInstance.term.proposeGeometry());
|
||||
}
|
||||
@ -87,14 +87,14 @@
|
||||
$scope.$apply();
|
||||
}, 1000);
|
||||
}
|
||||
var socket = io({path: '/sessions/' + sessionId + '/ws'});
|
||||
var socket = io({ path: '/sessions/' + sessionId + '/ws' });
|
||||
|
||||
socket.on('terminal out', function(name, data) {
|
||||
var instance = $scope.idx[name];
|
||||
|
||||
if (!instance) {
|
||||
// instance is new and was created from another client, we should add it
|
||||
$scope.upsertInstance({name: name});
|
||||
$scope.upsertInstance({ name: name });
|
||||
instance = $scope.idx[name];
|
||||
}
|
||||
if (!instance.term) {
|
||||
@ -113,7 +113,7 @@
|
||||
});
|
||||
|
||||
socket.on('new instance', function(name, ip, hostname) {
|
||||
$scope.upsertInstance({name: name, ip: ip, hostname: hostname});
|
||||
$scope.upsertInstance({ name: name, ip: ip, hostname: hostname });
|
||||
$scope.$apply(function() {
|
||||
if ($scope.instances.length == 1) {
|
||||
$scope.showInstance($scope.instances[0]);
|
||||
@ -220,13 +220,13 @@
|
||||
return instance.term;
|
||||
}
|
||||
|
||||
var terminalContainer = document.getElementById('terminal-'+ instance.name);
|
||||
var terminalContainer = document.getElementById('terminal-' + instance.name);
|
||||
|
||||
var term = new Terminal({
|
||||
cursorBlink: false
|
||||
});
|
||||
|
||||
term.attachCustomKeydownHandler(function (e) {
|
||||
term.attachCustomKeydownHandler(function(e) {
|
||||
// Ctrl + Alt + C
|
||||
if (e.ctrlKey && e.altKey && (e.keyCode == 67)) {
|
||||
document.execCommand('copy');
|
||||
|
Loading…
x
Reference in New Issue
Block a user