diff --git a/index.html b/index.html index f87c1af..797fd8e 100644 --- a/index.html +++ b/index.html @@ -18,11 +18,14 @@ @@ -52,12 +55,28 @@ $('#tel').html(session.get('tel')); $('#email').html(session.get('email')); $('#group').html(session.get('group')); + $('#lang').html(((session.get('lang'))?atob(session.get('lang')):'')); $('#update').show(); $('#logout').show(); }); $("#update").click(function(){ + if(page.tran.getLang() == 'zh'){ + var title = '更新信息'; + var nickname = '昵称'; + var tel = '手机号'; + var email = '邮箱'; + var lan = '重置语言偏好'; + var close = '关闭'; + }else{ + var title = 'Update Info'; + var nickname = 'Nickname'; + var tel = 'Tel'; + var email = 'Email'; + var lan = 'Reset Language Preference'; + var close = 'close'; + } tips.question({ timeout: 20000, close: false, @@ -65,23 +84,29 @@ displayMode: 'once', //id: 'question', zindex: 999, - title: 'Update', + title: title, message: '', position: 'center', buttons: [ - ['', function (instance, toast) { + ['', function (instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); window.location.href = 'https://login.yimian.xyz/?require=nickname&from=https://user.yimian.xyz/'; }, true], - ['', function (instance, toast) { + ['', function (instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); window.location.href = 'https://login.yimian.xyz/?require=tel&from=https://user.yimian.xyz/'; }, true], - ['', function (instance, toast) { + ['', function (instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); window.location.href = 'https://login.yimian.xyz/?require=email&from=https://user.yimian.xyz/'; }, true], - ['', function (instance, toast) { + ['', function (instance, toast) { + instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); + session.del('lang'); + session.del('nolang'); + $('#lang').html(''); + }, true], + ['', function (instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); }, true], ]