Skip to content

Commit

Permalink
robo8x [chore] 7/11/2019, 12:53:00 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Jul 11, 2019
1 parent dee19b2 commit 92c7970
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 36 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

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



# 🤖 P3X Gitlist - A decorated enhanced elegant, feature rich and modern private git ui repository viewer v2019.10.107
# 🤖 P3X Gitlist - A decorated enhanced elegant, feature rich and modern private git ui repository viewer v2019.10.110


**Note about versioning:** Versions are cut in Major.Minor.Patch schema. Major is always the current year. Minor is either 4 (January - June) or 10 (July - December). Patch is incremental by every build. If there is a breaking change, it should be noted in the readme.
Expand Down Expand Up @@ -165,7 +165,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

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 @@ -28,7 +28,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
2 changes: 1 addition & 1 deletion artifacts/screenshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
2 changes: 1 addition & 1 deletion change-break.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
7 changes: 6 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
[//]: #@corifeus-header:end

## v2019.100.111
* FEATURE: Show last commited ago on the tree table by tag or branch with ellipsis
* FEATURE: Replaced mode column on the tree table with the last commit message with ellipsis


## v2019.4.128
* FEATURE: Added SASS/SCSS to CodeMirror

Expand Down Expand Up @@ -303,7 +308,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "p3x-gitlist",
"version": "2019.10.108",
"version": "2019.10.111",
"corifeus": {
"prod-dir": "prod",
"css-postfix": "51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77",
"css-postfix": "06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28",
"prefix": "p3x-",
"publish": false,
"type": "p3x",
Expand Down
2 changes: 1 addition & 1 deletion src/Gitter/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function run($repository, $command)
$command = $this->getPath() . ' ' . $command;

// echo $command;
// echo "<br/>";
// echo "\n";
// echo $repository->getPath();
// echo "<br/>";
// echo "<br/>";
Expand Down
9 changes: 9 additions & 0 deletions src/Gitter/Model/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class File extends AbstractModel
protected $path;
protected $size;
protected $shortHash;
protected $lastModified;
public $message;

public function getSize()
{
Expand Down Expand Up @@ -85,5 +87,12 @@ public function setShortHash($hash)
return $this;
}

public function getLastModified() {
return $this->lastModified;
}

public function setLastModified($modified) {
$this->lastModified = $modified;
}

}
40 changes: 40 additions & 0 deletions src/Gitter/Model/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ class Tree extends Item implements \RecursiveIterator
protected $position = 0;
private $submodules = null;

public $path = '';

public function __construct($hash, Repository $repository)
{
$this->setHash($hash);
$pathArray = explode(":", $hash);
if (isset($pathArray[1])) {
$this->path = str_replace("\"", "" ,$pathArray[1]);
}
//exit;
$this->setRepository($repository);
}

Expand Down Expand Up @@ -59,13 +66,29 @@ private function getSubmodules($files, $hash)
return $this->submodules;
}

public function decorateItem($filename, $item) {
$command = 'log -1 --pretty=tformat:"%ar%n%s" '. explode(':', $this->getHash())[0] . ' -- ' . $this->path . $filename;
// print_r($command);
$fileInfo = explode("\n", $this->getRepository()->getClient()->run($this->getRepository(), $command));
// echo $filename;
// echo "\n";
// print_r($fileInfo);
// echo "\n";
// echo "\n";

$item->setLastModified($fileInfo[0]);
$item->message = $fileInfo[1];
}

public function parse()
{
$data = $this->getRepository()->getClient()->run($this->getRepository(), 'ls-tree -lz ' . $this->getHash());
$lines = explode("\0", $data);
$files = array();
$root = array();

//print_r($data);

foreach ($lines as $key => $line) {
if (empty($line)) {
unset($lines[$key]);
Expand All @@ -75,6 +98,7 @@ public function parse()
}

foreach ($files as $file) {

// submodule
if ($file[0] == '160000') {
$submodules = $this->getSubmodules($files, $this->getHash());
Expand All @@ -100,6 +124,7 @@ public function parse()
}
}
$tree->setUrl($url);
$this->decorateItem( $file[4], $tree);
$root[] = $tree;
continue;
}
Expand All @@ -110,6 +135,7 @@ public function parse()
$tree->setMode($file[0]);
$tree->setName($file[4]);
$tree->setPath($show);
$this->decorateItem( $file[4], $tree);
$root[] = $tree;
continue;
}
Expand All @@ -119,13 +145,19 @@ public function parse()
$blob->setMode($file[0]);
$blob->setName($file[4]);
$blob->setSize($file[3]);
$this->decorateItem( $file[4], $blob);



$root[] = $blob;
continue;
}

$tree = new Tree($file[2], $this->getRepository());

$tree->setMode($file[0]);
$tree->setName($file[4]);
$this->decorateItem($file[4], $tree);
$root[] = $tree;
}

Expand All @@ -143,6 +175,8 @@ public function output()
$file['size'] = $node->getSize();
$file['mode'] = $node->getMode();
$file['hash'] = $node->getHash();
$file['lastModified'] = $node->getLastModified();
$file['message'] = $node->message;
$files[] = $file;
continue;
}
Expand All @@ -153,6 +187,8 @@ public function output()
$folder['size'] = '';
$folder['mode'] = $node->getMode();
$folder['hash'] = $node->getHash();
$folder['lastModified'] = $node->getLastModified();
$folder['message'] = $node->message;
$folders[] = $folder;
continue;
}
Expand All @@ -167,6 +203,8 @@ public function output()
$folder['shortHash'] = $node->getShortHash();
$folder['url'] = $node->getUrl();
$folders[] = $folder;
$folder['lastModified'] = $node->getLastModified();
$folder['message'] = $node->message;
continue;
}

Expand All @@ -177,6 +215,8 @@ public function output()
$folder['mode'] = $node->getMode();
$folder['hash'] = '';
$folder['path'] = $node->getPath();
$folder['lastModified'] = $node->getLastModified();
$folder['message'] = $node->message;
$folders[] = $folder;
}
}
Expand Down
36 changes: 18 additions & 18 deletions src/browser/js/themes.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@

const themes = {
"bootstrap-default": "prod/css/bootstrap-default.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-solar": "prod/css/bootstrap-solar.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-cerulean": "prod/css/bootstrap-cerulean.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-cosmo": "prod/css/bootstrap-cosmo.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-cyborg": "prod/css/bootstrap-cyborg.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-darkly": "prod/css/bootstrap-darkly.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-flatly": "prod/css/bootstrap-flatly.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-journal": "prod/css/bootstrap-journal.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-lumen": "prod/css/bootstrap-lumen.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-paper": "prod/css/bootstrap-paper.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-readable": "prod/css/bootstrap-readable.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-sandstone": "prod/css/bootstrap-sandstone.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-simplex": "prod/css/bootstrap-simplex.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-slate": "prod/css/bootstrap-slate.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-spacelab": "prod/css/bootstrap-spacelab.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-superhero": "prod/css/bootstrap-superhero.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-united": "prod/css/bootstrap-united.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css",
"bootstrap-yeti": "prod/css/bootstrap-yeti.51277d6c756ab1e9f2f9a33fd14657d0267154f8afd49b53152c5f1ad9c66b77.css"
"bootstrap-default": "prod/css/bootstrap-default.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-solar": "prod/css/bootstrap-solar.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-cerulean": "prod/css/bootstrap-cerulean.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-cosmo": "prod/css/bootstrap-cosmo.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-cyborg": "prod/css/bootstrap-cyborg.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-darkly": "prod/css/bootstrap-darkly.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-flatly": "prod/css/bootstrap-flatly.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-journal": "prod/css/bootstrap-journal.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-lumen": "prod/css/bootstrap-lumen.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-paper": "prod/css/bootstrap-paper.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-readable": "prod/css/bootstrap-readable.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-sandstone": "prod/css/bootstrap-sandstone.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-simplex": "prod/css/bootstrap-simplex.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-slate": "prod/css/bootstrap-slate.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-spacelab": "prod/css/bootstrap-spacelab.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-superhero": "prod/css/bootstrap-superhero.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-united": "prod/css/bootstrap-united.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css",
"bootstrap-yeti": "prod/css/bootstrap-yeti.06a6aa56e6059d4a23001b44540767b6b87d4ad21af5bc9ba3885b5f309ceb28.css"
};
module.exports = themes;
7 changes: 7 additions & 0 deletions src/browser/less/tree.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
a {
text-decoration: none !important;
}
.p3x-gitlist-tree-table-item {
opacity: 0.6;
max-width: 50px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
33 changes: 26 additions & 7 deletions src/twig/tree.twig
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,24 @@
{% endembed %}

{% if files is not empty %}
<table class="table table-striped" id="p3x-gitlist-tree-table">
<table class="table table-striped table-hover" id="p3x-gitlist-tree-table">
<thead>
<!--
<tr>
<th width="80%">Name</th>
<th width="10%" style="text-align: right;">Mode</th>
<th width="10%" style="text-align: right;">Size</th>
<th width="35%">Name</th>
<th width="15%" style="text-align: right;">Size</th>
<th width="35%" style="text-align: left;">Message</th>
<th width="15%" style="text-align: right;">Modified</th>
</tr>
-->
<tr>
<th width="15%"></th>
<th width="15%" style="text-align: right;"></th>
<th width="55%" style="text-align: left;"></th>
<th width="15%" style="text-align: right;"></th>
</tr>

</thead>
<tbody>
{% if parent is not null %}
Expand All @@ -108,11 +119,12 @@
</td>
<td></td>
<td></td>
<td></td>
</tr>
{% endif %}
{% for file in files %}
<tr>
<td>
<td nowrap>
{%- if file.type == "folder" or file.type == "symlink" -%}
<span class="fas fa-folder"></span>
&nbsp;
Expand All @@ -136,8 +148,15 @@


</td>
<td style="text-align: right;">{{ file.mode }}</td>
<td style="text-align: right;">{% if file.size %}{{ (file.size / 1024) | number_format }} kb{% endif %}</td>
<td class="p3x-gitlist-tree-table-item" style="text-align: right;" title="{% if file.size %}{{ (file.size / 1024) | number_format | escape}} kb{% endif %}">
{% if file.size %}{{ (file.size / 1024) | number_format }} kb{% endif %}
</td>
<td class="p3x-gitlist-tree-table-item" title="{{ file.message | escape }}">
{{ file.message }}
</td>
<td class="p3x-gitlist-tree-table-item" style="text-align: right;" title="{{ file.lastModified | escape }}" >
{{ file.lastModified }}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.107
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2019.10.110

[![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) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down

0 comments on commit 92c7970

Please sign in to comment.