mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Code review changes
This commit is contained in:
parent
2f1f1d896c
commit
1aaaca4e6c
4 changed files with 21 additions and 21 deletions
|
@ -945,7 +945,7 @@ Function HandlePostInstallOptions
|
|||
Delete "$SMSTARTUP\@PRE_SANDBOX_CONSOLE_SHORTCUT_NAME@.lnk"
|
||||
|
||||
; make a startup shortcut in this user's current context
|
||||
; use the console shortcut name regardless of server/interface install
|
||||
; use the console shortcut name regardless of server/interface install
|
||||
SetShellVarContext current
|
||||
CreateShortCut "$SMSTARTUP\@CONSOLE_HF_SHORTCUT_NAME@.lnk" "$INSTDIR\@CONSOLE_INSTALL_SUBDIR@\@CONSOLE_WIN_EXEC_NAME@"
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ AccountInfo.prototype = {
|
|||
case VariantTypes.USER_TYPE:
|
||||
//user type
|
||||
var userTypeName = this._parseByteArray().toString('ascii').slice(0,-1);
|
||||
if (userTypeName == "DataServerAccountInfo") {
|
||||
if (userTypeName === "DataServerAccountInfo") {
|
||||
return this._parseDataServerAccountInfo();
|
||||
}
|
||||
else {
|
||||
|
@ -77,7 +77,7 @@ AccountInfo.prototype = {
|
|||
},
|
||||
_parseByteArray: function () {
|
||||
var length = this._parseUInt32();
|
||||
if (length == 0xffffffff) {
|
||||
if (length === 0xffffffff) {
|
||||
return null;
|
||||
}
|
||||
var result = this.rawData.slice(this.parseOffset, this.parseOffset+length);
|
||||
|
@ -91,7 +91,7 @@ AccountInfo.prototype = {
|
|||
}
|
||||
// length in bytes;
|
||||
var length = this._parseUInt32();
|
||||
if (length == 0xFFFFFFFF) {
|
||||
if (length === 0xFFFFFFFF) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ const osType = os.type();
|
|||
exports.getBuildInfo = function() {
|
||||
var buildInfoPath = null;
|
||||
|
||||
if (osType == 'Windows_NT') {
|
||||
if (osType === 'Windows_NT') {
|
||||
buildInfoPath = path.join(path.dirname(process.execPath), 'build-info.json');
|
||||
} else if (osType == 'Darwin') {
|
||||
} else if (osType === 'Darwin') {
|
||||
var contentPath = ".app/Contents/";
|
||||
var contentEndIndex = __dirname.indexOf(contentPath);
|
||||
|
||||
|
@ -67,9 +67,9 @@ exports.startInterface = function(url) {
|
|||
}
|
||||
|
||||
exports.isInterfaceRunning = function(done) {
|
||||
if (osType == 'Windows_NT') {
|
||||
if (osType === 'Windows_NT') {
|
||||
var pInterface = new Process('interface', 'interface.exe');
|
||||
} else if (osType == 'Darwin') {
|
||||
} else if (osType === 'Darwin') {
|
||||
var pInterface = new Process('interface', 'interface');
|
||||
}
|
||||
return pInterface.isRunning(done);
|
||||
|
@ -78,13 +78,13 @@ exports.isInterfaceRunning = function(done) {
|
|||
|
||||
exports.getRootHifiDataDirectory = function(local) {
|
||||
var organization = buildInfo.organization;
|
||||
if (osType == 'Windows_NT') {
|
||||
if (osType === 'Windows_NT') {
|
||||
if (local) {
|
||||
return path.resolve(osHomeDir(), 'AppData/Local', organization);
|
||||
} else {
|
||||
return path.resolve(osHomeDir(), 'AppData/Roaming', organization);
|
||||
}
|
||||
} else if (osType == 'Darwin') {
|
||||
} else if (osType === 'Darwin') {
|
||||
return path.resolve(osHomeDir(), 'Library/Application Support', organization);
|
||||
} else {
|
||||
return path.resolve(osHomeDir(), '.local/share/', organization);
|
||||
|
|
|
@ -51,8 +51,8 @@ HifiNotification.prototype = {
|
|||
var app = null;
|
||||
switch (this.type) {
|
||||
case NotificationType.GOTO:
|
||||
if (typeof(this.data) == "number") {
|
||||
if (this.data == 1) {
|
||||
if (typeof(this.data) === "number") {
|
||||
if (this.data === 1) {
|
||||
text = "You have " + this.data + " event invitation pending."
|
||||
} else {
|
||||
text = "You have " + this.data + " event invitations pending."
|
||||
|
@ -67,8 +67,8 @@ HifiNotification.prototype = {
|
|||
break;
|
||||
|
||||
case NotificationType.PEOPLE:
|
||||
if (typeof(this.data) == "number") {
|
||||
if (this.data == 1) {
|
||||
if (typeof(this.data) === "number") {
|
||||
if (this.data === 1) {
|
||||
text = this.data + " of your connections is online."
|
||||
} else {
|
||||
text = this.data + " of your connections are online."
|
||||
|
@ -83,8 +83,8 @@ HifiNotification.prototype = {
|
|||
break;
|
||||
|
||||
case NotificationType.WALLET:
|
||||
if (typeof(this.data) == "number") {
|
||||
if (this.data == 1) {
|
||||
if (typeof(this.data) === "number") {
|
||||
if (this.data === 1) {
|
||||
text = "You have " + this.data + " unread Wallet transaction.";
|
||||
} else {
|
||||
text = "You have " + this.data + " unread Wallet transactions.";
|
||||
|
@ -99,8 +99,8 @@ HifiNotification.prototype = {
|
|||
break;
|
||||
|
||||
case NotificationType.MARKETPLACE:
|
||||
if (typeof(this.data) == "number") {
|
||||
if (this.data == 1) {
|
||||
if (typeof(this.data) === "number") {
|
||||
if (this.data === 1) {
|
||||
text = this.data + " of your purchased items has an update available.";
|
||||
} else {
|
||||
text = this.data + " of your purchased items have updates available.";
|
||||
|
@ -124,7 +124,7 @@ HifiNotification.prototype = {
|
|||
},
|
||||
function (error, reason, metadata) {
|
||||
if(_finished) {
|
||||
if (osType == 'Darwin') {
|
||||
if (osType === 'Darwin') {
|
||||
setTimeout(_finished, OSX_CLICK_DELAY_TIMEOUT);
|
||||
} else {
|
||||
_finished();
|
||||
|
@ -215,7 +215,7 @@ HifiNotifications.prototype = {
|
|||
_showNotification: function () {
|
||||
var _this = this;
|
||||
|
||||
if (osType == 'Darwin') {
|
||||
if (osType === 'Darwin') {
|
||||
this.pendingNotifications[0].show(function () {
|
||||
// For OSX
|
||||
// don't attempt to show the next notification
|
||||
|
@ -238,7 +238,7 @@ HifiNotifications.prototype = {
|
|||
},
|
||||
_addNotification: function (notification) {
|
||||
this.pendingNotifications.push(notification);
|
||||
if(this.pendingNotifications.length == 1) {
|
||||
if(this.pendingNotifications.length === 1) {
|
||||
this._showNotification();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue