mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
!
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
(function($) {
|
||||
require('electron').ipcRenderer.on('ping', (event, message) => {
|
||||
console.log(message) // Prints 'whoooooooh!'
|
||||
})
|
||||
let ipcRenderer = require('electron').ipcRenderer;
|
||||
ipcRenderer.on('fileList', (event, files) => {
|
||||
$('body').html(gitlit.templates.main({files: files}));
|
||||
});
|
||||
})(jQuery);
|
||||
|
@@ -1,17 +1,26 @@
|
||||
window.gitlit = window.gitlit || {};
|
||||
gitlit.templates = {
|
||||
main: ejs.compile(`
|
||||
<table class="table table-striped">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>file</th>
|
||||
<th>status</th>
|
||||
<th>action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ciccio.txt</td>
|
||||
<td>locked</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<% files.forEach((file) => { %>
|
||||
<tr class="<%= file.lockedBy ? 'alert alert-danger' : '' %>">
|
||||
<td><%= file.file %></td>
|
||||
<td><%= file.lockedBy ? file.lockedBy + ' (id: ' + file.id + ')' : 'not locked' %></td>
|
||||
<td>
|
||||
<a class="btn btn-<%= file.lockedBy ? 'danger' : 'primary' %>"
|
||||
href="javascript:///">
|
||||
<%= file.lockedBy ? 'Unlock' : 'Lock' %>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% }); %>
|
||||
|
||||
</table>
|
||||
`)
|
||||
};
|
||||
|
Reference in New Issue
Block a user