aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
* Improve arc-green code colors (#12111)silverwind2020-07-012-72/+59
| | | | | | | | | | * Improve arc-green code colors This should fix all previous colors that had too few contrast on the background. I took solarized-dark as a baseline and did various improvments. I removed bold/italic flags because I don't think they fit and generally other tools also don't use those font flags. * diff tweak
* Fix merge section in dark theme (#12086)Lauris BH2020-07-011-26/+29
| | | | | * Fix merge section in dark theme * Fix lint
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-018-185/+826
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Server-side syntax hilighting for all code This PR does a few things: * Remove all traces of highlight.js * Use chroma library to provide fast syntax hilighting directly on the server * Provide syntax hilighting for diffs * Re-style both unified and split diffs views * Add custom syntax hilighting styling for both regular and arc-green Fixes #7729 Fixes #10157 Fixes #11825 Fixes #7728 Fixes #3872 Fixes #3682 And perhaps gets closer to #9553 * fix line marker * fix repo search * Fix single line select * properly load settings * npm uninstall highlight.js * review suggestion * code review * forgot to call function * fix test * Apply suggestions from code review suggestions from @silverwind thanks Co-authored-by: silverwind <me@silverwind.io> * code review * copy/paste error * Use const for highlight size limit * Update web_src/less/_repository.less Co-authored-by: Lauris BH <lauris@nix.lv> * update size limit to 1MB and other styling tweaks * fix highlighting for certain diff sections * fix test * add worker back as suggested Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix commit icon position (#12087)Lauris BH2020-06-292-1/+2
|
* Use custom SVGs for commit signing lock icon (#12017)Cirno the Strongest2020-06-281-1/+5
| | | | | | | | | | | | * Use custom SVGs for commit signing lock icon * missing spans * editorconfig * xmlns and remove aria-hidden Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Shorten markdown heading anchors links (#11903)silverwind2020-06-263-73/+67
| | | | | | | | | | | | | | | | | | | | | This changes the links on headings like '# Usage' in markdown from `https://host/user/repo#user-content-usage` to just `https://host/user/repo#usage` matching GitHub and GitLab. The linked id elements still have the prefix and this behaviour matches GitHub and GitLab too, so JS is needed to scroll to the active anchor. I suspect it's like that to avoid namespace collission between user-generated content and other page content. Compatibilty for old links is included so they will continue to work. Also included are some enhancements to make the clickable area for the link icon larger and fix its color on arc-green. Fixes: https://github.com/go-gitea/gitea/issues/11896 Fixes: https://github.com/go-gitea/gitea/issues/12062
* Add org avatar on top of internal repo icon (#11895)Cirno the Strongest2020-06-263-5/+24
| | | | | | | | | | | | | | | | | * Add org avatar on top of internal repo icon * add color for arc-green * use wrapper div to avoid negative margins * rename class and move div * move div to icon tmpl * remove unnecessary margin for lock octicon * fix label align together with #11891 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use Fomantic's fluid padded for blame full width (#12023)Cirno the Strongest2020-06-251-6/+0
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix gitgraph branch continues after merge (#12044)zeripath2020-06-251-0/+7
| | | | | | | | | | | | | | | | | | | * Fix gitgraph branch continues after merge After fixing the initial problem in #11981 another problem has come to light... Fix #11981 (part 2) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [UI] Sortable Tables Header By Click (#7980)65432020-06-245-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | * [UI] Sortable Tables Header By Click * get rid of padding above header * restart CI * fix lint * convert getArrow JS to SortArrow go func * addopt SortArrow funct * suggestions from @silverwind - tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
* Don't use -webkit-font-smoothing (#12029)mrsdizzie2020-06-241-1/+0
| | | | | | | Don't change font smoothing via CSS. Linked issue has more details, but this seems fowned upon in general and a was also removed from standards track. Hopefully this will be a part of reverting to a native font stack for Gitea. Fixes #11931 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Disable dropzone's timeout (#12024)silverwind2020-06-241-0/+2
| | | | | | | | | | | | Dropzone 4.4 introduced a 30s XHR timeout that will kill any upload still in progress. This disable that timeout again. Ref: https://www.dropzonejs.com/#config-timeout Ref: https://github.com/go-gitea/gitea/pull/10645 Ref: https://xhr.spec.whatwg.org/#the-timeout-attribute Fixes: https://github.com/go-gitea/gitea/issues/12022 Fixes: https://github.com/go-gitea/gitea/issues/11906 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix sticky diff stats container (#12002)Cirno the Strongest2020-06-223-3/+14
| | | | | | | | | | | | | * Fix sticky diff stats container * Use pure CSS sticky instead of Fomantic's JS * add border color to arc-green * add slight padding on sides * make linter happy Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make tabs smaller (#12003)silverwind2020-06-223-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make tabs smaller Fomantic's tabs are excessively wide and with another tab added on the repo tabbar (https://github.com/go-gitea/gitea/pull/8346) it would break the layout on the english language. Globally reduce tab bar padding to around half of the previous values. * disable no-duplicate-selectors linter rule * more tab bar tweaks * more tweaks * merge rules and nesting * remove arc-green weird hover color * few more arc-green tweaks * restore to 12px * tweaks * use half width height padding * final tweak * 10px * remove min-height * 11px * remve new-menu background on light theme too * background fixes for new-menu Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix missing styling for dropdown icon on review button (#11998)Cirno the Strongest2020-06-221-0/+6
| | | | | | | | * Fix missing styling for dropdown icon on review button * Remove unnecessary span element Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use octicons for all repo header buttons (#11890)Cirno the Strongest2020-06-221-2/+2
| | | | | | | | * Use octicons for all repo header buttons * ensure margin isn't set on any other svg outside repo buttons Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Handle multiple merges in gitgraph.js (#11996)zeripath2020-06-201-7/+8
| | | | | | | | | | | | | * Handle multiple merges in gitgraph.js There is a bug in web_src/js/vendor/gitgraph.js whereby it fails to handle multiple merges in a single commit correctly. This PR adds changes to make this work. Fix #11981 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js
* Fix scrollable header on dropdowns (#11893)Cirno the Strongest2020-06-181-1/+1
| | | | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Update Fomantic-UI to 2.8.6 and remove old workarounds (#11933)Cirno the Strongest2020-06-172-11/+0
| | | | Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Align show/hide outdated button on code review block (#11932)Cirno the Strongest2020-06-171-0/+6
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix alignment for show/hide outdated link on resolved conversation (#11881)Cirno the Strongest2020-06-151-0/+5
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Rework blame template and styling (#11885)Cirno the Strongest2020-06-152-6/+15
| | | | | | | * Rework blame template and styling * cleanup template and add missing NumLines Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Vertically align review icons on repository sidebar (#11880)Cirno the Strongest2020-06-151-0/+4
| | | | | | | | | | | * Vertically align review icons on repository sidebar * Update web_src/less/_repository.less Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Better align items using flex within review request box (#11879)Cirno the Strongest2020-06-151-6/+14
| | | | | | | | * Better align items using flex within review request box * use justify-content Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* ui: Show update branch item in merge box when it's necessary (#11761)赵智超2020-06-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ui: Show update branch item in merge box when it's necessary As title, should show it without care about whether this pr can be merged. fix #10959 Signed-off-by: a1012112796 <1012112796@qq.com> * fix ui * Fix ui, thanks to @silverwind. Co-authored-by: silverwind <me@silverwind.io> * fix lint * Update templates/repo/issue/view_content/pull.tmpl Co-authored-by: silverwind <me@silverwind.io> * Apply review suggestion Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Don't add same line code comment box twice (#11837)silverwind2020-06-101-8/+24
| | | | | | | | | | | | | | | | | * Don't add same line code comment box twice Clicking the same '+' button multiple times adds multiple comment boxes to the same line. Prevent this by assigning a unique key to each comment box and checking if it already exists in the DOM. Also cleaned up the code around this a bit. * Update web_src/js/index.js Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Re-center the cog on the center of the lock (#11844)zeripath2020-06-101-1/+1
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Replace jquery-datetimepicker with native date input (#11684)silverwind2020-06-104-99/+0
| | | | | | | | | | | | This removes the jQuery plugin as well as the associated config options. Native input[type=date] does not require a language attribute as it is localized by default, except for the placeholder attribute for which I currently piggy-back the repo.issues.due_date_form localization option. Implementation should pretty much match GH. Of note is that Safari does not provide a UI for this input type, but I don't think providing one is neccessary and GH did not bother either. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix inserting excerpt on compare diff (#11833)Cirno the Strongest2020-06-101-1/+1
| | | | | | | | | * Fix inserting excerpt on compare diff * use currentTarget * remove comment Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* rework eslint config (#11615)silverwind2020-06-094-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | * rework eslint config - use explicit config that only enables rules - upgrade eslint to 7.1.0 - add new plugins with selected rules enabled - fix discovered issues, remove global wipPrefixes * remove if * undo template change * add disabled rules as well for easier config updating * add missing disabled rule * update eslint and plugins * fix new violation * remove deprecated rules Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix reply octicon (#11821)John Olheiser2020-06-091-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Use crispEdges rendering for octicon-internal-repo (#11801)Cirno the Strongest2020-06-091-0/+8
| | | | | | | * Use crispEdges rendering for octicon-internal-repo * Update _svg.less Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Work around fomantic 2.8.5 bugs (#11767)Cirno the Strongest2020-06-071-0/+8
| | | | | | | | Work around fomantic 2.8.5 bugs Closes #11759 Related fomantic/Fomantic-UI#1372 and fomantic/Fomantic-UI#1473
* Fix align issues and decrease avatar size on PR timeline (#11689)Cirno the Strongest2020-06-061-11/+14
| | | | | | | | * Fix margin for referenced issue title * Change avatar size to 20px, align referenced issue title to avatar * better align
* Initialize SimpleMDE when making a code comment (#11749)zeripath2020-06-062-13/+26
| | | | | | Fix #11704 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-Authored-By: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
* Add internal-repo octicon for public repos of private org (#11529)Cirno the Strongest2020-06-051-0/+2
| | | | | | | | | | | | | | | | | | | * Show multiple octicons on repo list * fix mixed spaces/tabs * Internal repo octicon * show internal icon in dashboard repolist * swagger * fix icon for normal repo on repo page * don't expose owner visibility directly; provide internal in repo api * fix icons for forks and mirrors Co-authored-by: Lauris BH <lauris@nix.lv>
* Update fomantic-ui to 2.8.5 (#11736)silverwind2020-06-031-260/+0
| | | | | | Update to [2.8.5](https://github.com/fomantic/Fomantic-UI/releases/tag/2.8.5) and remove the workaround for the CSS build race condition. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* export monaco editor on window.codeEditors (#11739)silverwind2020-06-031-0/+8
| | | | | Fixes: https://github.com/go-gitea/gitea/issues/10409 Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix styling for commiter on diff view (#11715)Cirno the Strongest2020-06-021-0/+18
| | | | | | | | | | | | | | | | | | | | * Fix styling for commiter on diff view * Update options/locale/locale_en-US.ini * Update templates/repo/commit_page.tmpl Co-authored-by: silverwind <me@silverwind.io> * Update templates/repo/commit_page.tmpl Co-authored-by: silverwind <me@silverwind.io> * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Show full GPG commit status on PR commit history (#11702)Cirno the Strongest2020-06-021-1/+2
| | | | | | | | | | * Show full GPG commit status on PR commit history * move shabox badge to separate template * unnecessary $ Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Properly truncate system notices (#11714)zeripath2020-06-022-1/+19
| | | | | | | | | | | | | | | | | | | | * Properly truncate system notices As noted in #11658 the system notifications list will always suffix system notices with ... even when the notice is longer than 120 characters. Instead we should use .text.truncate to auto truncate and make the notices clickable to view their details. Signed-off-by: Andrew Thornton <art27@cantab.net> * As per @CirnoT make table cell clickable * ensure that pre wraps Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make tabular menu styling consistent for arc-green (#11570)Cirno the Strongest2020-05-301-28/+24
| | | | | | | | | | | | | | | | * Make tabular menu styling consistent for arc-green * rework completely * transparent borders * use darker color for active item; override only colors for borders * Update web_src/less/themes/theme-arc-green.less Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net>
* Normalize avatar radius (#11589)Cirno the Strongest2020-05-291-1/+6
| | | | | We already made avatars square for .ui avatar.img class but this is not enough, and in some place Fomantic default styling still applied. This PR updates our override of radius to match all Fomantic classes.
* Fix alignment for commits on dashboard (#11595)mrsdizzie2020-05-271-6/+15
| | | | | Fix alignment issue between commit SHA and commit message
* Apply padding to approval icons on PR list (#11622)Cirno the Strongest2020-05-261-0/+6
| | | | Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* Fix missing styling for shabox on PR commit history (#11625)Cirno the Strongest2020-05-261-65/+67
|
* Fix styling for PR merge section when no checks (#11609)Cirno the Strongest2020-05-251-1/+13
| | | Makes styling consistent between two cases. Also removed unnecessary double border.
* Style code review comment for arc-green (#11572)Cirno the Strongest2020-05-251-3/+36
| | | | | | | | * Style code review comment for arc-green * change border around review for light; update border around textarea to match #11570 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix margin on PR form (#11566)Cirno the Strongest2020-05-251-0/+4
|
* Fix margin for attached top header on code review (#11571)Cirno the Strongest2020-05-251-1/+4
| | | | | Introduced naively by #11463 The margin was being applied too widely.