mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-14 15:11:24 +00:00
注销账户
This commit is contained in:
@@ -2010,6 +2010,20 @@ function userMenu(allUsers) {
|
||||
click: function(e) {
|
||||
}
|
||||
});
|
||||
|
||||
// 注销
|
||||
this.logout = new gui.MenuItem({
|
||||
label: getMsg('Logout'),
|
||||
click: function(e) {
|
||||
Loading.show();
|
||||
onClose(function () {
|
||||
UserService.logout(function () {
|
||||
toLogin();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.switchAccount = new gui.MenuItem({
|
||||
label: getMsg('Add account'),
|
||||
click: function(e) {
|
||||
@@ -2036,7 +2050,6 @@ function userMenu(allUsers) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.menu.append(this.email);
|
||||
if (!UserInfo.IsLocal) {//hide sync menu for local account
|
||||
this.blog = new gui.MenuItem({
|
||||
@@ -2048,6 +2061,7 @@ function userMenu(allUsers) {
|
||||
this.menu.append(this.blog);
|
||||
}
|
||||
this.menu.append(new gui.MenuItem({ type: 'separator' }));
|
||||
this.menu.append(this.logout);
|
||||
this.menu.append(this.switchAccount);
|
||||
this.menu.append(allUsersMenu);
|
||||
this.menu.append(new gui.MenuItem({ type: 'separator' }));
|
||||
@@ -2058,9 +2072,9 @@ function userMenu(allUsers) {
|
||||
this.menu.append(themeMenu);
|
||||
}
|
||||
|
||||
var height = 230;
|
||||
var height = 260;
|
||||
if (UserInfo.IsLocal) {
|
||||
height = 200;
|
||||
height = 230;
|
||||
}
|
||||
if(!isMac()) {
|
||||
this.menu.append(new gui.MenuItem({ type: 'separator' }));
|
||||
|
@@ -1503,7 +1503,7 @@ function goToMainPage() {
|
||||
win.loadUrl('file://' + __dirname + '/note.html?from=login');
|
||||
}
|
||||
|
||||
function _switchAccount() {
|
||||
function toLogin() {
|
||||
var BrowserWindow = gui.remote.require('browser-window');
|
||||
if(isMac()) {
|
||||
var win = new BrowserWindow({ width: 278, height: 326, show: true, frame: false, resizable: false });
|
||||
@@ -1517,14 +1517,14 @@ function _switchAccount() {
|
||||
// 添加用户
|
||||
function switchAccount() {
|
||||
onClose(function () {
|
||||
_switchAccount();
|
||||
toLogin();
|
||||
});
|
||||
}
|
||||
|
||||
// 当没有用户时, 切换之
|
||||
function switchToLoginWhenNoUser() {
|
||||
Server.close(function () {
|
||||
_switchAccount();
|
||||
toLogin();
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -88,6 +88,7 @@
|
||||
"loginSuccess": "登录成功, 正在跳转",
|
||||
"logining": "正在登录",
|
||||
"logout": "退出",
|
||||
"Logout": "注销",
|
||||
"minLength": "长度至少为%s",
|
||||
"Move": "移动",
|
||||
"myBlog": "我的博客",
|
||||
|
@@ -88,6 +88,7 @@
|
||||
"loginSuccess": "登錄成功, 正在跳轉",
|
||||
"logining": "正在登錄",
|
||||
"logout": "退出",
|
||||
"Logout": "註銷",
|
||||
"minLength": "長度至少為%s",
|
||||
"Move": "移動",
|
||||
"myBlog": "我的博客",
|
||||
|
Reference in New Issue
Block a user