Skip to content

Commit

Permalink
p3x-robot sunday release 2018-5-20 14:42:05
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 20, 2018
1 parent db8b74f commit e8d5bdd
Show file tree
Hide file tree
Showing 44 changed files with 528 additions and 729 deletions.
17 changes: 1 addition & 16 deletions .idea/gitlist.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ UrlToolkit {

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



# 🤖 P3X Gitlist v2.5.20-689
# 🤖 P3X Gitlist v2.5.23-706

This is an open-source project. Star this repository if you like it, or even donate! Thank you so much! :)

Expand Down Expand Up @@ -162,7 +162,7 @@ npm run watch

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion artifacts/php-7.2-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo apt upgrade -y

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ require('codemirror/mode/yaml/yaml');

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p3x-gitlist",
"version": "2.5.20-689",
"version": "2.5.23-706",
"corifeus": {
"postfix": "",
"prefix": "p3x-",
Expand Down
26 changes: 13 additions & 13 deletions public/js/search-branch.js → public/js/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ $(function() {

const debounce = require('lodash/debounce')

const currentUrl = new URL(location)
if (window.gitlist.basepath !== '') {
currentUrl.pathname = currentUrl.pathname.substring(window.gitlist.basepath.length)
}
let paths = currentUrl.pathname.split('/');
let paths = window.gitlist.getPaths();

let slice = 4
if (window.gitlist.browse_type === 'tree') {
slice = 3
}
paths = paths.slice(slice);
const path = paths.join('/')
let path = paths.join('/')
if (path !== '') {
path = `/${path}`
}


const baseUrl = `${window.gitlist.basepath}/${window.gitlist.repo}`
const search_query = window.gitlist.search_query;
Expand All @@ -35,25 +35,25 @@ $(function() {
return `${baseUrl}/${options.checkout}`;
},
commits: (options) => {
return `${baseUrl}/commits/${options.checkout}`;
return `${baseUrl}/commits/${options.checkout}${path}`;
},
commit: (options) => {
return `${baseUrl}/commit/${options.checkout}`;
return `${baseUrl}/commit/${options.checkout}${path}`;
},
stats: (options) => {
return `${baseUrl}/stats/${options.checkout}`;
return `${baseUrl}/stats/${options.checkout}${path}`;
},
network: (options) => {
return `${baseUrl}/network/${options.checkout}`;
return `${baseUrl}/network/${options.checkout}${path}`;
},
blob: (options) => {
return `${baseUrl}/blob/${options.checkout}/${path}`;
return `${baseUrl}/blob/${options.checkout}${path}`;
},
blame: (options) => {
return `${baseUrl}/blame/${options.checkout}`;
return `${baseUrl}/blame/${options.checkout}${path}`;
},
treegraph: (options) => {
return `${baseUrl}/treegraph/${options.checkout}`;
return `${baseUrl}/treegraph/${options.checkout}${path}`;
},
search: (options) => {
return {
Expand Down
4 changes: 2 additions & 2 deletions public/js/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ require('./gitgraph-draw')
require('./markdown')
require('./clone-buttons')
require('./paginate')
require('./search-branch')
require('./search-repositories')
require('./browser')
require('./index.js')
require('./file')
require('./theme-switcher.js')
require('./global')
Expand Down
46 changes: 29 additions & 17 deletions public/js/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,38 @@ ${branchInfo}
})
})

buttonEditCancel.click(() => {
const validateCodeIsSame = (snack = true) => {
value = gitlist.viewer.getValue();
if (originalCode === value) {
if (snack) {
$.snackbar({
content: 'The code has not changed. No saving.',
})
}
return true;
}
return false;
}

const close = () => {
buttonEdit.show();
buttonEditSave.hide();
buttonEditCancel.hide();
gitlist.viewer.setValue(originalCode)
gitlist.viewer.setOption('readOnly', true)
$.snackbar({
content: 'Cancelled editing, you changes reverted.',
})
}

buttonEditCancel.click(() => {
if (!validateCodeIsSame(false)) {
gitlist.viewer.setValue(originalCode)
$.snackbar({
htmlAllowed: true,
content: 'The changes are reverted.',
})
}
close();
})

let filename = location.pathname.split('/');
let filename = window.gitlist.getPaths();
filename = filename.slice(4).join('/');

const errorHandler = (e) => {
Expand All @@ -97,16 +117,6 @@ ${branchInfo}
console.error(e);
}

const validateCodeIsSame = () => {
value = gitlist.viewer.getValue();
if (originalCode === value) {
$.snackbar({
content: 'The code has not changed. No saving.',
})
return true;
}
return false;
}

const commitModal = $('#p3x-gitlist-modal-commit');
buttonEditSave.click(async () => {
Expand Down Expand Up @@ -155,6 +165,8 @@ ${branchInfo}
return;
}

commitModal.modal('hide');

$.snackbar({
htmlAllowed: true,
content: ' <i class="fas fa-cog fa-spin"></i>&nbsp;Saving ...'
Expand Down Expand Up @@ -185,12 +197,12 @@ ${branchInfo}
errorHandler(json);
} else {
originalCode = value;
close();
$.snackbar({
htmlAllowed: true,
content: '<i class="fas fa-check"></i>&nbsp;&nbsp;The file is saved.',
})
}
commitModal.modal('hide');
} catch(e) {
errorHandler(e);
}
Expand Down
13 changes: 13 additions & 0 deletions public/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@ const scrollIntoView = (el) => {
}
}

/*
const regExpEmail = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
window.gitlist.validate = {
email: (email) => {
return regExpEmail.test(String(email));
}
}
*/

window.gitlist.getPaths = () => {
const currentUrl = new URL(window.location)
if (window.gitlist.basepath !== '') {
currentUrl.pathname = currentUrl.pathname.substring(window.gitlist.basepath.length)
}
let paths = currentUrl.pathname.split('/');
return paths;
}

window.gitlist.clearInput = (name) => {
const input = $(`[name=${name}]`)
Expand Down Expand Up @@ -125,6 +136,8 @@ global.gitlist.scrollHash = function(element, event) {

$(function () {
$('.dropdown-toggle').dropdown();
$('[data-toggle="tooltip"]').tooltip()

$body = $('body');
$head = $('head')

Expand Down
7 changes: 3 additions & 4 deletions public/js/search-repositories.js → public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $(function() {

const List = require('list.js')

const id = 'repositories'
const id = 'p3x-gitlist-index'

if ($(`#${id}`).length) {

Expand All @@ -11,17 +11,16 @@ $(function() {
const cookieName = 'p3x-gitlist-query-repo';
const value = Cookies.get(cookieName)
const input = $('[name="query-repo"]')
const inputClear = $('#p3x-gitlist-repo-list-clear');
const inputClear = $('#p3x-gitlist-index-list-clear');


input.keypress(() => {
Cookies.set(cookieName, input.val(), window.gitlist.cookieSettings)
})
input.val(value);
console.log(input)

const listOptions = {
valueNames: ['name'],
valueNames: ['name', 'description'],
indexAsync: true,
};
const list = new List(id, listOptions);
Expand Down
4 changes: 2 additions & 2 deletions public/js/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $(function() {

const kebabCase = require('lodash/kebabCase')
markdownRenderer.heading = function (text, level, raw) {
level = level + 2;
const ref = kebabCase(text).replace(/[^\x00-\xFF]/g, "");
const id = ref + '-parent';
const hover = ` onmouseenter="document.getElementById('${ref}').style.display = 'inline'" onmouseleave="document.getElementById('${ref}').style.display = 'none'" `;
Expand Down Expand Up @@ -86,9 +87,8 @@ We are not loading everything, since it is about 500kb`)
return `<code style="display: inline; line-height: 34px;" class="hljs ${lang}">${highlighted}</code>`;
}

const mdContent = $('#md-content');
const mdContent = $('#p3x-gitlist-readme');
if (mdContent.length) {
global.gitlist.setTheme();
const html = marked(mdContent.text(), {
renderer: markdownRenderer
});
Expand Down
36 changes: 18 additions & 18 deletions public/js/themes.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@

const themes = {
"bootstrap-default": "/generated/css/bootstrap-default.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-solar": "/generated/css/bootstrap-solar.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-cerulean": "/generated/css/bootstrap-cerulean.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-cosmo": "/generated/css/bootstrap-cosmo.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-cyborg": "/generated/css/bootstrap-cyborg.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-darkly": "/generated/css/bootstrap-darkly.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-flatly": "/generated/css/bootstrap-flatly.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-journal": "/generated/css/bootstrap-journal.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-lumen": "/generated/css/bootstrap-lumen.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-paper": "/generated/css/bootstrap-paper.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-readable": "/generated/css/bootstrap-readable.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-sandstone": "/generated/css/bootstrap-sandstone.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-simplex": "/generated/css/bootstrap-simplex.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-slate": "/generated/css/bootstrap-slate.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-spacelab": "/generated/css/bootstrap-spacelab.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-superhero": "/generated/css/bootstrap-superhero.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-united": "/generated/css/bootstrap-united.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css",
"bootstrap-yeti": "/generated/css/bootstrap-yeti.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css"
"bootstrap-default": "/generated/css/bootstrap-default.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-solar": "/generated/css/bootstrap-solar.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-cerulean": "/generated/css/bootstrap-cerulean.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-cosmo": "/generated/css/bootstrap-cosmo.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-cyborg": "/generated/css/bootstrap-cyborg.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-darkly": "/generated/css/bootstrap-darkly.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-flatly": "/generated/css/bootstrap-flatly.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-journal": "/generated/css/bootstrap-journal.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-lumen": "/generated/css/bootstrap-lumen.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-paper": "/generated/css/bootstrap-paper.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-readable": "/generated/css/bootstrap-readable.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-sandstone": "/generated/css/bootstrap-sandstone.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-simplex": "/generated/css/bootstrap-simplex.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-slate": "/generated/css/bootstrap-slate.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-spacelab": "/generated/css/bootstrap-spacelab.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-superhero": "/generated/css/bootstrap-superhero.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-united": "/generated/css/bootstrap-united.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css",
"bootstrap-yeti": "/generated/css/bootstrap-yeti.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css"
};
module.exports = themes;
Loading

0 comments on commit e8d5bdd

Please sign in to comment.