Add: GIt hash
This commit is contained in:
parent
5007b70683
commit
46dbc9ae62
|
@ -15,6 +15,8 @@
|
||||||
font-family: 'Open Sans';
|
font-family: 'Open Sans';
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
|
padding: 5px;
|
||||||
|
padding-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a,
|
a,
|
||||||
|
@ -27,7 +29,7 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
|
||||||
grid-template-areas: 'name1 data1''name2 data2''name3 data3''name4 data4''name5 data5';
|
grid-template-areas: 'name1 data1''name2 data2''name3 data3''name4 data4''name5 data5''name6 data6';
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +73,14 @@
|
||||||
.area-data5 {
|
.area-data5 {
|
||||||
grid-area: data5;
|
grid-area: data5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.area-name6 {
|
||||||
|
grid-area: name6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.area-data6 {
|
||||||
|
grid-area: data6;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -85,12 +95,14 @@
|
||||||
<div class="area-data1" id="now"></div>
|
<div class="area-data1" id="now"></div>
|
||||||
<div class="area-name2">Internal version</div>
|
<div class="area-name2">Internal version</div>
|
||||||
<div class="area-data2" id="ver"></div>
|
<div class="area-data2" id="ver"></div>
|
||||||
<div class="area-name3">Chromium</div>
|
<div class="area-name3">Commit(7chars)</div>
|
||||||
<div class="area-data3" id="chrome"></div>
|
<div class="area-data3" id="hash"></div>
|
||||||
<div class="area-name4">Electron</div>
|
<div class="area-name4">Chromium</div>
|
||||||
<div class="area-data4" id="electron"></div>
|
<div class="area-data4" id="chrome"></div>
|
||||||
<div class="area-name5">Node.js</div>
|
<div class="area-name5">Electron</div>
|
||||||
<div class="area-data5" id="node"></div>
|
<div class="area-data5" id="electron"></div>
|
||||||
|
<div class="area-name6">Node.js</div>
|
||||||
|
<div class="area-data6" id="node"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cp">Copyright © TheDesk 2018<br>
|
<div class="cp">Copyright © TheDesk 2018<br>
|
||||||
Main developer(author): <a href="https://cutls.com/@Cutls" target="_blank">Cutls P</a><br>
|
Main developer(author): <a href="https://cutls.com/@Cutls" target="_blank">Cutls P</a><br>
|
||||||
|
@ -114,6 +126,7 @@
|
||||||
var ver = m[1];
|
var ver = m[1];
|
||||||
$("#ver").text(ver);
|
$("#ver").text(ver);
|
||||||
}
|
}
|
||||||
|
$("#hash").html('<a href="https://github.com/cutls/TheDesk/commits/' + about[3] + '" target="_blank">' + about[3].slice(0, 7) + '</a>');
|
||||||
$(document).on('click', 'a', e => {
|
$(document).on('click', 'a', e => {
|
||||||
var url = $(e.target).attr('href');
|
var url = $(e.target).attr('href');
|
||||||
postMessage(["openUrl", url], "*")
|
postMessage(["openUrl", url], "*")
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
#bottom .leftside {
|
#bottom .leftside {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
#tips{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
#bottom #tips img {
|
#bottom #tips img {
|
||||||
vertical-align: -3px;
|
vertical-align: -3px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ var electron = require("electron");
|
||||||
const shell = electron.shell;
|
const shell = electron.shell;
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
onmessage = function (e) {
|
onmessage = function (e) {
|
||||||
|
console.log(e)
|
||||||
if (e.data[0] == "openUrl") {
|
if (e.data[0] == "openUrl") {
|
||||||
urls = e.data[1].match(/https?:\/\/(.+)/);
|
urls = e.data[1].match(/https?:\/\/(.+)/);
|
||||||
if (urls) {
|
if (urls) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ function tips(mode) {
|
||||||
clearInterval(spotStart);
|
clearInterval(spotStart);
|
||||||
if (mode == "ver") {
|
if (mode == "ver") {
|
||||||
tipsToggle()
|
tipsToggle()
|
||||||
$("#tips-text").html('<img src="../../img/desk.png" width="20" onclick="todo(\'TheDesk is a nice client!: TheDesk ' + localStorage.getItem("ver") + ' git: '+ gitHash +'\')"><span style="font-size:20px">TheDesk</span> <span title="git: '+ gitHash +'">' + localStorage.getItem("ver") + '</span>[<i class="material-icons" style="font-size:1.2rem;top: 3px;position: relative;">supervisor_account</i><span id="persons">1+</span>]')
|
$("#tips-text").html('<img src="../../img/desk.png" width="20" onclick="todo(\'TheDesk is a nice client!: TheDesk ' + localStorage.getItem("ver") + ' git: '+ gitHash +'\')">TheDesk ' + localStorage.getItem("ver") + ' {'+ gitHash.slice(0, 7) +'} [<i class="material-icons" style="font-size:1.2rem;top: 3px;position: relative;">supervisor_account</i><span id="persons">1+</span>]')
|
||||||
localStorage.setItem("tips", "ver")
|
localStorage.setItem("tips", "ver")
|
||||||
} else if (mode == "clock") {
|
} else if (mode == "clock") {
|
||||||
tipsToggle()
|
tipsToggle()
|
||||||
|
|
|
@ -202,7 +202,7 @@ function createWindow() {
|
||||||
|
|
||||||
var platform = process.platform;
|
var platform = process.platform;
|
||||||
var bit = process.arch;
|
var bit = process.arch;
|
||||||
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir)));
|
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname)));
|
||||||
//CSS
|
//CSS
|
||||||
css.css(mainWindow);
|
css.css(mainWindow);
|
||||||
//アップデータとダウンロード
|
//アップデータとダウンロード
|
||||||
|
|
|
@ -26,11 +26,9 @@ function dl(mainWindow, lang_path, base, dirname) {
|
||||||
"transparent": false, // ウィンドウの背景を透過
|
"transparent": false, // ウィンドウの背景を透過
|
||||||
"frame": false, // 枠の無いウィンドウ
|
"frame": false, // 枠の無いウィンドウ
|
||||||
"resizable": false
|
"resizable": false
|
||||||
});
|
})
|
||||||
//updatewin.openDevTools()
|
|
||||||
var lang = fs.readFileSync(lang_path, 'utf8');
|
var lang = fs.readFileSync(lang_path, 'utf8');
|
||||||
updatewin.loadURL(base + lang + '/update.html');
|
updatewin.loadURL(base + lang + '/update.html');
|
||||||
|
|
||||||
return "true"
|
return "true"
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
// Create the Application's main menu
|
// Create the Application's main menu
|
||||||
function templete(lang, mainWindow, packaged, dir) {
|
function templete(lang, mainWindow, packaged, dir, dirname) {
|
||||||
if(lang !="ja" && lang != "en"){
|
if(lang !="ja" && lang != "en"){
|
||||||
lang = "en"
|
lang = "en"
|
||||||
}
|
}
|
||||||
const electron = require("electron");
|
const electron = require("electron");
|
||||||
const app = electron.app;
|
const app = electron.app;
|
||||||
const BrowserWindow = electron.BrowserWindow;
|
const BrowserWindow = electron.BrowserWindow;
|
||||||
|
const join = require('path').join;
|
||||||
const dict = {
|
const dict = {
|
||||||
"application": {
|
"application": {
|
||||||
"ja": "アプリケーション",
|
"ja": "アプリケーション",
|
||||||
|
@ -101,9 +102,9 @@ function templete(lang, mainWindow, packaged, dir) {
|
||||||
webviewTag: false,
|
webviewTag: false,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
preload: "../js/platform/preload.js"
|
preload: join(dirname , "js", "platform", "preload.js")
|
||||||
},
|
},
|
||||||
width: 300, height: 460,
|
width: 300, height: 500,
|
||||||
"transparent": false, // ウィンドウの背景を透過
|
"transparent": false, // ウィンドウの背景を透過
|
||||||
"frame": false, // 枠の無いウィンドウ
|
"frame": false, // 枠の無いウィンドウ
|
||||||
"resizable": false
|
"resizable": false
|
||||||
|
|
|
@ -130,10 +130,12 @@ function system(mainWindow, dir, lang, dirname) {
|
||||||
var window = new BrowserWindow({
|
var window = new BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webviewTag: false,
|
webviewTag: false,
|
||||||
nodeIntegration: false
|
nodeIntegration: false,
|
||||||
|
contextIsolation: true,
|
||||||
|
preload: join(dirname, "js", "platform", "preload.js")
|
||||||
},
|
},
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 480,
|
height: 500,
|
||||||
"transparent": false, // ウィンドウの背景を透過
|
"transparent": false, // ウィンドウの背景を透過
|
||||||
"frame": false, // 枠の無いウィンドウ
|
"frame": false, // 枠の無いウィンドウ
|
||||||
"resizable": false
|
"resizable": false
|
||||||
|
@ -156,7 +158,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||||
webviewTag: false,
|
webviewTag: false,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
preload: join(dirname,"js", "platform", "preload.js")
|
preload: join(dirname, "js", "platform", "preload.js")
|
||||||
},
|
},
|
||||||
width: 350,
|
width: 350,
|
||||||
height: 200,
|
height: 200,
|
||||||
|
|
|
@ -992,10 +992,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="tips" class="hide">
|
<div id="tips" class="hide">
|
||||||
<a onclick="tipsToggle()" class="nex waves-effect" style="float:left">
|
<a onclick="tipsToggle()" class="nex waves-effect">
|
||||||
<i class="material-icons nex" title="@@changeTips@@" data-trans-title="tips">bubble_chart</i>
|
<i class="material-icons nex" title="@@changeTips@@" data-trans-title="tips">bubble_chart</i>
|
||||||
</a>
|
</a>
|
||||||
<div id="tips-text" style="float:left; width:300px;"></div>
|
<div id="tips-text" style="width:300px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"nexttl":"Until next TL loading",
|
"nexttl":"Until next TL loading",
|
||||||
"nextver":"Until next version",
|
"nextver":"Until next version",
|
||||||
"problem1":"Some problems?",
|
"problem1":"Some problems?",
|
||||||
"problem2":"Please download on <a href=\"https://thedesk.top\">Oficial HP</a>.",
|
"problem2":"Please download on <a href='https://thedesk.top'>Oficial HP</a>.",
|
||||||
"continue":"Continue updating",
|
"continue":"Continue updating",
|
||||||
"dlnow":"Downloading..."
|
"dlnow":"Downloading..."
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"nexttl":"次回TL表示時まで",
|
"nexttl":"次回TL表示時まで",
|
||||||
"nextver":"次のバージョンが出るまで",
|
"nextver":"次のバージョンが出るまで",
|
||||||
"problem1":"問題が発生しますか?",
|
"problem1":"問題が発生しますか?",
|
||||||
"problem2":"<a href=\"https://thedesk.top\">公式HP</a>からダウンロードをお試しください。",
|
"problem2":"<a href='https://thedesk.top'>公式HP</a>からダウンロードをお試しください。",
|
||||||
"continue":"アップデートを続行",
|
"continue":"アップデートを続行",
|
||||||
"dlnow":"ダウンロード中"
|
"dlnow":"ダウンロード中"
|
||||||
}
|
}
|
|
@ -43,6 +43,7 @@ for (let i = 0; i < samples.length; i++) {
|
||||||
}
|
}
|
||||||
source = source.replace(/@@versionLetter@@/g, ver)
|
source = source.replace(/@@versionLetter@@/g, ver)
|
||||||
source = source.replace(/@@gitHash@@/g, gitHash)
|
source = source.replace(/@@gitHash@@/g, gitHash)
|
||||||
|
source = source.replace(/@@gitHashShort@@/g, gitHash.slice(0, 7))
|
||||||
source = source.replace(/@@lang@@/g, lang)
|
source = source.replace(/@@lang@@/g, lang)
|
||||||
source = source.replace(/@@langlist@@/g, langstr)
|
source = source.replace(/@@langlist@@/g, langstr)
|
||||||
fs.writeFileSync("../" + lang + "/" + pages[i], source)
|
fs.writeFileSync("../" + lang + "/" + pages[i], source)
|
||||||
|
|
|
@ -449,14 +449,16 @@
|
||||||
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
|
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
|
||||||
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
|
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
|
||||||
<br>
|
<br>
|
||||||
|
TheDesk @ <a href="https://github.com/cutls/TheDesk/commits/@@gitHash@@">@@gitHash@@</a><br>
|
||||||
|
<br>
|
||||||
Kyash<br>
|
Kyash<br>
|
||||||
<img src="../../img/kyash.png" width="100"><br>
|
<img src="../../img/kyash.png" width="100"><br>
|
||||||
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
|
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
|
||||||
class="pointer">@@checkup@@</a><br>
|
class="pointer">@@checkup@@</a><br>
|
||||||
<a href="oss.html">OSS License@@ossJP@@</a><br>
|
<a href="oss.html">OSS License@@ossJP@@</a><br>
|
||||||
|
<br>
|
||||||
<span style="font-family:Open Sans;">Copyright © TheDesk 2018
|
<span style="font-family:Open Sans;">Copyright © TheDesk 2018
|
||||||
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
|
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a href="https://thedesk.top/priv.html">Privacy
|
||||||
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
|
|
||||||
Policy</a>
|
Policy</a>
|
||||||
<br>Developer: Cutls P(
|
<br>Developer: Cutls P(
|
||||||
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
|
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
}
|
}
|
||||||
} else if (sel == "mac") {
|
} else if (sel == "mac") {
|
||||||
var url = json["mac"];
|
var url = json["mac"];
|
||||||
shell.openExternal(url);
|
postMessage(["openUrl", url], "*")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
postMessage(["downloadButton", [url, file]], "*")
|
postMessage(["downloadButton", [url, file]], "*")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user