Skip to content

Commit

Permalink
Latest update on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ben3 authored and ben3 committed Aug 27, 2019
1 parent 1afc1fc commit 22b81fa
Show file tree
Hide file tree
Showing 156 changed files with 11,024 additions and 745 deletions.
13 changes: 10 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/images"
],
"styles": [
"src/styles.css"
"src/css/reset-uikit.css",
"src/css/styles.css",
"node_modules/angular-emoji-filter-hd/dist/emoji.min.css",
"node_modules/pikaday/css/pikaday.css",
"src/css/flags/common.css",
"src/css/flags/flags32.css",
"src/css/flags/flags16.css"
],
"scripts": []
},
Expand Down Expand Up @@ -122,4 +129,4 @@
}
}},
"defaultProject": "chat-sdk-web"
}
}
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1",
"howler": "latest",
"pikaday": "latest",
"moment": "latest",
"angular-emoji-filter-hd": "latest",
"file-saver": "latest"
},
"devDependencies": {
Expand All @@ -35,6 +39,7 @@
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"@types/file-saver": "^2.0.1",
"@types/howler": "latest",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
Expand Down
7 changes: 7 additions & 0 deletions src/.idea/dictionaries/Ben3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

718 changes: 348 additions & 370 deletions src/.idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/angularjs/controllers/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ angular.module('myApp.controllers').controller('ChatController', ['$scope', '$ti
x = $scope.room.offset - Dimensions.ProfileBoxWidth;
}

$scope.profileBoxStyle.right = x;
$scope.profileBoxStyle.right = x + "px";
$scope.profileBoxStyle['border-top-left-radius'] = facesLeft ? 4 : 0;
$scope.profileBoxStyle['border-bottom-left-radius'] = facesLeft ? 4 : 0;
$scope.profileBoxStyle['border-top-right-radius'] = facesLeft ? 0 : 4;
Expand Down
3 changes: 3 additions & 0 deletions src/angularjs/controllers/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ angular.module('myApp.controllers').controller('LoginController', ['$rootScope',
if (error.code == 'INVALID_USER') {
message = "Invalid email or password.";
}
if (error.code == 'ALREADY_AUTHENTICATING') {
message = "Already Authenticating"
}

$scope.setError(message);

Expand Down
4 changes: 2 additions & 2 deletions src/angularjs/controllers/main-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ angular.module('myApp.controllers').controller('MainAppController', [
$scope.friendsEnabled = Config.friendsEnabled;

$scope.profileBoxStyle = {
right: 250,
width: Dimensions.ProfileBoxWidth,
right: 250 + 'px',
width: Dimensions.ProfileBoxWidth + 'px',
'border-top-left-radius': 4,
'border-bottom-left-radius': 4,
'border-top-right-radius': 0,
Expand Down
1 change: 1 addition & 0 deletions src/angularjs/controllers/main-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ angular.module('myApp.controllers').controller('MainBoxController', ['$scope', '
$scope.updateMainBoxSize = function () {
$scope.mainBoxHeight = Math.max(Screen.screenHeight * 0.5, Dimensions.MainBoxHeight);
$scope.mainBoxWidth = Dimensions.MainBoxWidth;
// console.log("MainBoxHeight: " + $scope.mainBoxHeight);
$timeout(() => {
$scope.$digest();
});
Expand Down
57 changes: 29 additions & 28 deletions src/angularjs/directives/animate-room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,47 @@ import {Utils} from "../services/utils";
import {Log} from "../services/log";

angular.module('myApp.directives').directive('animateRoom', ['$timeout', 'RoomPositionManager', function ($timeout, RoomPositionManager) {
return function (scope: IRoomScope, elm) {
return {
link: function (scope: IRoomScope, elm) {

scope.$on(N.AnimateRoom, (event, args) => {
scope.$on(N.AnimateRoom, (event, args) => {

Log.notification(N.AnimateRoom, 'animateRoom');
Log.notification(N.AnimateRoom, 'animateRoom');

if(args.room == scope.room) {
if (args.room == scope.room) {

if(!Utils.unORNull(args.slot)) {
scope.room.slot = args.slot;
}
if (!Utils.unORNull(args.slot)) {
scope.room.slot = args.slot;
}

// Get the final offset
const toOffset = RoomPositionManager.offsetForSlot(scope.room.slot);
// Get the final offset
const toOffset = RoomPositionManager.offsetForSlot(scope.room.slot);

// Stop the previous animation
$(elm).stop(true, false);
// Stop the previous animation
$(elm).stop(true, false);

let completion = function () {
scope.room.setOffset(toOffset);
let completion = function () {
scope.room.setOffset(toOffset);

scope.room.zIndex = null;
scope.room.zIndex = null;

RoomPositionManager.updateAllRoomActiveStatus();
RoomPositionManager.updateAllRoomActiveStatus();

$timeout(() => {
scope.$digest();
});
};
$timeout(() => {
scope.$digest();
});
};

if(!Utils.unORNull(args.duration) && args.duration == 0) {
completion();
}
else {
// Animate the chat room into position
$(elm).animate({right: toOffset}, !Utils.unORNull(args.duration) ? args.duration : 300 , () =>{
if (!Utils.unORNull(args.duration) && args.duration == 0) {
completion();
});
} else {
// Animate the chat room into position
$(elm).animate({right: toOffset}, !Utils.unORNull(args.duration) ? args.duration : 300, () => {
completion();
});
}
}
}
});
});
}
};
}]);
58 changes: 30 additions & 28 deletions src/angularjs/directives/cc-flash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,36 @@ import {N} from "../keys/notification-keys";
import {IRoomScope} from "../controllers/chat";

angular.module('myApp.directives').directive('ccFlash', ['$timeout', 'Config', function ($timeout, Config) {
return function (scope: IRoomScope, element, attr) {

let originalColor = element.css('background-color');
let originalTag = element.attr('cc-flash');
let animating = false;

scope.$on(N.RoomFlashHeader, (event, room, color, period, tag) => {
if(scope.room == room && color && period && !animating) {
if(!tag || tag == originalTag) {
animating = true;

element.css('background-color', color);

$timeout(() => {
scope.$digest();
});

// Set another timeout
$timeout(() => {
if(tag == "room-header") {
originalColor = Config.headerColor;
}
element.css('background-color', originalColor);
scope.$digest();
animating = false;
}, period);
return {
link: function (scope: IRoomScope, element, attr) {

let originalColor = element.css('background-color');
let originalTag = element.attr('data-cc-flash');
let animating = false;

scope.$on(N.RoomFlashHeader, (event, room, color, period, tag) => {
if (scope.room == room && color && period && !animating) {
if (!tag || tag == originalTag) {
animating = true;

element.css('background-color', color);

$timeout(() => {
scope.$digest();
});

// Set another timeout
$timeout(() => {
if (tag == "room-header") {
originalColor = Config.headerColor;
}
element.css('background-color', originalColor);
scope.$digest();
animating = false;
}, period);
}
}
}
});
});
}
};
}]);
6 changes: 4 additions & 2 deletions src/angularjs/directives/cc-uncloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import * as angular from 'angular'


angular.module('myApp.directives').directive('ccUncloak', function () {
return function (scope, element, attr) {
element.removeAttr('style');
return {
link: function (scope, element, attr) {
element.removeAttr('style');
}
};
});
28 changes: 15 additions & 13 deletions src/angularjs/directives/center-mouse-y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ import {IProfileBoxScope} from "../controllers/user-profile-box";


angular.module('myApp.directives').directive('centerMouseY', ['$document', 'Screen', function ($document, Screen) {
return function (scope: IProfileBoxScope, elm) {
return {
link: function (scope: IProfileBoxScope, elm) {

$(elm).hover(() => {
scope.hover = true;
}, () => {
scope.hover = false;
});
$(elm).hover(() => {
scope.hover = true;
}, () => {
scope.hover = false;
});

$document.mousemove((e) => {
//!elm.is(":hover")
if(scope.currentUser && !scope.hover) {
// Keep the center of this box level with the mouse y
elm.css({bottom: Screen.screenHeight - e.clientY - $(elm).height()/2});
}
});
$(document).mousemove((e) => {
//!elm.is(":hover")
if (scope.currentUser && !scope.hover) {
// Keep the center of this box level with the mouse y
elm.css({bottom: (Screen.screenHeight - e.clientY - $(elm).height() / 2) + 'px'});
}
});
}
};
}]);
12 changes: 7 additions & 5 deletions src/angularjs/directives/consume-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import * as $ from 'jquery'
import {Utils} from "../services/utils";

angular.module('myApp.directives').directive('consumeEvent', [function () {
return function (scope, elm, attrs) {
$(elm).mousedown((e) => {
Utils.stopDefault(e);
return false;
});
return {
link: function (scope, elm, attrs) {
$(elm).mousedown((e) => {
Utils.stopDefault(e);
return false;
});
}
};
}]);
21 changes: 14 additions & 7 deletions src/angularjs/directives/disable-drag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ import * as $ from 'jquery'


angular.module('myApp.directives').directive('disableDrag', ['$rootScope','$document', function ($rootScope, $document) {
return function (scope, elm, attrs) {
return {
link: function (scope, elm, attrs) {

$(elm).mousedown((e) => {
$rootScope.disableDrag = true;
});
$(elm).mousedown((e) => {
$rootScope.disableDrag = true;
});

$document.mouseup((e) => {
$rootScope.disableDrag = false;
});
// TODO: Check this MM1
$(document).mouseup((e) => {
$rootScope.disableDrag = false;
});

// $document.mouseup((e) => {
// $rootScope.disableDrag = false;
// });
}
};
}]);
Loading

0 comments on commit 22b81fa

Please sign in to comment.