1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 21:00:04 +02:00

2 Commits

Author SHA1 Message Date
s2
171b79e355 1.4.0 2019-06-20 15:52:56 +02:00
s2
4178caa94a show splash screen on startup if passed path is not a git repo 2019-06-20 15:51:56 +02:00
4 changed files with 19 additions and 3 deletions

View File

@@ -4,8 +4,11 @@
const electronFind = require('electron-find'); const electronFind = require('electron-find');
let findInPage = new electronFind.FindInPage(remote.getCurrentWebContents()); let findInPage = new electronFind.FindInPage(remote.getCurrentWebContents());
let firstRun = true;
//events //events
ipcRenderer.on('fileList', (event, files) => { ipcRenderer.on('fileList', (event, files) => {
firstRun = false;
if (files && files.length > 0) { if (files && files.length > 0) {
ejs.preloadTemplate('templates/files.ejs') ejs.preloadTemplate('templates/files.ejs')
.then(t => { .then(t => {
@@ -28,7 +31,12 @@
}); });
ipcRenderer.on('isNoGitLfsRepo', (event, repoDir) => { ipcRenderer.on('isNoGitLfsRepo', (event, repoDir) => {
if (firstRun) {
firstRun = false;
$('.js-container').html(ejs.rr('templates/firstRun.ejs', {repoDir: repoDir}));
} else {
$('.js-container').html(ejs.rr('templates/isNoGitLfsRepo.ejs', {repoDir: repoDir})); $('.js-container').html(ejs.rr('templates/isNoGitLfsRepo.ejs', {repoDir: repoDir}));
}
}); });
ipcRenderer.on('notification', (event, notification) => { ipcRenderer.on('notification', (event, notification) => {

View File

@@ -0,0 +1,8 @@
<div class="jumbotron text-center">
<h1>gitlit</h1>
<p class="lead">Handle git lfs locks with ease</p>
<div class="text-center">
<a class="btn btn-primary btn-lg js-open-folder" href="javascript:///">Open git repository folder</a>
<input type="file" style="display: none" class="js-open-folder-input" webkitdirectory />
</div>
</div>

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "gitlit", "name": "gitlit",
"version": "1.3.1", "version": "1.4.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "gitlit", "name": "gitlit",
"version": "1.3.1", "version": "1.4.0",
"description": "", "description": "",
"main": "app/main.js", "main": "app/main.js",
"build": { "build": {