diff options
| author | RblSb <msrblsb@gmail.com> | 2021-06-06 20:22:19 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2021-06-06 20:22:56 +0300 |
| commit | 13127249ddd1f61f8ed6b75803b0de1f4d25f96e (patch) | |
| tree | bfb359bbdf1ab7f4b7c470e54fd4e210dddb7448 /res | |
| parent | 03f81af4259c6b58dbef4dfda4683af8a6980759 (diff) | |
Less silly logins
And Haxe update
Diffstat (limited to 'res')
| -rw-r--r-- | res/client.js | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/res/client.js b/res/client.js index b07e727..692b833 100644 --- a/res/client.js +++ b/res/client.js @@ -1,4 +1,4 @@ -// Generated by Haxe 4.1.5 +// Generated by Haxe 4.2.2 (function ($hx_exports, $global) { "use strict"; $hx_exports["client"] = $hx_exports["client"] || {}; $hx_exports["client"]["JsApi"] = $hx_exports["client"]["JsApi"] || {}; @@ -9,11 +9,12 @@ function $extend(from, fields) { if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString; return proto; } -var ClientGroup = $hxEnums["ClientGroup"] = { __ename__ : true, __constructs__ : ["User","Leader","Admin"] - ,User: {_hx_index:0,__enum__:"ClientGroup",toString:$estr} - ,Leader: {_hx_index:1,__enum__:"ClientGroup",toString:$estr} - ,Admin: {_hx_index:2,__enum__:"ClientGroup",toString:$estr} +var ClientGroup = $hxEnums["ClientGroup"] = { __ename__:true,__constructs__:null + ,User: {_hx_name:"User",_hx_index:0,__enum__:"ClientGroup",toString:$estr} + ,Leader: {_hx_name:"Leader",_hx_index:1,__enum__:"ClientGroup",toString:$estr} + ,Admin: {_hx_name:"Admin",_hx_index:2,__enum__:"ClientGroup",toString:$estr} }; +ClientGroup.__constructs__ = [ClientGroup.User,ClientGroup.Leader,ClientGroup.Admin]; var Client = function(name,group) { this.name = name; var i = group; @@ -1836,7 +1837,7 @@ client_Main.prototype = { client_Settings.write(this.settings); } ,hasPermission: function(group,permission) { - return Reflect.field(this.config.permissions,$hxEnums[group.__enum__].__constructs__[group._hx_index].toLowerCase()).indexOf(permission) != -1; + return Reflect.field(this.config.permissions,$hxEnums[group.__enum__].__constructs__[group._hx_index]._hx_name.toLowerCase()).indexOf(permission) != -1; } ,toggleLeader: function() { this.setLeaderButton((this.personal.group & 2) == 0); @@ -3181,7 +3182,7 @@ haxe_http_HttpJs.prototype = $extend(haxe_http_HttpBase.prototype,{ } catch( _g ) { s = null; } - if(s == 0 && typeof(window) != "undefined" && $global.location != null) { + if(s == 0 && js_Browser.get_supported() && $global.location != null) { var protocol = $global.location.protocol.toLowerCase(); if(new EReg("^(?:about|app|app-storage|.+-extension|file|res|widget):$","").match(protocol)) { s = r.response != null ? 200 : 404; @@ -3225,9 +3226,9 @@ haxe_http_HttpJs.prototype = $extend(haxe_http_HttpBase.prototype,{ if(this.async) { r.onreadystatechange = onreadystatechange; } - var _g = this.postBytes; - var _g1 = this.postData; - var uri = _g1 == null ? _g == null ? null : new Blob([_g.b.bufferValue]) : _g == null ? _g1 : null; + var _g = this.postData; + var _g1 = this.postBytes; + var uri = _g == null ? _g1 == null ? null : new Blob([_g1.b.bufferValue]) : _g1 == null ? _g : null; if(uri != null) { post = true; } else { @@ -3378,16 +3379,18 @@ haxe_io_Bytes.prototype = { return s; } }; -var haxe_io_Encoding = $hxEnums["haxe.io.Encoding"] = { __ename__ : true, __constructs__ : ["UTF8","RawNative"] - ,UTF8: {_hx_index:0,__enum__:"haxe.io.Encoding",toString:$estr} - ,RawNative: {_hx_index:1,__enum__:"haxe.io.Encoding",toString:$estr} +var haxe_io_Encoding = $hxEnums["haxe.io.Encoding"] = { __ename__:true,__constructs__:null + ,UTF8: {_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:$estr} + ,RawNative: {_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:$estr} }; -var haxe_io_Error = $hxEnums["haxe.io.Error"] = { __ename__ : true, __constructs__ : ["Blocked","Overflow","OutsideBounds","Custom"] - ,Blocked: {_hx_index:0,__enum__:"haxe.io.Error",toString:$estr} - ,Overflow: {_hx_index:1,__enum__:"haxe.io.Error",toString:$estr} - ,OutsideBounds: {_hx_index:2,__enum__:"haxe.io.Error",toString:$estr} - ,Custom: ($_=function(e) { return {_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:$estr}; },$_.__params__ = ["e"],$_) +haxe_io_Encoding.__constructs__ = [haxe_io_Encoding.UTF8,haxe_io_Encoding.RawNative]; +var haxe_io_Error = $hxEnums["haxe.io.Error"] = { __ename__:true,__constructs__:null + ,Blocked: {_hx_name:"Blocked",_hx_index:0,__enum__:"haxe.io.Error",toString:$estr} + ,Overflow: {_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:$estr} + ,OutsideBounds: {_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:$estr} + ,Custom: ($_=function(e) { return {_hx_index:3,e:e,__enum__:"haxe.io.Error",toString:$estr}; },$_._hx_name="Custom",$_.__params__ = ["e"],$_) }; +haxe_io_Error.__constructs__ = [haxe_io_Error.Blocked,haxe_io_Error.Overflow,haxe_io_Error.OutsideBounds,haxe_io_Error.Custom]; var haxe_io_Path = function(path) { switch(path) { case ".":case "..": @@ -3459,8 +3462,8 @@ js_Boot.__string_rec = function(o,s) { case "object": if(o.__enum__) { var e = $hxEnums[o.__enum__]; - var n = e.__constructs__[o._hx_index]; - var con = e[n]; + var con = e.__constructs__[o._hx_index]; + var n = con._hx_name; if(con.__params__) { s = s + "\t"; return n + "(" + ((function($this) { @@ -3536,6 +3539,13 @@ js_Boot.__string_rec = function(o,s) { }; var js_Browser = function() { }; js_Browser.__name__ = true; +js_Browser.get_supported = function() { + if(typeof(window) != "undefined" && typeof(window.location) != "undefined") { + return typeof(window.location.protocol) == "string"; + } else { + return false; + } +}; js_Browser.getLocalStorage = function() { try { var s = window.localStorage; |
