mirror of
https://github.com/S2-/gitlit
synced 2025-08-06 14:10:06 +02:00
Compare commits
26 Commits
v1.0.0
...
3111f2b327
Author | SHA1 | Date | |
---|---|---|---|
3111f2b327 | |||
d24a82e91e | |||
3dcadb39c2 | |||
dfa91111a6 | |||
51a6fd153f | |||
6d71042f69 | |||
cae59c6a72 | |||
cf51498711 | |||
c910dd25a5 | |||
066e46a202 | |||
325c4479cc | |||
3c557f7ce5 | |||
613525752b | |||
ec1931ca52 | |||
5c55c54b71 | |||
da4083f574 | |||
4fcc873901 | |||
ae314d1d0a | |||
cb87d6a9cd | |||
d002126b72 | |||
e8c95255e8 | |||
dec767fe75 | |||
2c5b23c10e | |||
0ea0853165 | |||
6227e2328b | |||
67add0f1de |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1 @@
|
||||
node_modules
|
||||
app/node_modules
|
||||
dist
|
||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"git.ignoreLimitWarning": true
|
||||
}
|
27
README.md
27
README.md
@@ -18,3 +18,30 @@ gitlit /home/s2/myApp
|
||||
```
|
||||
|
||||
If no folder is specified, gitlit looks at the current path.
|
||||
|
||||
## contribute
|
||||
|
||||
The code is very easy. Just clone the repo and have look!
|
||||
Use the `.jscrc` for formatting the code and keep it clean and consistent.
|
||||
|
||||
There are just some js libraries:
|
||||
- [ejs](http://ejs.co/) is used for templating. The templates are in `app/js/templates.js`.
|
||||
- [sorttable.js](http://www.kryogenix.org/code/browser/sorttable/) to sort the table containing the files.
|
||||
- [jQuery](https://jquery.com/), because it's still cool to have it, even if everyone says it's dead and we should do without.
|
||||
- [Bootstrap](https://getbootstrap.com/) for the layout
|
||||
- [PNotify](https://github.com/sciactive/pnotify) for generic notifications
|
||||
|
||||
### run the app
|
||||
```
|
||||
cd app
|
||||
npm start
|
||||
```
|
||||
|
||||
### make a release
|
||||
```
|
||||
./makedist.sh
|
||||
```
|
||||
|
||||
## license
|
||||
|
||||
ISC
|
||||
|
@@ -84,6 +84,11 @@
|
||||
inPageSearch.openSearchWindow();
|
||||
}
|
||||
}
|
||||
|
||||
//ctrl + r
|
||||
if (ev.ctrlKey && ev.keyCode == 18) {
|
||||
window.location.reload(false);
|
||||
}
|
||||
});
|
||||
|
||||
//startup
|
||||
|
13
app/main.js
13
app/main.js
@@ -13,6 +13,7 @@ const repoDir = path.resolve(path.normalize(args._.join(' ')));
|
||||
|
||||
function getLfsFileList(dir, cb) {
|
||||
exec('git lfs ls-files', {
|
||||
maxBuffer: 1024 * 1024,
|
||||
cwd: dir
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
@@ -25,9 +26,12 @@ function getLfsFileList(dir, cb) {
|
||||
if (stdout) {
|
||||
let files = stdout.split('\n');
|
||||
files.forEach((file) => {
|
||||
file = file.split(' * ');
|
||||
if (file[1]) {
|
||||
parsedFiles.push(file[1].trim());
|
||||
let pos = file.search(/ \* | \- /);
|
||||
if (pos) {
|
||||
file = file.substring(pos + 3);
|
||||
if (file) {
|
||||
parsedFiles.push(file.trim());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -40,6 +44,7 @@ function getLfsFileList(dir, cb) {
|
||||
|
||||
function getLfsLocks(dir, cb) {
|
||||
exec('git lfs locks', {
|
||||
maxBuffer: 1024 * 1024,
|
||||
cwd: dir
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
@@ -134,6 +139,7 @@ function createWindow() {
|
||||
|
||||
ipcMain.on('unlock', (event, file) => {
|
||||
exec('git lfs unlock "' + file + '"', {
|
||||
maxBuffer: 1024 * 1024,
|
||||
cwd: repoDir
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
@@ -156,6 +162,7 @@ ipcMain.on('unlock', (event, file) => {
|
||||
|
||||
ipcMain.on('lock', (event, file) => {
|
||||
exec('git lfs lock --json "' + file + '"', {
|
||||
maxBuffer: 1024 * 1024,
|
||||
cwd: repoDir
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
|
1332
app/package-lock.json
generated
1332
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,20 +1,24 @@
|
||||
{
|
||||
"name": "gitlit-app",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.4",
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.1.1",
|
||||
"animate.css": "^3.5.2",
|
||||
"bootstrap": "^4.1.3",
|
||||
"ejs": "^2.6.1",
|
||||
"electron-in-page-search": "^1.3.2",
|
||||
"electron-localshortcut": "^3.1.0",
|
||||
"jquery": "^3.3.1",
|
||||
"material-design-icons": "^3.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"nonblockjs": "^1.0.8",
|
||||
"pnotify": "^4.0.0-alpha.4",
|
||||
"popper.js": "^1.14.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "^2.0.1"
|
||||
"electron": "^3.0.3",
|
||||
"electron-packager": "^12.2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "electron ."
|
||||
|
1
app/release.cmd
Normal file
1
app/release.cmd
Normal file
@@ -0,0 +1 @@
|
||||
node_modules\.bin\electron-packager.cmd . gitlit --platform=win32 --arch=x64
|
1956
package-lock.json
generated
1956
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,6 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"electron-packager": "^12.1.0"
|
||||
"electron-packager": "^12.2.0"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user