Adam Strzelecki [Sun, 6 Dec 2015 23:18:12 +0000 (00:18 +0100)]
Render commit msg as header + verbatim description
Most commit in Git are expected to follow standard of single header line,
followed by description paragraphs, separated by empty line from previous block.
Previously Gogs were treating everything as single header. Now we are trying to
render only first line as header, but following lines (description chunks) as a
verbatim.
Adam Strzelecki [Thu, 3 Dec 2015 12:49:52 +0000 (13:49 +0100)]
UI: More subtle strips on commits list
With grey SHA1 labels, we should consider having also more subtle strips on
commits list. As current strips blend too much with grey SHA1 labels and top
bar, making hard to distinguish headers from content.
Adam Strzelecki [Wed, 2 Dec 2015 23:03:49 +0000 (00:03 +0100)]
UI: Use more subtle grey SHA1 labels
Current green SHA1 labels are more pronounced than other UI elements attracting
attention as if they were most important thing in the UI, while they are not as
important, especially without real Git client.
Using grey SHA1 labels makes the UI more balanced, less aggressive and lets
user to focus on other content elements.
NOTE: Neither GitHub or Bitbucket uses so heavy pronunciation as Gogs.
Adam Strzelecki [Thu, 3 Dec 2015 00:15:40 +0000 (01:15 +0100)]
UI: Display last-commit header without 2nd column
This uses a CSS trick making first th to be relative block with width equal to
first two columns, effectively working around inability to use colspan="2" on
first row that was breaking "fixed-layout" for tables.
Adam Strzelecki [Wed, 2 Dec 2015 22:00:23 +0000 (23:00 +0100)]
Translation: Add missing entry for new "code" tab
We have new tab, but we had no entry. That's why it was showing "code"
(lowercase) as this is text id, where we were expecting properly title cased
"Code" to be shown in English version.
Adam Strzelecki [Mon, 30 Nov 2015 14:38:58 +0000 (15:38 +0100)]
CSS: Ensure Octicons are used with 16px font size
Semantic UI .icon 1em font-size has priority over .octicon 16px, resulting
octicons rendered at 14px font-size, which is not okay since Octicons are meant
to be shown sizes that are multiples of 16px.
Adam Strzelecki [Tue, 1 Dec 2015 13:49:49 +0000 (14:49 +0100)]
LDAP: Optional user name attribute specification
Consider following LDAP search query example:
(&(objectClass=Person)(|(uid=%s)(mail=%s)))
Right now on first login attempt Gogs will use the text supplied on login form
as the newly created user name. In example query above the text matches against
both e-mail or user name. So if user puts the e-mail then the new Gogs user
name will be e-mail which may be undesired.
Using optional user name attribute setting we can explicitly say we want Gogs
user name to be certain LDAP attribute eg. `uid`, so even user will use e-mail
to login 1st time, the new account will receive correct user name.
Adam Strzelecki [Tue, 1 Dec 2015 21:16:00 +0000 (22:16 +0100)]
Makefile: Copy installed binary instead 2nd build
This speeds up single build/rebuild rather than install & build which compiles
everything twice, we just copy installed binary back to the project root.
kakwa [Sat, 28 Nov 2015 14:08:50 +0000 (15:08 +0100)]
Fix dump of log and custom directory in dump cmd
Now, the dump cmd uses setting.CustomPath and setting.LogRootPath
instead of setting.WorkDir which was kind of broken if the gogs
binary was in a different directory than gogs data.
Additionally, the backup of setting.CustomPath directory is only done
if it exists.
kakwa [Sat, 28 Nov 2015 13:07:51 +0000 (14:07 +0100)]
Using a tmp dir to generate db and repo dumps
Using a tmp dir makes gogs dump more robust to concurrent runs.
It also permits an easier cleaning of the tmp files (gogs-db.sql and
gog-repo.zip) by just removing the tmp dir.
As a side effect, it partially fix bugs on workdir.
Previously, 'gogs dump' created the archives in the current directory,
and tried to include these archives from the directory where the
gogs binary lies.
ex: if gogs binary is in /usr/bin/gogs, and gogs dump is run from /tmp/,
/tmp/gog-repo.zip is created, but gogs dump tried to include
/usr/bin/gogs-repo.zip.
kakwa [Sat, 28 Nov 2015 11:11:38 +0000 (12:11 +0100)]
Adding more error handling in dump cmd
The dump cmd did not check the return value of the z.AddFile or
z.AddDir when building the final archive.
It caused the dump command to succeed even if an error occurred.
The resulted dump archive could be corrupted/empty.
(errors could be various: removal by a concurrent process, disk full,
bugs in the dump cmd itself)