vpn.email
Version:
vpn.email client
541 lines (540 loc) • 32 kB
JavaScript
/// <reference path="./../../typings/tsd.d.ts" />
var infoDefine = [
{
home_index_view: {
showing: '展示中...',
install: '客户端安装',
question: '疑问解答',
question_aboutus: '关于Vpn.Email',
question_aboutus_1: 'Vpn.Email是“加拿大Vpn.Email网络安全技术有限公司”开发的一项产品和服务。我们的目标是通过我们掌握的专业知识,服务于我们的客户使其处于安全可靠的网络环境。我们是一家全私有资本的公司,没有任何政府背景或从属于任何组织团体。' +
'',
question_private: '关于信息安全',
question_private_1: '客户信息的安全是本公司赖以生存的基本。我们尽我们的所有力量保护客户的信息,虽然客户在本公司的信息只有Email帐号。客户的支付信息是合作方银行所有的,我们这里得到的信息只是某个Email地址和已支付的金额。' +
'本公司不记录客户产生的具体通讯内容信息。我们保存着期限为3个月的日志文件,内容仅限于: 日期和时间, 目标服务器DNS及IP地址, 链接协议, ' +
'客户端的email地址和通讯字节数,我们会对这些数字进行各类统计和分析工作, 以帮助我们改进并提供更好的服务。为了反恐的需要, 我们会配合持有加拿大法院令的加拿大执法机构提供此日志文件。联系方式为:<a href="mailto:administrator@Vpn.Email" class="fg-hover-lighterBlue">administrator@Vpn.Email</a>。如果您是加拿大以外地区的执法机构并有这方面信息披露的需求,请联系加拿大外交部:<a href="http://www.international.gc.ca" class="fg-hover-lighterBlue" target="_blank">http://www.international.gc.ca/</a>',
question_service: '如何屏蔽我们的服务',
question_service_1: '某些机构不希望使用我们的服务,询问如何屏蔽。我们理解这方面的要求,但非常遗憾的是这不是我们单方面能够完成的。我们建议您屏蔽本公司的域名:Vpn.Email,使用防火墙内部Email系统,并禁止防火墙外部的email IMAP连接,过滤掉含有 Vpn.Email 域名的信件。',
question_production1: '客户端对应哪些系统',
question_production1_1: 'Vpn.Email客户端依赖NodeJS环境,而NodeJS可在Windows, MacOS, Linux等系统运行。我们在检讨浏览器插件方式的客户端,和迷你型可随身携带的无线路由器。',
info: 'Vpn.Email是一种安全通讯手段,通过eMail的IMAP协议建立一个虚拟的专用通道,连接客户端和代理服务器,它的奇妙之处在于客户端和服务器彼此不用知道相互的IP地址,而是通过共用一个eMail账号' +
'进行数据交换,Vpn.Email系统把VPN包加密后,利用IMAP进行通讯,能最大限度的保护您的网络通讯不被检测和干扰,建立一个私密的网络安全环境。',
info1: 'Vpn.Email从原理上和OpenVPN很像,但OpenVPN是把VPN伪装成HTTP或HTTPS,让防火墙误以为使用者是在看一个网站,但它的软肋,就是终端和服务器双方必须知道对方的IP,' +
'而且在使用中过程中通讯信息的指纹明显,容易被现代化的智能防火墙检出和干扰,以致用户不得不经常更新服务器IP地址列表,来和防火墙玩猫抓老鼠的游戏。' +
'Vpn.Email让终端可以链接任何的Email服务器,像Outlook, Yahoo, iCloud,GMX等免费Email服务,来进行VPN通讯。事实上很难甄别普通Email和Vpn.Email通讯Email之间的区别。防火墙又很难封锁这些著名的服务商。' +
'',
info2: 'Vpn.Email通讯的私密优势',
info3: '当您注册为正式用户后,服务器会24小时联机您的通讯Email账户上,随时等待您的连接,而您只要连接上您的Email,就可以进行网络通讯了。通讯采用OpenPGP加密协议,' +
'只有您自己的密匙才能打开Email内容,Vpn.Email系统不保留任何客户的密匙,这意味着Vpn.Email无法检测您的通讯内容。在通讯时,系统会即时删除通讯时遗留的Email。' +
'由于IMAP通讯的特点,您和Vpn.Email交换内容的Email上,是找不到任何您的IP地址信息的。这意味着,不管您在哪里,只要您能连接到您的Email账户,就可以使用Vpn.Email服务,Vpn.Email也不能够知道,您从哪里来。',
info4: '铜墙铁壁般的数据中心',
info5: 'Vpn.Email数据中心采用云结构的服务器集群,分散处理和去中心化设计,会根据客户数量,动态的自动增减处理器数量,每个Vpn.Email服务器均采用经过特殊优化处理的Linux系统,只保留了最基本的系统功能。' +
'所以Vpn.Email服务器能带给客户良好的体验。Vpn.Email在全球各大洲均有代理服务器,可满足大部分客户的需要。' +
'Vpn.Email数据中心还为商业级客户提供其独占的大流量高速服务器,具有强大的计算能力和独享千兆级数据出口。由于Vpn.Email系统结构的特点,我们的数据中心的' +
'服务器集群和数据库服务器集群,均通过IMAP协议相互之间进行通讯,没有任何开放的可供访问的端口,可有效的防治不法入侵,保护客户数据安全。',
welcome: '从此您将可以勇敢地冒险!',
price_title: '注册用户类型',
price_free_1_1: '免费用户',
price_free_1_2: '每月1GB限定流量(最高100MB/天)',
price_free_1_3: '免费',
price_free_2_1: '基本用户',
price_free_2_2: '每月10GB限定流量',
price_free_2_3: '<small class="fg-white">us$</small>1.99<small class="fg-white">/每月</small>',
price_free_3_1: '标准用户',
price_free_3_2: '每月100GB限定流量',
price_free_3_3: '<small class="fg-white">us$</small>5.99<small class="fg-white">/每月</small>',
price_free_4_1: '高级用户',
price_free_4_2: '每月1TB限定流量',
price_free_4_3: '<small class="fg-white">us$</small>9.99<small class="fg-white">/每月</small>',
price_free_5_1: '小型商业用户',
price_free_5_2: '每月2TB,独享主机千兆网络',
price_free_5_3: '<small class="fg-white">us$</small>19.99<small class="fg-white">/每月</small>',
price_free_6_1: '标准商业用户',
price_free_6_2: '每月4TB,独享高速主机千兆网络',
price_free_6_3: '<small class="fg-white">us$</small>39.99<small class="fg-white">/每月</small>',
install_step1_title: 'Vpn.Email是依赖于nodeJS环境,能够运行nodeJS的所有系统,都可作为Vpn.Email客户端。请打开nodeJS的安装页面,挑选对应您的系统的nodeJS安装。',
install_step1: '下载并安装NodeJS',
install_step2: '打开终端,windows系统打开DOS窗口(CMD)'
}
}, {
home_index_view: {
showing: '上演中...',
install: 'ソフトインストール',
question: '問題及答え',
question_aboutus: 'Vpn.Emailとは',
question_aboutus_1: '我々はカナダVpn.Emailネットワークセキュリティー技術有限会社です。Vpn.Emailは我々の開発した製品とサービスです。我々はプロフェッショナルサービスを提供して、お客様のお大事な',
info: 'Vpn.Emailとは、eMailの通信プロトコルIMAPを使用して、端末とサーバの間に、仮想のネットワークトンネルを構築し、さらにVPNをカプセル化にしたことで、どんな端末からも利用することができます。' +
'Vpn.Emailの一番重要な特徴は,端末とサーバの通信がIPアドレスではなく、一つのeMailアカウントを使います。それによって' +
'世界中に安全と自由な通信ができるようになります。',
info1: 'OpenVPNはVPNをカプセル化にしてHTTP又はHTTPSを使用して通信をするですが、基本的には伝統的な端末からVPNサーバへアクセスような特徴を持って変わらないですから、' +
'現代的なファイアウォールはそれを簡単に認識し、通信を破壊されてしまう。Vpn.EmailはOpenVPNに似たような、VPNをカプセル化にして、' +
'IMAPポロトコルで作ったトンネルに、通信を行います。Outlook, Yahoo, iCloudなどのフリーEmailアカウントを使っています、ファイアウォールは' +
'普通のEmailとVpn.EmailのEmailを区分することは難しいでしょう。',
welcome: 'これから、勇気づけられたネットワークのエクスプローラの旅にしましょう。',
info2: 'Vpn.Emailの特徴',
info3: '商用ユーザにはVpn.Emailは24時間、あなたの通信専用Emailアカウントに接続をしています,いつでもVPNセクション立ち上げが可能です。通信データはOpenPGPで暗号化されて、' +
'暗号強度は4096までできます。端末とVpn.Emailサーバの間は同じeMailアカウントでコミュニティをしますから、端末とサーバのIPアドレス交換することは不要です。IMAPで書かれたeMail中身にもIPアドレスはないですから、' +
'Vpn.Emailはユーザが今現在どこから利用していることを、技術的検出することもできないです。',
info4: '金城鉄壁とするデータセンター',
info5: '従来のVPNサーバはIPアドレスをユーザに教えて、端末からVPNの接続を待ちます。Vpn.EmailサーバはユーザeMailアカウントに接続をしますから、Vpn.EmailサーバIPアドレスの公開必要がないです。' +
'従って、Vpn.Emailデータセンターはデータアクセスポートを全部閉じています。外から一切接続を拒否します。サーバの間もIMAPを使って通信をしますから、最もセキュリティーの強いサーバになっています。' +
'Vpn.Emailサーバは必要の最低限、最適されたLinuxOSをベースに、クラウド技術を使用しています、分散化したクラスターを一つのクラスタリングにします。ユーザのニーズに従って' +
'自動的オンデマンドでサーバの数を増減に対応します。特に通信量の多いと通信速度を追求したビジネスユーザにも、独占専用のパワーフルサーバも用意しております。',
price_title: 'アカンウトタイプ',
price_free_1_1: 'フリーユーザー',
price_free_1_2: '1GBまで (Max100MB/日)',
price_free_1_3: 'フリー',
price_free_2_1: '普通ユーザー',
price_free_2_2: '10GBまで',
price_free_2_3: '<small class="fg-white">us$</small>1.99<small class="fg-white">/月</small>',
price_free_3_1: 'プレミアムユーザー',
price_free_3_2: '100GBまで',
price_free_3_3: '<small class="fg-white">us$</small>5.99<small class="fg-white">/月</small>',
price_free_4_1: 'パワーユーザー',
price_free_4_2: '1TBまで',
price_free_4_3: '<small class="fg-white">us$</small>9.99<small class="fg-white">/月</small>',
price_free_5_1: 'スモールビジネス',
price_free_5_2: '2TB 独占サーバ',
price_free_5_3: '<small class="fg-white">us$</small>19.99<small class="fg-white">/月</small>',
price_free_6_1: 'ビジネスユーザー',
price_free_6_2: '4TB 独占高速サーバ',
price_free_6_3: '<small class="fg-white">us$</small>39.99<small class="fg-white">/月</small>',
install_step1: 'インストール NodeJS'
}
}, {
home_index_view: {
info: 'Vpn.Email is the one of the powerful and easiest VPN software. Vpn.Email use email IMAP protocol to make a virtual tunnel that exchanges VPN packets between ' +
'VPN clients and VPN servers. The excellent point is Vpn.Email exchanges data by a email account, client and server do not need IP address. Nobody know where you from even Vpn.Email system. ',
welcome: "Lets explore the world without fear!",
install: 'Install',
question_aboutus: 'About us',
question_aboutus_1: 'Vpn.Email network security technolog Canada Ltd',
question: 'Question & answer',
showing: 'Showing...',
info1: 'Vpn.Email is similar as OpenVPN. OpenVPN uses HTTPS protocol in order to establish a VPN tunnel. let firewall think it is normal http access. But OpenVPN have a lot of commercial trait when used be established through firewalls. ' +
"Even the firewall do not need know what is the detail. So OpenVPN clients need reflash gatway server's IP list and find out the working one. Vpn.Email package VPN to a email use IMAP protocol commercial between server and client. " +
" Client can use a lot of popular free email provider like Yahoo, Outlook, GMX for use Vpn.Email system transparency for firewalls.",
info2: 'Vpn.Email feature',
info3: "The Vpn.Email server will connect the client email account 24 hours when you have a paid account. The server always wait client establish VPN connection. The append email via IMAP protocol have not any IP address detail in mail header. You can use Vpn.Email " +
" whatever you are from just you can access your email account. Also Vpn.Email have no means can reach your IP address. Vpn.Email system use OpenPGP to encrypt & decrypt each email. Vpn.Email have not record any client's privkey and password. ",
info4: 'Strong data center',
info5: "Vpn.Email provides cloud server cluster that is base with clients needs (on-demand). It isolate between each clients. It use security IMAP protocol commercial transactions between database center and client servers." +
"Each server used lightweight, security, ultra-optimized, based on the Linux kernel. Only the minimal functionality required. " +
"Vpn.Email have multiple datacenter locations. Provides business users powerfull and TB bandwidth network private hosting.",
price_title: 'Account type',
price_free_1_1: 'Free User',
price_free_1_2: '1GB/Mouth(Max 100MB/day)',
price_free_1_3: 'Free',
price_free_2_1: 'Basic User',
price_free_2_2: '10GB/Mouth',
price_free_2_3: '<small class="fg-white">us$</small>1.99<small class="fg-white">/mouth</small>',
price_free_3_1: 'Premium User',
price_free_3_2: '100GB<small class="fg-white">/Mouth</small>',
price_free_3_3: '<small class="fg-white">us$</small>5.99<small class="fg-white">/mouth</small>',
price_free_4_1: 'Power User',
price_free_4_2: '1TB/Mouth',
price_free_4_3: '<small class="fg-white">us$</small>9.99<small class="fg-white">/mouth</small>',
price_free_5_1: 'Small Business',
price_free_5_2: '2TB/M Exclusive Host',
price_free_5_3: '<small class="fg-white">us$</small>19.99<small class="fg-white">/mouth</small>',
price_free_6_1: 'Business',
price_free_6_2: '4TB/M Exclusive Fast Host',
price_free_6_3: '<small class="fg-white">us$</small>39.99<small class="fg-white">/mouth</small>',
install_step1: 'Install NodeJS'
}
}
];
var cookieName = 'langEH';
var lang;
(function (lang) {
lang[lang['zh'] = 0] = 'zh';
lang[lang['ja'] = 1] = 'ja';
lang[lang['en'] = 2] = 'en';
})(lang || (lang = {}));
var initLanguageCookie = function () {
var cc = $.cookie(cookieName);
if (cc == undefined || cc == "") {
cc = window.navigator.language;
}
if (cc == undefined || cc == "")
cc = 'en';
cc = cc.substr(0, 2).toLocaleLowerCase();
switch (cc) {
case 'zh':
break;
case 'en':
break;
case 'ja':
break;
default:
cc = 'en';
}
$.cookie("langEH", cc, { expires: 180, path: '/' });
$("html").trigger('languageMenu', cc);
return cc;
};
var eleFlash = function (ele, red, returnColor, length) {
for (var i = 0; i < length; i++) {
setTimeout(function () {
ele.animate({ fill: red ? 'red' : 'green' }, 7, null, function () {
ele.attr({ fill: returnColor });
});
}, i * 50);
}
};
var svgAnimation1 = (function () {
function svgAnimation1() {
var _this = this;
this.y = Snap('#snapVpn');
this.ele1 = $('#snapVpn');
this.weight = (this.ele1.width() > 200)
? this.ele1.width() - 200
: 300;
this.showInfo1 = this.y.g().attr({ fill: 'rgba(255,255,00,.7)', "font-size": "18px", opacity: 1 });
this.showInfo2 = this.y.g().attr({ fill: 'red', "font-size": "18px", opacity: 1 });
this.localRbgServerPoint = 0;
this.fireWallWorking = false;
this.fireWall = {
tagRle: this.y.group().attr({ fill: svgAnimation1.rgb_firewall, class: 'mouse-pointer' }),
x: this.weight * 0.5,
y: 40,
RGB: svgAnimation1.rgb_firewall,
time: 1000
};
this.vpnviaEmail = {
tagRle: this.y.group().attr({ fill: svgAnimation1.rgb_client, opacity: 0, class: 'mouse-pointer' }),
x: this.weight * .9,
y: 150,
RGB: svgAnimation1.rgb_client,
time: 500
};
this.client = {
tagRle: this.y.group().attr({ fill: svgAnimation1.rgb_client, class: 'mouse-pointer' }),
x: 50,
y: 40,
RGB: svgAnimation1.rgb_client,
time: 1000
};
this.mailServer = {
tagRle: this.y.group().attr({ fill: '#FFFFFF', opacity: 0, class: 'mouse-pointer' }),
x: this.weight,
y: 40,
RGB: '#FFFFFF',
time: 1000
};
this.server = {
tagRle: this.y.group().attr({ fill: svgAnimation1.rgb_client, class: 'mouse-pointer' }),
x: this.weight,
y: 40,
RGB: svgAnimation1.rgb_client,
time: 1000
};
this.vpn = function (showText, wText, callback) {
if (wText === void 0) { wText = null; }
_this.fireWallWorking = false;
var FirewallRoute = {
iele: _this.fireWall,
downOut: true,
next: {
iele: _this.client,
downOut: false,
next: null
}
};
var VpnViaEmail = showText === 'Vpn.Email';
var serverToClinet = VpnViaEmail
? {
iele: _this.vpnviaEmail,
downOut: false,
next: {
iele: _this.mailServer,
downOut: false,
next: FirewallRoute
}
}
: {
iele: _this.server,
downOut: false,
next: FirewallRoute
};
var afterFireWallRoute = VpnViaEmail
? {
iele: _this.mailServer,
downOut: false,
next: {
iele: _this.vpnviaEmail,
downOut: false,
next: serverToClinet
}
}
: {
iele: _this.server,
downOut: false,
next: serverToClinet
};
var cliectToServer = {
iele: _this.client,
downOut: false,
next: {
iele: _this.fireWall,
downOut: true,
next: afterFireWallRoute,
showText: true
}
};
_this.showInfo1.remove();
_this.showInfo2.remove();
_this.showInfo1 = _this.y.g().attr({ fill: 'rgba(255,255,00,1)', "font-size": "18px", opacity: 0 });
_this.showInfo2 = _this.y.g().attr({ fill: 'red', "font-size": "18px", opacity: 0 });
_this.server.RGB = svgAnimation1.rgb_client;
if (VpnViaEmail) {
//this.server.tagRle.animate({opacity: 0}, 1000, mina.easeinout)
_this.outServer();
_this.vpnviaEmail.tagRle.animate({ opacity: 1 }, 1000, mina.easein);
_this.mailServer.tagRle.animate({ opacity: 1 }, 1000, mina.easein);
_this.showInfo1.text(_this.weight * 0.5, 50, 'email?');
}
else {
//this.server.tagRle.animate({opacity: 1}, 1000, mina.easein)
_this.showServer();
_this.showInfo1.text(_this.weight * 0.5, 50, (showText === 'VPN')
? '??'
: 'http?');
_this.showInfo2.text(_this.weight * 0.5, 50, showText + '!');
_this.vpnviaEmail.tagRle.animate({ opacity: 0 }, 1000, mina.easeout);
_this.mailServer.tagRle.animate({ opacity: 0 }, 1000, mina.easeinout);
}
var i = 0;
var callBack = function () {
i++;
if (!VpnViaEmail && i == 2) {
_this.fireWallWorking = true;
}
if (!VpnViaEmail && i == 4) {
_this.fireWallWorking = false;
_this.showServer();
}
if (!VpnViaEmail && i == 6) {
_this.fireWallWorking = true;
}
if (i < 10)
return _this.goData(cliectToServer, 5, callBack);
callback();
};
_this.goData(cliectToServer, 5, callBack);
};
this.y.attr({ height: 200 });
Snap.load('/images/client_1.svg', function (f) {
var t = new Snap.Matrix();
t.scale(2);
t.translate(10, 10);
_this.client.tagRle.append(f);
_this.client.tagRle.transform(t);
});
Snap.load('/images/svg_firewall.svg', function (f) {
var t = new Snap.Matrix();
t.scale(2);
var point = _this.weight * 0.2;
t.translate(point, 0);
_this.fireWall.tagRle.append(f);
_this.fireWall.tagRle.transform(t);
});
Snap.load('/images/vpnemail.svg', function (f) {
var t = new Snap.Matrix();
t.translate(_this.weight, 0);
t.scale(2);
_this.mailServer.tagRle.append(f);
_this.mailServer.tagRle.transform(t);
});
Snap.load('/images/svg_server1.svg', function (f) {
//const t = new Snap.Matrix()
//t.translate(this.weight * .85, 100)
//t.scale(2)
_this.vpnviaEmail.tagRle.append(f);
//this.vpnviaEmail.tagRle.transform(t);
_this.vpnviaEmail.tagRle.transform('translate(' + _this.weight * .85 + ',100) scale(2)');
});
Snap.load('/images/svg_server1.svg', function (f) {
//const t = new Snap.Matrix()
//t.translate (this.weight ,0)
//t.scale (2)
_this.server.tagRle.append(f);
_this.server.tagRle.transform('translate(' + _this.weight + ') scale(2)');
//this.server.tagRle.transform(t)
//this.vpnviaEmail.tagRle.animate ({x:this.weight * .85, y:100, scale: 2})
});
}
svgAnimation1.prototype.goNext = function (textEle, rote, time, length, callback) {
var _this = this;
textEle.animate({ x: rote.iele.x, y: rote.iele.y, fill: 'rgba(255,255,255,.1)' }, time, null, function () {
if (rote.showText) {
if (_this.fireWallWorking) {
if (_this.showInfo2) {
Snap.animate(0, 1, function (v) {
_this.showInfo2.attr({ 'font-size': v * 40, opacity: v });
}, 1500, mina.bounce, function () {
_this.showInfo2.attr({ opacity: 0 });
});
}
}
else {
Snap.animate(0, 1, function (v) {
_this.showInfo1.attr({ 'font-size': v * 50, opacity: v });
}, 1500, mina.bounce, function () {
_this.showInfo1.attr({ opacity: 0 });
});
}
}
eleFlash(rote.iele.tagRle, rote.downOut && _this.fireWallWorking, rote.iele.RGB, length);
if (rote.downOut && _this.fireWallWorking) {
return textEle.animate({ y: 150 }, 200, null, callback);
}
if (rote.next)
return _this.goNext(textEle, rote.next, rote.next.iele.time, length, callback);
textEle.remove();
callback();
});
};
svgAnimation1.prototype.goData = function (rotes, length, callback) {
var _this = this;
var myGroup = this.y.g().attr({ fill: 'rgba(255,255,255,0)', "font-size": "18px" });
var _loop_1 = function(i) {
var n = myGroup.text(rotes.iele.x, rotes.iele.y, Math.round(Math.random()).toString());
setTimeout(function () {
_this.goNext(n, rotes, rotes.iele.time, length, function () {
n.remove();
if (i === length - 1)
return callback();
});
}, i * 50);
};
for (var i = 0; i < length; i++) {
_loop_1(i);
}
};
svgAnimation1.prototype.showServer = function () {
var _this = this;
this.server.tagRle.animate({ transform: "translate(" + (this.weight + 200) + ") scale(2)" }, 500, mina.easeinout, function () {
_this.server.tagRle.attr({ fill: svgAnimation1.rbgServer[_this.localRbgServerPoint] });
_this.server.RGB = svgAnimation1.rbgServer[_this.localRbgServerPoint];
_this.localRbgServerPoint++;
if (_this.localRbgServerPoint == svgAnimation1.rbgServer.length)
_this.localRbgServerPoint = 0;
_this.server.tagRle.animate({ transform: "translate(" + _this.weight + ") scale(2) " }, 500, mina.easein);
});
};
svgAnimation1.prototype.outServer = function () {
this.server.tagRle.animate({ transform: "translate(" + (this.weight + 400) + ") scale(2)" }, 1000, mina.easeinout);
};
svgAnimation1.rgb_firewall = 'rgba(255,80,80,0.1)';
svgAnimation1.rgb_client = 'rgba(255,255,255,.5)';
svgAnimation1.rgb_client1 = 'rgba(255,70,0,.5)';
svgAnimation1.rbgServer = [
'rgba(255,70,0,.5)', 'rgba(255,70,255,.5)', 'rgba(255,250,70,.5)'
];
return svgAnimation1;
}());
var view_layout;
(function (view_layout) {
var view = (function () {
function view() {
var _this = this;
this.languageIndex = ko.observable(lang[view.tLang]);
this.dataJson = ko.observable(infoDefine[this.languageIndex()]);
this.languageList = ko.observableArray(view.Menu[view.tLang]);
this.home_index_view = ko.observable(this.dataJson().home_index_view);
this.currentSelected = ko.observable(this.languageList()[0]);
this.VpnRunning = ko.observable(false);
this.VpnViaEmailRunning = ko.observable(false);
this.OpenVPNlRunning = ko.observable(false);
this.language = ko.observable(initLanguageCookie());
this.selectItem = function (that, site) {
var self = _this;
_this.language(site.LanguageJsonName);
view.tLang = site.LanguageJsonName;
self.languageIndex(lang[view.tLang]);
self.dataJson(infoDefine[self.languageIndex()]);
self.home_index_view(self.dataJson().home_index_view);
self.languageList(view.Menu[view.tLang]);
self.currentSelected(self.languageList()[0]);
$("html").trigger('languageMenu', view.tLang);
$.cookie("langEH", view.tLang, { expires: 180, path: '/' });
};
}
view.prototype.vpnViaEmailClick = function () {
var _this = this;
this.VpnViaEmailRunning(true);
view.svgAnimation.vpn('Vpn.Email', 'email', function () {
_this.VpnViaEmailRunning(false);
});
};
view.prototype.vpnClick = function () {
var _this = this;
this.VpnRunning(true);
view.svgAnimation.vpn('VPN', '', function () {
_this.VpnRunning(false);
});
};
view.prototype.openVenClick = function () {
var _this = this;
this.OpenVPNlRunning(true);
view.svgAnimation.vpn('OpenVPN', 'html', function () {
_this.OpenVPNlRunning(false);
});
};
view.tLang = initLanguageCookie();
view.Menu = {
'zh': [{
LanguageJsonName: 'zh',
showName: '中文',
icon: 'flag-icon-cn'
},
{
LanguageJsonName: 'en',
showName: '英文/English',
icon: 'flag-icon-gb'
},
{
LanguageJsonName: 'ja',
showName: '日文/日本語',
icon: 'flag-icon-jp'
}],
'ja': [{
LanguageJsonName: 'ja',
showName: '日本語',
icon: 'flag-icon-jp'
},
{
LanguageJsonName: 'en',
showName: '英語/English',
icon: 'flag-icon-gb'
},
{
LanguageJsonName: 'zh',
showName: '中国語/中文',
icon: 'flag-icon-cn'
}],
'en': [{
LanguageJsonName: 'en',
showName: 'English',
icon: 'flag-icon-gb'
},
{
LanguageJsonName: 'ja',
showName: 'Japanese/日本語',
icon: 'flag-icon-jp'
},
{
LanguageJsonName: 'zh',
showName: 'Chinese/中文',
icon: 'flag-icon-cn'
}
]
};
view.svgAnimation = new svgAnimation1();
return view;
}());
view_layout.view = view;
})(view_layout || (view_layout = {}));
var viewLayout = new view_layout.view();
ko.applyBindings(viewLayout, document.getElementById("html"));
initLanguageCookie();