summaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
* feat(pr review): add more space on mobile (#21326)kolaente2022-10-111-0/+10
| | | | | | | | | | | | | | | | | This PR adds more space to the review screen on mobile so that comments are more readable and less "squashed" an smaller screens. Before: ![Screen Shot 2022-10-03 at 17 12 26](https://user-images.githubusercontent.com/13721712/193612834-6add9e25-f635-4a5b-84f6-b8e2b320ec29.png) After: ![Screen Shot 2022-10-03 at 17 10 15](https://user-images.githubusercontent.com/13721712/193612671-ab4ef640-0360-44ef-9184-b366b7abeb37.png) Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Update JS dependencies and eslint config (#21388)silverwind2022-10-102-2/+2
| | | | | | | | - Update all JS dependencies and playwright image - Add new eslint rules, enable a few more, fix issues - Regenerate SVGs - Tested Vue and Swagger Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Allow creation of OAuth2 applications for orgs (#18084)qwerty2872022-10-091-1/+3
| | | | | | | | | | Adds the settings pages to create OAuth2 apps also to the org settings and allows to create apps for orgs. Refactoring: the oauth2 related templates are shared for instance-wide/org/user, and the backend code uses `OAuth2CommonHandlers` to share code for instance-wide/org/user. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix typos in PullRequestMergeForm.vue header comment (#21378)Yarden Shoham2022-10-091-2/+2
| | | Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Use weighted algorithm for string matching when finding files in repo (#21370)wxiaoguang2022-10-085-65/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR is for: * https://github.com/go-gitea/gitea/issues/20231 Now, when a user searches `word`, they always see `/{word}.txt` before `/{w}e-g{o}t-{r}esult.{d}at` Demo: When searching "a", "a.ext" comes first. Then when searching "at", the longer matched "template" comes first. <details> ![image](https://user-images.githubusercontent.com/2114189/194588738-3644d891-956f-40e4-b79b-b97d34265456.png) ![image](https://user-images.githubusercontent.com/2114189/194588797-9b124670-4e1e-4510-a170-780295ed89b8.png) </details> This PR also makes the frontend tests could import feature JS files by introducing `jestSetup.js` Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: silverwind <me@silverwind.io>
* Add new CSS variables --color-accent and --color-small-accent (#21305)delvh2022-10-073-7/+13
| | | | | | | | At the moment, this is only used to replace the color of the `viewed` checkbox and of the `has changed` label. Previously, the used variable accentuated always either darker or lighter, which meant that one theme looked good while the other didn't. Co-authored-by: silverwind <me@silverwind.io>
* Fix doc and heatmap for the Vue3 refactoring (#21312)wxiaoguang2022-10-021-16/+12
|
* Refactor from Vue2 to Vue3 (#20044)André Jaenisch2022-10-0113-96/+95
| | | Close #19902
* Consolidate more CSS rules, fix inline code on arc-green (#21260)silverwind2022-09-282-47/+38
| | | | | | | | | - Consolidate various CSS rules into base rules - Fix inline code in Markdown not having enough contrast on arc-green Adds one new color variable, `--color-label-active-bg` for the background of active labels. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Feature: Case-insensitive "find files in repo" (#21269)HeySora2022-09-282-13/+14
| | | | | | | | | | | | | This (short) PR builds upon #15028 and makes the file search case-insensitive. Previously, having a file named `TestFile.cs` would not be shown if `test` was typed in the search box. This now changes the matching function to be case-insensitive (without affecting the UI). The matching function, `strSubMatch`, is only used for this feature (it has been introduced by #15028), meaning that this PR does not affect the behaviour of any unrelated functionality of Gitea.
* Fix empty container layer history and UI (#21251)KN4CK3R2022-09-272-0/+10
| | | Fixes #21248
* Add filetree on left of diff view (#21012)sebastian-sauer2022-09-278-25/+446
| | | | | | | | | | | | | | This PR adds a filetree to the left side of the files/diff view. Initially the filetree will not be shown and may be shown via a new "Show file tree" button. Showing and hiding is using the same icon as github. Folders are collapsible. On small devices (max-width 991 PX) the file tree will be hidden. Close #18192 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use native inputs in whitespace dropdown (#20980)silverwind2022-09-251-0/+3
| | | | | | | | | | | | | | | Use native `<input type="radio">` instead of fake icon font. The `pointer-events: none` is necessary so the link click always takes effect. Tested in Firefox, Safari and Chrome. Before: <img width="305" alt="Screen Shot 2022-08-27 at 20 42 11" src="https://user-images.githubusercontent.com/115237/187044786-6655c766-c3fb-4672-9e3e-219b3ec4896c.png"> After: <img width="298" alt="Screen Shot 2022-08-27 at 21 10 05" src="https://user-images.githubusercontent.com/115237/187044790-33f87741-062e-4744-80b1-d3bd3fd725e3.png"> <img width="302" alt="image" src="https://user-images.githubusercontent.com/115237/187044872-6c133cea-65ee-4ebd-b18a-a8b38c791565.png">
* Various CSS tweaks (#21244)silverwind2022-09-225-99/+61
| | | | | | - Remove arc-green specific rules and instead fix the colors in the base rules. - Make file table row border visible on arc-green. - Remove remnants of fomantic accordeon module that was removed.
* Prevent invalid behavior for file reviewing when loading more files (#21230)delvh2022-09-221-4/+13
| | | | | | | | | | | | | | The problem was that many PR review components loaded by `Show more` received the same ID as previous batches, which confuses browsers (when clicked). All such occurrences should now be fixed. Additionally improved the background of the `viewed` checkbox. Lastly, the `go-licenses.json` was automatically updated. Fixes #21228. Fixes #20681. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enable fluid page layout on medium size viewports (#21178)silverwind2022-09-191-0/+7
| | | | | Fomantic has abrupt breakpoints at 991px and 768px which leads to variable amounts of wasted screen space below those breakpoints. Instead, enable fluid width for all viewport sizes below 1200px.
* File header tweaks (#21175)silverwind2022-09-151-5/+2
| | | | | | | | | | | | - Remove non-matching selector - Set font-size on parent so `.mono` can correctly reduce it Before (font subjectively too big): <img width="1270" alt="Screenshot 2022-09-15 at 19 03 56" src="https://user-images.githubusercontent.com/115237/190466867-283e9c23-cbfa-457e-8dbe-94902e886cc7.png"> After: <img width="1266" alt="image" src="https://user-images.githubusercontent.com/115237/190467290-eb392007-5db2-4ab0-a5be-e7cfe4618dcc.png">
* Add KaTeX rendering to Markdown. (#20571)zeripath2022-09-143-0/+46
| | | | | | | | | | | | | | | | | | | | This PR adds mathematical rendering with KaTeX. The first step is to add a Goldmark extension that detects the latex (and tex) mathematics delimiters. The second step to make this extension only run if math support is enabled. The second step is to then add KaTeX CSS and JS to the head which will load after the dom is rendered. Fix #3445 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove fomantic image module (#21145)silverwind2022-09-127-366/+16
| | | | | | | | | Remove this small, but unnecessary [module](https://fomantic-ui.com/elements/image.html) and use `img` selector over previous `.image`. Did a few tests, could not notice any visual regression. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Improve commit status icons (#21124)silverwind2022-09-093-1/+7
| | | | | | | | | | | | | | | | | | | | | - Show popover on hover/focus (tippy default) instead of click - If there is only one status, add href to trigger element - Increase tippy [interactiveBorder](https://atomiks.github.io/tippyjs/v6/all-props/#interactiveborder), making it easier to keep interactive tooltips open with sloppy mouse movement - Fix a overflow issue in the commit list Commit list before: <img width="459" alt="Screen Shot 2022-09-09 at 19 00 01" src="https://user-images.githubusercontent.com/115237/189405517-68de5a69-e312-4ea2-ab81-87629db6064b.png"> Commit List after: <img width="475" alt="Screen Shot 2022-09-09 at 19 01 43" src="https://user-images.githubusercontent.com/115237/189405574-13e84885-9073-4f86-9eeb-d008c1639647.png"> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Improve arc-green code theme (#21039)silverwind2022-09-032-102/+105
| | | | | | | | | | | | | - Increase contrasts overall - Add various missing theme classes - Ensure strings and constants are colored the same across languages Before: <img width="575" alt="Screen Shot 2022-09-03 at 15 20 19" src="https://user-images.githubusercontent.com/115237/188272267-c3af3de0-a1d9-4a80-a3ab-278e9b04cb44.png"> <img width="705" alt="Screen Shot 2022-09-03 at 15 10 12" src="https://user-images.githubusercontent.com/115237/188272194-dc40ac7d-1629-44a0-a881-5f0922285195.png"> After: <img width="579" alt="Screen Shot 2022-09-03 at 15 19 31" src="https://user-images.githubusercontent.com/115237/188272275-55b87bc7-1122-410f-9250-14cf9e973124.png"> <img width="703" alt="image" src="https://user-images.githubusercontent.com/115237/188272715-a5fcd180-c5dc-4303-8e77-de785d5e0937.png">
* Add down key check has tribute container (#21016)Tyrone Yeh2022-09-031-0/+12
| | | | | | | | Fixes an issue where users would not be able to select by pressing the down arrow when using @TAG above a message Bug videos: https://user-images.githubusercontent.com/1255041/188095999-c4ccde18-e53b-4251-8a14-d90c4042d768.mp4
* Show language name on hover (#20923)JakobDev2022-09-021-1/+1
| | | | Each repo has a bar which shows the used programming languages. If you want to know, what language is behind a color, you need to click the bar. With this PR, you just need to hover over the color the view the name.
* Support Issue forms and PR forms (#20987)Jason Song2022-09-025-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: extend issue template for yaml * feat: support yaml template * feat: render form to markdown * feat: support yaml template for pr * chore: rename to Fields * feat: template unmarshal * feat: split template * feat: render to markdown * feat: use full name as template file name * chore: remove useless file * feat: use dropdown of fomantic ui * feat: update input style * docs: more comments * fix: render text without render * chore: fix lint error * fix: support use description as about in markdown * fix: add field class in form * chore: generate swagger * feat: validate template * feat: support is_nummber and regex * test: fix broken unit tests * fix: ignore empty body of md template * fix: make multiple easymde editors work in one page * feat: better UI * fix: js error in pr form * chore: generate swagger * feat: support regex validation * chore: generate swagger * fix: refresh each markdown editor * chore: give up required validation * fix: correct issue template candidates * fix: correct checkboxes style * chore: ignore .hugo_build.lock in docs * docs: separate out a new doc for merge templates * docs: introduce syntax of yaml template * feat: show a alert for invalid templates * test: add case for a valid template * fix: correct attributes of required checkbox * fix: add class not-under-easymde for dropzone * fix: use more back-quotes * chore: remove translation in zh-CN * fix EasyMDE statusbar margin * fix: remove repeated blocks * fix: reuse regex for quotes Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove black labels and CSS cleanup (#21003)silverwind2022-08-311-4/+0
| | | | Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add support for Vagrant packages (#20930)KN4CK3R2022-08-291-0/+6
| | | | | | | | | | | | | | | | | | * Add support for Vagrant boxes. * Add authentication. * Add tests. * Add integration tests. * Add docs. * Add icons. * Update routers/api/packages/api.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de>
* Change review buttons to icons to make space for text (#20934)silverwind2022-08-264-0/+9
| | | | | The layout on the review code view was broken depending on length of the text. Change all three buttons to icons with tooltip to make more space for these long texts. Fixes: #20922
* Only show relevant repositories on explore page (#19361)Gusted2022-08-251-0/+6
| | | | | | | Adds a new option to only show relevant repo's on the explore page, for bigger Gitea instances like Codeberg this is a nice option to enable to make the explore page more populated with unique and "high" quality repo's. A note is shown that the results are filtered and have the possibility to see the unfiltered results. Co-authored-by: vednoc <vednoc@protonmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de>
* Forbid HTML string tooltips (#20935)silverwind2022-08-231-1/+1
| | | | | | | Tippy allows HTML strings to be passed as content but we do not use this feature (we do pass HTML only as Element), so it's better to disable it for increased security. Ref: https://atomiks.github.io/tippyjs/v6/html-content/#string
* Enable contenthash in filename for dynamic assets (#20813)silverwind2022-08-235-11/+30
| | | | | This should solve the main problem of dynamic assets getting stale after a version upgrade. Everything not affected will use query-string based cache busting, which includes files loaded via HTML or worker scripts.
* Fix UI mis-align for PR commit history (#20845)wxiaoguang2022-08-191-0/+1
|
* Fix create repository page's help text (#20810)Gusted2022-08-181-1/+1
|
* Add badge capabilities to users (#20607)techknowlogick2022-08-181-0/+9
| | | | | Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Correctly escape within tribute.js (#20831)zeripath2022-08-171-4/+5
| | | | | | | When writing html in tribute.js ensure that strings are properly escaped. Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix tooltip init after review (#20814)silverwind2022-08-171-9/+13
| | | | | | | | | | * Fix tooltip init after review Previous code passed a jQuery collection which initTooltip couldn't handle. Instead, iterate the individial matched elements and add a dollar to the variable name to make it clear it's jQuery. Fixes: https://github.com/go-gitea/gitea/issues/20809
* Improve comment header for Mobile (#20781)Gusted2022-08-141-0/+12
| | | | | | | | | | | | | | | | - Since https://github.com/go-gitea/gitea/commit/b9e8fa5beb300eac7bd0623c9d7201a9e3a92a4a the avatar will be inlined into the comment header, so there's more room for the actual comment container(thus more text per line in the comment body). However this didn't take into consideration that the flex didn't allow any wrapping and thus was shrinking the avatar. Well this isn't a perfect solution, as you ideally all want these elements to be individually wrapped(such that `comment-header-right` can be on the same line as `comment-header-left`, which now causes a new line in certain situations). It's a better solution than the current CSS and to not mess with the desktop CSS/HTML. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Switch Unicode Escaping to a VSCode-like system (#19990)zeripath2022-08-131-1/+5
| | | | | | | | | | | | | | | This PR rewrites the invisible unicode detection algorithm to more closely match that of the Monaco editor on the system. It provides a technique for detecting ambiguous characters and relaxes the detection of combining marks. Control characters are in addition detected as invisible in this implementation whereas they are not on monaco but this is related to font issues. Close #19913 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove useless JS operation for relative time tooltips (#20756)silverwind2022-08-121-8/+0
| | | | | | | | | | | This operation that shifts the content from title to data-content is useless when we can directly render the expected HTML instead. This change does prevent these tooltips from working when the user has JS disabled in their browser, but I think we made it clear by now that JS is required for gitea to work properly. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Slightly reduce exclamation icon size (#20753)silverwind2022-08-121-1/+1
| | | | | | | It seemed a tad to big compared to other icons. Shrink it slightly. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix loading button with invalid form (#20754)silverwind2022-08-111-10/+6
| | | | | | | | Previously, if a invalid form was submitted (for example issue with no title), the form could not be re-submitted again because the button would not stay stuck in loading state. Fix that by hooking the 'submit' event instead which triggers only when the form is valid. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Make branch icon stand out more (#20726)Gusted2022-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | * Make branch icon stand out more - Currently the branch icon is "squashed" between the two branch names and feels a bit "amateur-ish" to my feeling(relative to other UI elements). - This patch tries to improve that by making the icon bigger and by adding some margin to not have a "squashed" icon. - This patch also includes a "fix", for some reason this symbol is not centering correctly within the span(or without for that matter), so simply manually patch this by adding `bottom: 1.px`. * Use svg * Apply suggestion Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Replace some icons with SVG (#20741)silverwind2022-08-101-0/+1
| | | | | | | - Replace some icons with SVG - Create teams help page - Application and SSH keys icons - Add new icon for app token - Use fontawesom-send
* Use separate class for tippy targets (#20742)silverwind2022-08-103-4/+10
| | | | | | Previous solution that re-purposed the 'hide' class by making it `!important` had various unintended side-effects where jQuery .show() was not able to outweight it. Use a separate class to prevent these interactions.
* Add support mCaptcha as captcha provider (#20458)Gusted2022-08-104-1/+25
| | | | | https://mcaptcha.org/ Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
* Fix CI status popup (#20737)silverwind2022-08-101-1/+1
|
* Change commit status icons to SVG (#20736)silverwind2022-08-092-2/+3
| | | | | | | | | | | | | | | | | | | | | * Fix commit status popover and switch to svg icons * margin tweak * fix integration, use warning sign for error to match previous * remove fix from here, will be a new pr * use top/bottom positioning * vertically center * use no-entry over alert oction * add exclamation icon * fix test selector * more test fixes
* Replace fomantic popup module with tippy.js (#20428)silverwind2022-08-0916-2101/+179
| | | | | | | | - replace fomantic popup module with tippy.js - fix chaining and add comment - add 100ms delay to tooltips - stopwatch improvments, raise default maxWidth - update web_src/js/features/common-global.js - use type=submit instead of js
* Rework repo buttons (#20602)silverwind2022-08-083-73/+53
| | | | | | | | | | | | | | | | | * Rework repo buttons - Replace "New PR" and "Go to File" button with Icon Button - Move all "Add File" actions into a dropdown button - Remove most custom styling of clone buttons - Margin and wiki tweaks Buttons are now all equal height, mobile layout wraps gracefully. Fixes: https://github.com/go-gitea/gitea/issues/13671 Replaces: https://github.com/go-gitea/gitea/pull/20375 Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add support for Pub packages (#20560)KN4CK3R2022-08-071-0/+19
| | | | | | | | | | | * Added support for Pub packages. * Update docs/content/doc/packages/overview.en-us.md Co-authored-by: Gergely Nagy <algernon@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Gergely Nagy <algernon@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Background color of private list-items updated (#20630)Luke Wyatt2022-08-063-5/+3
| | | A minor color update on the dashboard. This PR simply changes the background from hard-coded light yellow to the theme colors (var).