* Swap swagger-ui with swagger-ui-dist
The prebuilt version of swagger-ui is identical to the regular one but
brings the benefit of faster webpack compilation and less npm
dependencies so it npm installs will speed up too.
* use bundle file directly
* Add class to page content to unify top margin
Previously pages would individually set this margin but some didn't so
content would stick to the header without any space. Resolve this by
adding a new class that is added on all pages. The only place where we
remove this margin again is on the pages with menu or wrapper in the
header.
* fix admin notices
* fix team pages
* fix loading segment on gitgraph for arc-green
* fix last missing case
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
The .blob-excerpt elements don't have these data attributes in some
cases resulting in bogus http request when expanding a diff and clicking
into the expanded area. This prevents those.
Should backport to 1.13.
Fixes: https://github.com/go-gitea/gitea/issues/13759
Turns out some of the dependencies make use of optional dependencies
like the vue-template-compiler. Install them again and install
fomantic-ui only when it's being build to fix webpack warnings.
* Update JS dependencies and misc tweaks
- Update all JS dependencies minus webpack
- Adapt CodeMirrors styling to new CSS parent introduced by EasyMDE
- Set eslint parser to latest and add new eslint 7.14 rule
- Speed up npm install by disabling audit and fund checks
- Move fomantic-ui to optional dependencies to further speed up npm
- Enable syntax highlighting on GH for .eslintrc and .stylelintrc
- Makefile cleanups
* disable audit in npmrc
* add missing dash
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Markdown and Repo header tweaks
- Use CSS vars for all markdown colors
- Tweak repo header, removing double borders and adjust sizes
- Use menu instead of buttons for issue open/close switcher
- Add emoji inversion for select emoji glyphs in arc-green
- Use border over box-shadow for all buttons
- Add spacing element to login form without openid
* repo settings navbar fix
* use shared template in more places and adjust dashboard
* fix remaining open/close combos
* Dropdowns and Labels fixes
- Rework dropdown, menu and label styles
- Improve issue sidebar milestone and label sections
- Fix archived repo and private org badge
- Move more colors to CSS vars
- Move issue number to end of title on issue page
* more dropdown fixes
* fix basic blue labels - fixes#13731
* improve class setting on svg
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* add black list and white list support for migrating repositories
* fix fmt
* fix lint
* fix vendor
* fix modules.txt
* clean diff
* specify log message
* use blocklist/allowlist
* allways use lowercase to match url
* Apply allow/block
* Settings: use existing "migrations" section
* convert domains lower case
* dont store unused value
* Block private addresses for migration by default
* fix lint
* use proposed-upstream func to detect private IP addr
* a nit
* add own error for blocked migration, add tests, imprufe api
* fix test
* fix-if-localhost-is-ipv4
* rename error & error message
* rename setting options
* Apply suggestions from code review
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Push HEAD instead of master when initialising repositories
It is possible on modern gits to change the initial branch to something other than
master. This breaks initialising repositories because we assume that the initial
branch is going to be master unless specifically changed.
This PR simply bypasses this issue by pushing the HEAD rather than the master branch.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/repository/init.go
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
These whitespaces introduced in #13698 seem to break my editorconfig
plugin in sublime text resulting in tab-indented files getting converted
to spaces on save.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
When running gitea for the first time, the stylesheets for the
installation page are broken since the middleware that statically serves
stylesheets does not get executed by chi. This is because if no handlers
are registered in chi, it will drop all middleware.
This commit introduces a "dummy" handler to deal with that quirk.
Closes#13725
Thanks: Lunny Xiao <xiaolunwen@gmail.com> for finding the quirk
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* ui: show 'owner' tag for real owner
Signed-off-by: a1012112796 <1012112796@qq.com>
* Update custom/conf/app.example.ini
* simplify logic
fix logic
fix a small bug about original author
* remove system manager tag
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
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>