mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 12:20:05 +02:00
no notification if everything is allright
This commit is contained in:
3
app/css/app.css
Normal file
3
app/css/app.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.js-container {
|
||||
margin: 5px;
|
||||
}
|
@@ -4,7 +4,9 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>gitlit</title>
|
||||
|
||||
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
|
||||
|
||||
<script src="node_modules/jquery/dist/jquery.js"></script>
|
||||
<script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
|
||||
|
||||
@@ -16,6 +18,7 @@
|
||||
<script src="js/index.js"></script>
|
||||
|
||||
<link href="node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="css/app.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="js-container">
|
||||
|
@@ -27,10 +27,14 @@
|
||||
if (notification.event && notification.event === 'unlock') {
|
||||
$('[data-file="' + notification.file + '"].js-unlock').hide();
|
||||
$('[data-file="' + notification.file + '"].js-lock').show();
|
||||
let text = 'not locked';
|
||||
$('[data-file="' + notification.file + '"]').parent().prev().text(text);
|
||||
}
|
||||
if (notification.event && notification.event === 'lock') {
|
||||
$('[data-file="' + notification.file + '"].js-lock').hide();
|
||||
$('[data-file="' + notification.file + '"].js-unlock').show();
|
||||
let text = notification.data.owner.name + ' (id: ' + notification.data.id + ')';
|
||||
$('[data-file="' + notification.file + '"]').parent().prev().text(text);
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -33,7 +33,7 @@ gitlit.templates = {
|
||||
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-secondary js-refresh" href="javascript:///">
|
||||
Refresh
|
||||
</a>
|
||||
|
@@ -142,7 +142,6 @@ ipcMain.on('unlock', (event, file) => {
|
||||
notification = {
|
||||
file: file,
|
||||
event: 'unlock',
|
||||
message: stdout,
|
||||
type: 'info'
|
||||
};
|
||||
}
|
||||
@@ -152,7 +151,7 @@ ipcMain.on('unlock', (event, file) => {
|
||||
});
|
||||
|
||||
ipcMain.on('lock', (event, file) => {
|
||||
exec('git lfs lock "' + file + '"', {
|
||||
exec('git lfs lock --json "' + file + '"', {
|
||||
cwd: repoDir
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
@@ -165,7 +164,7 @@ ipcMain.on('lock', (event, file) => {
|
||||
notification = {
|
||||
file: file,
|
||||
event: 'lock',
|
||||
message: stdout,
|
||||
data: JSON.parse(stdout),
|
||||
type: 'info'
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user