Indentation-related rules are disabled because indent templates with
tabs but our lint rules expect spaces.
Also had to exclude a few files where using template variables in the JS
is causing syntax errors for the JS parser. I don't think there's a way
to solve this otherwise.
Co-authored-by: Lauris BH <lauris@nix.lv>
* Prevent clone protocol button flash on page load
Previously, the saved active buttons would flash on page load because if
delay involved in JS execution. Prevent these flashes bydisabling
transitions on page load and run the script right after. It's not an
ideal solution (which would require server-side storage of user
settings like this) but I'd say better than before.
* add defer
Co-authored-by: zeripath <art27@cantab.net>
* Support shortened commit SHAs in URLs and API
* Add test case for short sha
* Fix format
* Revert API support
* Add canonical link headers for short commit ID URLs
* Issue and Pulls lists rework
Reorganized and restyled the issue and pull request lists.
* color and layout tweaks
* use new issue list on dashboard as well
* move pagination into template
* misc tweaks
* fix label hover
* fix milestone list
* fix discrepancies between issue and milestone list, add new 'merge' helper
* fmt
* simplify merge helper
* remove whitespace
* fix startIndex
* further simplify dict merging
* rename helper to 'mergeinto' for clarity
* allow bottom-row to wrap
Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix heatmap rendering in Chrome and Safari
Apparently SVG inside flexbox renders slightly different across browsers
where Firefox would stretch to fit the parent while Chrome and safari
wouldn't. Stretch the SVG to the width of the parent for consistent
rendering.
Also did a few minor tweaks on the min-height of the box so it takes up
less space on smaller responsive breakpoints.
Fixes: https://github.com/go-gitea/gitea/issues/13634
Fixes: https://github.com/go-gitea/gitea/pull/13637
* position tweak
Co-authored-by: zeripath <art27@cantab.net>
* Add time filter for issue search
* Add limit option for paggination
* Add Filter for: Created by User, Assigned to User, Mentioning User
* update swagger
* Add Tests for limit, before & since
* Handle incomplete diff files properly
The code for parsing diff hunks has a bug whereby a very long line
in a very long diff would not be completely read leading to an unexpected
character.
This PR ensures that the line is completely cleared
Fix#13602
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Also allow git max line length <4096
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add test case
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Correct oauth signup title
When linking accounts, a password is not required anymore,
so this string becomes confusing
* string "remenber me": be more precise
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fixes#13641 - Filtering in Pull Request kept all the time.
- The URL contains all the time the assignee in cases
where once a type has been selected.
Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
* Followup Fixes#13641 - Filtering in Pull Request kept all the time.
- The URL contains all the time the assignee in cases
where once a type has been selected.
- The same behaviour was observed issues viewed via milestones.
Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
* Remove fetch request from heatmap
Render heatmap data directly to HTML, eliminating one HTTP request on
frontpage and user profile. Also added min-height to the container so
the page content will no longer move after loading.
* rename and error display
* also log the js error
* add error handler
* remove useless inline style and hide divider on small screens
* Update routers/user/home.go
* Update routers/user/profile.go
* add Arch Linux
* add Arch Linux ARM
* remove Debian
There is no package in any of Debian's official repositories as of 17.11.2020 17:55 UTC.
* shrink Alpine Linux
* Update docs/content/doc/installation/from-package.en-us.md
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
This enabled HTTP time-based cache for storage assets, primarily
avatars. I have not observed If-Modified-Since from browsers during
tests but I guess it's good to support regardless.
It introduces a new generic httpcache module that can handle both
time-based and etag-based caching.
Additionally, manifest.json and robots.txt are now also cachable.
* Fix label display on new issues
PR #13570 broke label rendering for new issues and pulls because
missed the fact that the code was relying on the DOM elements being
toggled by JavaScript.
On top of that, the label rendering for new issues and pull was using
an outdated template which I consolidated in a new shared template.
* remove wrapper element and style tweaks
* style tweaks
* use shared template for whole label list
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Previously it was reduced globally from 700 to 500 but it actually needs
to be 600 to match GitHub's rendering.
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
* Use mount but not register for chi routes
* Fix test
* Fix test
* Fix test
* Fix comment
* turn back unnecessary change
* Remove the timout middleware since some operations may spend much time.
* When building rootless docker image move chown&chmod to build stage
Fixes#13577
* Fix command newlines
* Move chown to COPY command
* Seems to be working also without chmod
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* CSS color variables, less bold font weight
- Define color variables for fully saturated colors and apply them where
it made sense
- Add background color helper classes
- Globally reduce bold font weight from 700 to 500
- Remove border from timeline icons
- Unify dropzone styling
- Various border style consolidations
* attempt to fix test
* another attempt at tests
* fix contains
Go templates are syntactically very similar to handlebars, this enabled
their syntax highlighting on GitHub.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix issue label rendering
Prevent rendering of inactive labels and make them wrap inline.
Fixes: https://github.com/go-gitea/gitea/issues/13566
* also don't render the placeholder
Co-authored-by: techknowlogick <techknowlogick@gitea.io>