mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 23:55:50 +00:00
new logo
This commit is contained in:
@@ -41,9 +41,8 @@ if(process.platform != 'darwin') {
|
|||||||
<div>
|
<div>
|
||||||
<h1 id="logo">
|
<h1 id="logo">
|
||||||
<a onclick="openExternal('https://leanote.com')" id="loadingLogo" title="leanote">
|
<a onclick="openExternal('https://leanote.com')" id="loadingLogo" title="leanote">
|
||||||
<img src="public/images/logo/leanote_icon_blue.png">
|
<span class="logo"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<span class="lang customServer">Self-hosted Service</span>
|
<span class="lang customServer">Self-hosted Service</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
7
main.js
7
main.js
@@ -33,7 +33,8 @@ app.on('open-file', function(e) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// var appIsReady = false;
|
// var appIsReady = false;
|
||||||
app.on('activate-with-no-open-windows', function() {
|
app.on('activate', function() {
|
||||||
|
console.log('activate');
|
||||||
if(mainWindow) {
|
if(mainWindow) {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
}
|
}
|
||||||
@@ -110,6 +111,7 @@ function openIt() {
|
|||||||
|
|
||||||
// Emitted when the window is closed.
|
// Emitted when the window is closed.
|
||||||
mainWindow.on('closed', function() {
|
mainWindow.on('closed', function() {
|
||||||
|
console.log('closed');
|
||||||
// Dereference the window object, usually you would store windows
|
// Dereference the window object, usually you would store windows
|
||||||
// in an array if your app supports multi windows, this is the time
|
// in an array if your app supports multi windows, this is the time
|
||||||
// when you should delete the corresponding element.
|
// when you should delete the corresponding element.
|
||||||
@@ -117,17 +119,20 @@ function openIt() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
mainWindow.on('focus', function() {
|
mainWindow.on('focus', function() {
|
||||||
|
console.log('focus');
|
||||||
// ipc.send('focusWindow'); mainProcess没有该方法
|
// ipc.send('focusWindow'); mainProcess没有该方法
|
||||||
if(mainWindow && mainWindow.webContents)
|
if(mainWindow && mainWindow.webContents)
|
||||||
mainWindow.webContents.send('focusWindow');
|
mainWindow.webContents.send('focusWindow');
|
||||||
});
|
});
|
||||||
mainWindow.on('blur', function() {
|
mainWindow.on('blur', function() {
|
||||||
|
console.log('blur');
|
||||||
if(mainWindow && mainWindow.webContents)
|
if(mainWindow && mainWindow.webContents)
|
||||||
mainWindow.webContents.send('blurWindow');
|
mainWindow.webContents.send('blurWindow');
|
||||||
});
|
});
|
||||||
|
|
||||||
// 关闭,先保存数据
|
// 关闭,先保存数据
|
||||||
mainWindow.on('close', function(e) {
|
mainWindow.on('close', function(e) {
|
||||||
|
console.log('close');
|
||||||
mainWindow.hide();
|
mainWindow.hide();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
mainWindow.webContents.send('closeWindow');
|
mainWindow.webContents.send('closeWindow');
|
||||||
|
@@ -73,8 +73,8 @@ function log(o) {
|
|||||||
<div id="page" class="clearfix">
|
<div id="page" class="clearfix">
|
||||||
<div id="mainMask">
|
<div id="mainMask">
|
||||||
<table><tr><td>
|
<table><tr><td>
|
||||||
<div id="loadingLogo" class="loading">
|
<div id="loadingLogo">
|
||||||
<img src="public/images/logo/leanote_icon_blue.png">
|
<span class="logo"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="allProcess" class="lang">
|
<div id="allProcess" class="lang">
|
||||||
loading...
|
loading...
|
||||||
|
@@ -29,6 +29,6 @@ var Config = {
|
|||||||
"name": "日本語"
|
"name": "日本語"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"lang": "zh-cn",
|
"lang": "en-us",
|
||||||
"theme": ""
|
"theme": ""
|
||||||
};
|
};
|
@@ -10,15 +10,20 @@
|
|||||||
|
|
||||||
#loadingLogo {
|
#loadingLogo {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100px;
|
// width: 100px;
|
||||||
height: 100px;
|
// height: 100px;
|
||||||
display: block;
|
display: block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
border: 1px solid #4092C5;
|
// border: 1px solid #4092C5;
|
||||||
border-radius: 50%;
|
// border-radius: 50%;
|
||||||
img {
|
|
||||||
width: 100px;
|
.logo {
|
||||||
padding: 20px;
|
display: inline-block;
|
||||||
|
background-image: url('../images/logo/leanote-icon-en.png');
|
||||||
|
height: 50px;
|
||||||
|
width: 200px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: auto 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.loading {
|
&.loading {
|
||||||
@@ -26,6 +31,11 @@
|
|||||||
-webkit-animation: rond 2s infinite;
|
-webkit-animation: rond 2s infinite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.lang-zh-cn #loadingLogo .logo {
|
||||||
|
width: 170px;
|
||||||
|
background-image: url('../images/logo/leanote-icon-zh.png');
|
||||||
|
}
|
||||||
|
|
||||||
.loading-spin {
|
.loading-spin {
|
||||||
animation: rond 2s infinite;
|
animation: rond 2s infinite;
|
||||||
-webkit-animation: rond 2s infinite;
|
-webkit-animation: rond 2s infinite;
|
||||||
|
@@ -16,21 +16,25 @@
|
|||||||
}
|
}
|
||||||
#loadingLogo {
|
#loadingLogo {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
display: block;
|
display: block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
border: 1px solid #4092C5;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
}
|
||||||
#loadingLogo img {
|
#loadingLogo .logo {
|
||||||
width: 100px;
|
display: inline-block;
|
||||||
padding: 20px;
|
background-image: url('../images/logo/leanote-icon-en.png');
|
||||||
|
height: 50px;
|
||||||
|
width: 200px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: auto 50px;
|
||||||
}
|
}
|
||||||
#loadingLogo.loading {
|
#loadingLogo.loading {
|
||||||
animation: rond 2s infinite;
|
animation: rond 2s infinite;
|
||||||
-webkit-animation: rond 2s infinite;
|
-webkit-animation: rond 2s infinite;
|
||||||
}
|
}
|
||||||
|
.lang-zh-cn #loadingLogo .logo {
|
||||||
|
width: 170px;
|
||||||
|
background-image: url('../images/logo/leanote-icon-zh.png');
|
||||||
|
}
|
||||||
.loading-spin {
|
.loading-spin {
|
||||||
animation: rond 2s infinite;
|
animation: rond 2s infinite;
|
||||||
-webkit-animation: rond 2s infinite;
|
-webkit-animation: rond 2s infinite;
|
||||||
@@ -237,7 +241,7 @@ input,
|
|||||||
height: 102px;
|
height: 102px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
#box h1 span {
|
#box h1 .customServer {
|
||||||
display: none;
|
display: none;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #000;
|
color: #000;
|
||||||
@@ -713,6 +717,9 @@ form {
|
|||||||
.custom-server .bottom .loginWithLeanote {
|
.custom-server .bottom .loginWithLeanote {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
#loadingLogo {
|
||||||
|
padding-top: 30px;
|
||||||
|
}
|
||||||
.custom-server .host-group {
|
.custom-server .host-group {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@@ -235,7 +235,7 @@ input, .form-control {
|
|||||||
|
|
||||||
height: 102px;
|
height: 102px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
span {
|
.customServer {
|
||||||
display: none;
|
display: none;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #000;
|
color: #000;
|
||||||
@@ -787,7 +787,9 @@ form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#loadingLogo {
|
||||||
|
padding-top: 30px;
|
||||||
|
}
|
||||||
.custom-server {
|
.custom-server {
|
||||||
.host-group {
|
.host-group {
|
||||||
display: block;
|
display: block;
|
||||||
|
BIN
public/images/logo/leanote-icon-en.png
Normal file
BIN
public/images/logo/leanote-icon-en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
BIN
public/images/logo/leanote-icon-zh.png
Normal file
BIN
public/images/logo/leanote-icon-zh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@@ -1309,7 +1309,7 @@ var State = {
|
|||||||
var me = this;
|
var me = this;
|
||||||
me.recoverEnd = true;
|
me.recoverEnd = true;
|
||||||
// 先隐藏, 再resize, 再显示
|
// 先隐藏, 再resize, 再显示
|
||||||
$('body').hide();
|
// $('body').hide();
|
||||||
// 延迟, 让body先隐藏, 效果先显示出来
|
// 延迟, 让body先隐藏, 效果先显示出来
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if(isMac()) {
|
if(isMac()) {
|
||||||
@@ -1320,7 +1320,7 @@ var State = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('body').show();
|
// $('body').show();
|
||||||
$('body').removeClass('init');
|
$('body').removeClass('init');
|
||||||
$("#mainMask").html("");
|
$("#mainMask").html("");
|
||||||
$("#mainMask").hide(0);
|
$("#mainMask").hide(0);
|
||||||
@@ -1800,8 +1800,17 @@ var Pren = {
|
|||||||
me.preOrNext();
|
me.preOrNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 各个平台都要
|
||||||
|
|
||||||
|
// e切换只读和可写
|
||||||
|
if(keyCode == 69) {
|
||||||
|
if ( (isMac() && e.metaKey) || (!isMac() && e.ctrlKey)) {
|
||||||
|
Note.toggleWriteableAndReadOnly();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// linux,windows下需要
|
// linux,windows下需要
|
||||||
if(!isMac() && e.ctrlKey) {
|
else if(!isMac() && e.ctrlKey) {
|
||||||
// p
|
// p
|
||||||
if(keyCode == 80) {
|
if(keyCode == 80) {
|
||||||
me.togglePren();
|
me.togglePren();
|
||||||
@@ -1810,10 +1819,7 @@ var Pren = {
|
|||||||
else if(keyCode == 187) {
|
else if(keyCode == 187) {
|
||||||
me.toggleFullscreen();
|
me.toggleFullscreen();
|
||||||
}
|
}
|
||||||
// e
|
|
||||||
else if(keyCode == 69) {
|
|
||||||
Note.toggleWriteableAndReadOnly();
|
|
||||||
}
|
|
||||||
// t
|
// t
|
||||||
else if(keyCode == 84) {
|
else if(keyCode == 84) {
|
||||||
me.togglePren(true);
|
me.togglePren(true);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
var Common = require('common');
|
var Common = require('common');
|
||||||
|
|
||||||
var Evt = require('evt');
|
var Evt = require('evt');
|
||||||
var app = require('electron').app; // .require('app');
|
var app = require('electron').remote.app; // .require('app');
|
||||||
var basePath = app.getPath('appData') + '/leanote'; // /Users/life/Library/Application Support/Leanote'; // require('nw.gui').App.dataPath;
|
var basePath = app.getPath('appData') + '/leanote'; // /Users/life/Library/Application Support/Leanote'; // require('nw.gui').App.dataPath;
|
||||||
Evt.setDataBasePath(basePath);
|
Evt.setDataBasePath(basePath);
|
||||||
|
|
||||||
|
@@ -1507,10 +1507,14 @@ function goToMainPage() {
|
|||||||
function toLogin() {
|
function toLogin() {
|
||||||
var BrowserWindow = gui.remote.BrowserWindow;
|
var BrowserWindow = gui.remote.BrowserWindow;
|
||||||
if(isMac()) {
|
if(isMac()) {
|
||||||
var win = new BrowserWindow({ width: 278, height: 326, show: true, frame: false, resizable: false });
|
var win = new BrowserWindow(
|
||||||
|
{ width: 278, height: 370, show: true, frame: false, resizable: false }
|
||||||
|
);
|
||||||
win.loadURL('file://' + __dirname + '/login.html');
|
win.loadURL('file://' + __dirname + '/login.html');
|
||||||
} else {
|
} else {
|
||||||
var win = new BrowserWindow({ width: 278, height: 400, show: true, frame: true, resizable: false });
|
var win = new BrowserWindow(
|
||||||
|
{ width: 278, height: 400, show: true, frame: true, resizable: false }
|
||||||
|
);
|
||||||
win.loadURL('file://' + __dirname + '/login.html');
|
win.loadURL('file://' + __dirname + '/login.html');
|
||||||
}
|
}
|
||||||
gui.getCurrentWindow().close();
|
gui.getCurrentWindow().close();
|
||||||
|
@@ -24,6 +24,8 @@ var lang = {
|
|||||||
window.curLang = curLang;
|
window.curLang = curLang;
|
||||||
window.langData = langData;
|
window.langData = langData;
|
||||||
|
|
||||||
|
$('body').addClass('lang-' + curLang);
|
||||||
|
|
||||||
me.renderHtml();
|
me.renderHtml();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -2100,21 +2100,25 @@ img::selection {
|
|||||||
}
|
}
|
||||||
#loadingLogo {
|
#loadingLogo {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
display: block;
|
display: block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
border: 1px solid #4092C5;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
}
|
||||||
#loadingLogo img {
|
#loadingLogo .logo {
|
||||||
width: 100px;
|
display: inline-block;
|
||||||
padding: 20px;
|
background-image: url('../images/logo/leanote-icon-en.png');
|
||||||
|
height: 50px;
|
||||||
|
width: 200px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: auto 50px;
|
||||||
}
|
}
|
||||||
#loadingLogo.loading {
|
#loadingLogo.loading {
|
||||||
animation: rond 2s infinite;
|
animation: rond 2s infinite;
|
||||||
-webkit-animation: rond 2s infinite;
|
-webkit-animation: rond 2s infinite;
|
||||||
}
|
}
|
||||||
|
.lang-zh-cn #loadingLogo .logo {
|
||||||
|
width: 170px;
|
||||||
|
background-image: url('../images/logo/leanote-icon-zh.png');
|
||||||
|
}
|
||||||
.loading-spin {
|
.loading-spin {
|
||||||
animation: rond 2s infinite;
|
animation: rond 2s infinite;
|
||||||
-webkit-animation: rond 2s infinite;
|
-webkit-animation: rond 2s infinite;
|
||||||
|
Reference in New Issue
Block a user