aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
* Add Mermaid copy button, avoid unnecessary tooltip hide (#22225)silverwind2022-12-254-9/+23
| | | | | | | | | | | | | - Add Copy button to mermaid diagrams which copies their source. - Set tippy to not hide on click and avoid tooltip re-creation for temporary tooltips. This avoids hide and show when copying repo url. Popovers still hide the tooltip as usual. <img width="815" alt="Screenshot 2022-12-23 at 14 02 32" src="https://user-images.githubusercontent.com/115237/209341696-98e30953-f246-46d9-9157-2ececfd791c9.png"> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* JS refactors (#22227)silverwind2022-12-2435-89/+47
| | | | | | - Replace all default exports with named exports, except for Vue SFCs - Remove names from Vue SFCs, they are automatically inferred from the filename - Misc whitespace-related tweaks
* Hide file borders on sticky diff box (#22217)silverwind2022-12-231-0/+2
| | | | | | | | | | | | | Before: (1px border left and right when scrolled to a file) <img width="1143" alt="Screenshot 2022-12-22 at 15 37 54" src="https://user-images.githubusercontent.com/115237/209158082-c1a413b1-45b7-46b7-a71c-8e5a06324f43.png"> After: (no border) <img width="1149" alt="Screenshot 2022-12-22 at 15 39 01" src="https://user-images.githubusercontent.com/115237/209158086-9b00641f-2f41-4de1-9c08-22230c8a966a.png"> Layout in the box does not shift with the changes. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fixed colour transparency regex matching in project board sorting (#22091) ↵MisterCavespider2022-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#22092) As described in the linked issue (#22091), semi-transparent UI elements would result in JS errors due to the fact that the CSS `backgroundColor` element was being matched by the pattern `^rgb\((\d+),\s*(\d+),\s*(\d+)\)$`, which does not take the alpha channel into account. I changed the pattern to `^rgba?\((\d+),\s*(\d+),\s*(\d+).*\)$`. This new pattern accepts both `rgb` and `rgba` tuples, and ignores the alpha channel (that little `.*` at the end) from the sorting criteria. The reason why I chose to ignore alpha is because when it comes to kanban colour sorting, only the hue is important; the order of the panels should stay the same, even if some of them are transparent. Alternative solutions were discussed in the bug report and are included here for completeness: 1. Change the regex from ^rgb\((\d+),\s*(\d+),\s*(\d+)\)$ to ^rgba?\((\d+),\s*(\d+),\s*(\d+)(,\s*(\d+(\.\d+)?))?\)$ (alpha channel is a float or NaN on 5th group) and include the alpha channel in the sorting criteria. 2. Rethink on why you're reading colours out of the CSS in the first place, then reformat this sorting procedure. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Mobile fix for Project view: Add delay to Sortable.js on mobile, to ensure ↵Nathaniel Sabanski2022-12-201-0/+4
| | | | | | | | | | | | | | | | | | | | scrolling is possible. (#22152) Mobile / touch devices currently get "hung up" on the sortable action, preventing any ability to visually scroll through the Project board to see issues. Solution: Sortable.js has a built-in fix using `delayOnTouchOnly` BEFORE https://user-images.githubusercontent.com/24665/208266817-6f2968b7-4788-4656-a941-f85b25fc59d5.mp4 AFTER https://user-images.githubusercontent.com/24665/208266822-3d327002-7a9d-41cf-9890-6d6b8dcb17be.mp4 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix heatmap first color being unused (#22157)silverwind2022-12-191-0/+7
| | | | | | | | | | | | | | | | | | | vue3-calendar-heatmap has the behaviour that the first and second colors are mapped to values null and 0, meaning the second color was not used as intended for values > 0. I think this is a behaviour change from previous vue2 version that was missed during the upgrade. This change makes first and second values the same, so the heatmap can now use one additional color for meaningful values. Before: <img width="710" alt="Screenshot 2022-12-18 at 09 17 58" src="https://user-images.githubusercontent.com/115237/208288347-df4973af-8ebd-4582-b828-bec948ffdf60.png"> After: <img width="709" alt="Screenshot 2022-12-18 at 09 18 15" src="https://user-images.githubusercontent.com/115237/208288350-e0b85aa2-6925-4a37-83d2-89e2518c91ce.png"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix margin and alignment in dashboard repolist (#22120)silverwind2022-12-171-1/+5
| | | | | | | | | | | | | | | | Seems this has recently regressed, previously, there was a significant whitespace between icon and text, but it seems to be gone, so I added the margin and also vertically aligned the icon because it was slightly misaligned. Before: <img width="419" alt="Screenshot 2022-12-13 at 20 03 51" src="https://user-images.githubusercontent.com/115237/207422938-7c45110c-f73e-4344-afc8-c072266d1f95.png"> After: <img width="419" alt="image" src="https://user-images.githubusercontent.com/115237/207447579-95525405-574d-4ca8-84ba-d8a9af50015a.png"> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fixed Project view .board-column height for tall screens. (#22108)Nathaniel Sabanski2022-12-141-1/+2
| | | | | | | | | | | | | | | | | This bug occurs because we are calculating `.board-column` height strictly off of `vh`, when the layout header is of static height. BEFORE https://user-images.githubusercontent.com/24665/206991060-372c24e3-986e-4fc6-9fc8-aab8b4ef09bb.mp4 AFTER https://user-images.githubusercontent.com/24665/206991070-91b7cbab-d807-4016-8696-e43bdaf8a7ff.mp4
* Fix autofilled text visibility in dark mode (#22088)Chongyi Zheng2022-12-131-0/+6
| | | Fixes #22087
* Change ID pattern of raw content container for issue (#21966)Felipe Leopoldo Sologuren Gutiérrez2022-12-102-2/+2
| | | | | Implement differentiation to html id for issue raw content container. Fixes #21965
* Release and Tag List tweaks (#21712)silverwind2022-12-063-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reduce font size on tag list and add muted links - Move Release tag to right side on release list - Move Release edit button to far-right and make it icon-only - Add styles for error dropdowns, seen on release edit page - Make the release page slightly more mobile-friendly <img width="468" alt="Screen Shot 2022-11-07 at 22 10 44" src="https://user-images.githubusercontent.com/115237/200417500-149f40f5-2376-42b4-92a7-d7eba3ac359d.png"> <img width="1015" alt="Screen Shot 2022-11-07 at 22 27 14" src="https://user-images.githubusercontent.com/115237/200419201-b28f39d6-fe9e-4049-8023-b301c9bae528.png"> <img width="1019" alt="Screen Shot 2022-11-07 at 22 27 27" src="https://user-images.githubusercontent.com/115237/200419206-3f07d988-42f6-421d-8ba9-303a0d59e711.png"> <img width="709" alt="Screen Shot 2022-11-07 at 22 42 10" src="https://user-images.githubusercontent.com/115237/200421671-f0393cde-2d8f-4e1f-a788-f1f51fc4807c.png"> <img width="713" alt="Screen Shot 2022-11-07 at 22 42 27" src="https://user-images.githubusercontent.com/115237/200421676-5797f8cf-dfe8-4dd6-85d4-dc69e31a9912.png"> <img width="406" alt="image" src="https://user-images.githubusercontent.com/115237/200418220-8c3f7549-61b4-4661-935e-39e1352f7851.png"> <img width="416" alt="Screen Shot 2022-11-07 at 22 21 36" src="https://user-images.githubusercontent.com/115237/200418107-cdb0eb6f-1292-469c-b89a-2cb13f24173c.png"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* fix(web): reduce page jitter on browsers that support overlay scrollbar (#21850)Percy Ma2022-12-041-0/+7
| | | | | | | | | | | | | Reduce jitter caused by the presence or absence of scrollbars in page switching --- Ref [scrollbar-gutter | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) https://user-images.githubusercontent.com/45708948/165972251-7d5a5017-f76d-4ba2-9106-a224b3ee521f.mp4
* Multiple improvements for comment edit diff (#21990)silverwind2022-12-023-25/+42
| | | | | | | | | | | | | | | - Use explicit avatar size so when JS copies the HTML, the size gets copied with it - Replace icon font use with SVG - Improve styling and diff rendering - Sort lists in `svg.js` Fixes: https://github.com/go-gitea/gitea/issues/21924 <img width="933" alt="Screenshot 2022-11-30 at 17 52 17" src="https://user-images.githubusercontent.com/115237/204859608-f322a8f8-7b91-45e4-87c0-82694e574115.png"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix markdown anchor re-clicking (#21931)silverwind2022-11-261-6/+9
| | | | | | | | | The hashchange event did not fire on re-click of a active anchor. Instead, use the click event which always fires. Fixes: https://github.com/go-gitea/gitea/issues/21680 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Prevent NPE if trying to restore an already restored deleted branch (#21940)zeripath2022-11-251-0/+6
| | | | | | | | | | If a deleted-branch has already been restored, a request to restore it again will cause a NPE. This PR adds detection for this case, but also disables buttons when they're clicked in order to help prevent accidental repeat requests. Fix #21930 Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix(web): keep the pages of the navigation in the center (#21867)Percy Ma2022-11-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Keep the pages of the navigation in the center <table> <tr> <th>Before</th> <th>After</th> </tr> <tr> <td> <img width="200" alt="image" src="https://user-images.githubusercontent.com/45708948/202838756-d6d57b3f-8144-4a43-a33b-ea7c8ab3a495.png"> </td> <td> <img width="192" alt="image" src="https://user-images.githubusercontent.com/45708948/202838740-bbae1e86-b14c-421d-92d4-d0e53d5952a2.png"> </td> </tr> </table> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Fix scroll over mermaid frame (#21925)silverwind2022-11-241-1/+1
| | | | | | | | | | When starting a scroll while the mouse is over a mermaid diagram, the scroll sometimes propagates to the iframe, preventing the parent page from scrolling. Fix this by disabling scroll inside the iframe. This is not a problem because those frames are never meant to scroll. Bug seems to affect Firefox only. ![scroll](https://user-images.githubusercontent.com/115237/203847578-6831e3c8-9df4-4577-8501-822fb9ea1278.gif)
* Fix table misalignments and tweak webhook and githook lists (#21917)silverwind2022-11-241-2/+8
| | | | | | | | - Fix regression from #21893 which had misaligned a few tables like repo lists and e-mails - Bring githooks list in line with webhooks list for styling - Change webhook list icons to just colored dots, like githook list - Increase size of dot in webhook and githook list from 16 to 22px
* feat: add button to quickly clear merge message (#21548)kolaente2022-11-231-0/+11
| | | | | | | | | | | | | | | | | | | This PR adds a button to allow quickly clearing the merge message of a PR. The button will remove everything but the git trailers. I found myself often pruning the commit message before merging, especially for PRs generated by renovate - renovate puts a very long and detailed comment with the full changelog in each PR it opens. This clutters the commit message. However, I want to explicitly preserve the git commit trailers. Doing this manually works, but having a button is a lot easier. Screenshot: ![image](https://user-images.githubusercontent.com/13721712/197337525-d456d0f8-1f7c-43a9-815d-ca93b1e7a90a.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Move all remaining colors into CSS variables (#21903)silverwind2022-11-235-43/+67
| | | | | This should eliminate all non-variable color usage in the styles, making gitea fully themeable via CSS variables. Also, it adds a linter to enforce variables for colors.
* Fixes #21895: standardize UTC tz for util tests (#21897)Felipe Leopoldo Sologuren Gutiérrez2022-11-221-2/+2
| | | Standardize UTC timezone for `translateMonth` and `translateDay` tests.
* Update JS dependencies (#21881)silverwind2022-11-224-5/+5
| | | | | | | | - Update all JS deps - Regenerate SVGs - Add new eslint rules, fix issues - Tested Mermaid, Swagger, Vue, Webpack, Citation Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Webhook list enhancements (#21893)silverwind2022-11-223-4/+10
|
* Embed Matrix icon as SVG (#21890)silverwind2022-11-213-4/+17
| | | | | | | | | | Embed the SVG icon directly, making further invertion unnecessary because the icon color can now follow text color. <img width="240" alt="Screenshot 2022-11-21 at 20 16 32" src="https://user-images.githubusercontent.com/115237/203142189-89f20de9-c0bd-4d05-92c0-44dadf20d78f.png"> <img width="245" alt="Screenshot 2022-11-21 at 20 16 46" src="https://user-images.githubusercontent.com/115237/203142191-658239ba-1859-49c6-91ad-10ddf14780d0.png">
* Improvements for Content Copy (#21842)silverwind2022-11-218-21/+133
| | | | | | | | | It now supports copying Markdown, SVG and Images (not in Firefox currently because of lacking [`ClipboardItem`](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem) support, but can be enabled in `about:config` and works). It will fetch the data if in a rendered view or when it's an image. Followup to https://github.com/go-gitea/gitea/pull/21629.
* Timeline and color tweaks (#21799)silverwind2022-11-194-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to https://github.com/go-gitea/gitea/pull/21784. - Restore muted effect on timeline author and issuelist comment icon - Remove whitespace inside shared user templates, fixing link hover underline - Use shared author link template more - Use `bold` class instead of CSS - Fix grey-light color being too dark on arc-green - Add missing black-light color - Fix issuelist progress bar color - Fix various other cases of missing `.muted` <img width="416" alt="Screenshot 2022-11-13 at 12 15 22" src="https://user-images.githubusercontent.com/115237/201519497-1d4725c6-bc8b-47b5-9f68-1278ac9a8c92.png"> <img width="324" alt="Screenshot 2022-11-13 at 12 16 52" src="https://user-images.githubusercontent.com/115237/201519501-c0d03700-f9af-4316-ab46-482f2c7c738b.png"> <img width="79" alt="Screenshot 2022-11-13 at 12 30 55" src="https://user-images.githubusercontent.com/115237/201519502-46dc2d73-bbdf-4a2e-84d3-d2976f793163.png"> <img width="440" alt="Screenshot 2022-11-13 at 12 41 03" src="https://user-images.githubusercontent.com/115237/201519876-ada33948-f84a-4aeb-a40d-5c873f9a49e9.png"> <img width="213" alt="Screenshot 2022-11-13 at 12 52 54" src="https://user-images.githubusercontent.com/115237/201520291-a4d7238e-aeca-46c7-9008-8b644b1b676e.png"> <img width="208" alt="Screenshot 2022-11-13 at 12 56 16" src="https://user-images.githubusercontent.com/115237/201520436-aa8ba109-b959-42fb-831a-021e806c7082.png"> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Tweak katex options (#21828)silverwind2022-11-171-4/+6
| | | | | | | | | - Render directly into DOM, skipping string conversion - Add limiting options to prevent excessive size/macros - Remove invalid `display` option previously passed Ref: https://katex.org/docs/options.html Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* fix webpackChunkName for citation-js-csl (#21806)silverwind2022-11-131-1/+1
|
* Simplify text color selectors and tweak arc-green colors (#21784)silverwind2022-11-122-87/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the text color rules out of the unneeded `.ui` block, add missing colors, tweak colors on arc-green to be more readable (red was particulary bad to read). Also, this removes the previous inheritance of link colors. I think links should always be in primary color and if they are to be discolored, the color should be set on them explicitely. <img width="165" alt="Screenshot 2022-11-12 at 13 28 30" src="https://user-images.githubusercontent.com/115237/201474098-700d9fed-3133-43c7-b57e-d4cc5c2795cb.png"> <img width="152" alt="Screenshot 2022-11-12 at 13 18 48" src="https://user-images.githubusercontent.com/115237/201474156-b6de4cb5-bce8-4553-b3d4-8365aff9a3a7.png"> HTML to test with: ```html <div class="text red">some text with <a href="#foo">a link</a>.</div> <div class="text orange">some text with <a href="#foo">a link</a>.</div> <div class="text yellow">some text with <a href="#foo">a link</a>.</div> <div class="text olive">some text with <a href="#foo">a link</a>.</div> <div class="text green">some text with <a href="#foo">a link</a>.</div> <div class="text teal">some text with <a href="#foo">a link</a>.</div> <div class="text blue">some text with <a href="#foo">a link</a>.</div> <div class="text violet">some text with <a href="#foo">a link</a>.</div> <div class="text purple">some text with <a href="#foo">a link</a>.</div> <div class="text pink">some text with <a href="#foo">a link</a>.</div> <div class="text brown">some text with <a href="#foo">a link</a>.</div> <div class="text grey">some text with <a href="#foo">a link</a>.</div>
* Copy citation file content, in APA and BibTex format, on repo home page (#19999)Nolann2022-11-113-1/+113
| | | Add feature to easily copy CITATION.cff content in APA and BibTex format.
* Ignore line anchor links with leading zeroes (#21728)silverwind2022-11-112-15/+39
| | | | | Fixes: https://github.com/go-gitea/gitea/issues/21722 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734)Xinyu Zhou2022-11-092-3/+4
| | | | | | | | | | | | fixes: https://github.com/go-gitea/gitea/issues/21733 Uncaught Error: Language id "vs.editor.nullLanguage" is not configured nor known Note that this monaco-editor worked fine on 0.33.0 and broke on 0.34.0. If upstream fixed, remove this code. Signed-off-by: Xinyu Zhou <i@sourcehut.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix UI language switching bug (#21597)wxiaoguang2022-11-091-1/+1
| | | | | | | | | | | | | | Related: * https://github.com/go-gitea/gitea/pull/21596#issuecomment-1291450224 There was a bug when switching language by AJAX: the irrelevant POST requests were processed by the target page's handler. Now, use GET instead of POST. The GET requests should be harmless. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add attention blocks within quote blocks for `Note` and `Warning` (#21711)Yarden Shoham2022-11-091-0/+14
| | | | | | | | | | | | | | | | | | For each quote block, the first `**Note**` or `**Warning**` gets an icon prepended to it and its text is colored accordingly. GitHub does this (community/community#16925). [Initially requested on Discord.](https://discord.com/channels/322538954119184384/322538954119184384/1038816475638661181) ### Before ![image](https://user-images.githubusercontent.com/20454870/200408558-bd318302-6ff9-4d56-996f-9190e89013ec.png) ### After ![image](https://user-images.githubusercontent.com/20454870/200658863-1bac6461-dae7-4bf2-abd2-672d209574e4.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: silverwind <me@silverwind.io>
* Add "Copy" button to file view of raw text (#21629)Yarden Shoham2022-11-041-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | If a raw text file is displayed, a copy button of the text is enabled. * Closes #12866 ### Before ![image](https://user-images.githubusercontent.com/20454870/198898628-df1bcb0c-79d7-4ffb-95e4-441d77430827.png) ### After ![image](https://user-images.githubusercontent.com/20454870/199988152-ea1099ad-29e1-4765-a9ca-4c03c1737453.png) #### Rendered files and binaries have their button disabled ![image](https://user-images.githubusercontent.com/20454870/199988408-73de6327-5e9e-462b-b2b6-8c3f5b878386.png) ![image](https://user-images.githubusercontent.com/20454870/199988563-844f8656-f48d-4929-880e-b6558c1c054a.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Clean up formatting on install page (#21668)zeripath2022-11-031-16/+37
| | | | | | | | | | | | | | | | | | | | | The install page has been somewhat inconsistently styled for a while. This PR simplifies and standardises the styling of these fields makes things line up better across widths. Replace #21660 Signed-off-by: Andrew Thornton <art27@cantab.net> Old: ![Screenshot from 2022-11-02 23-07-05](https://user-images.githubusercontent.com/1824502/199619007-4a6b66c5-e19c-4d29-b71b-9aa73f2789ca.png) New: ![Screenshot from 2022-11-02 23-04-28](https://user-images.githubusercontent.com/1824502/199618779-370f88e7-b590-4abd-afb9-b66cc3194a5d.png) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix opaque background on mermaid diagrams (#21642)silverwind2022-10-312-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Browsers introduce a opaque background on iframes if the iframe element's color-scheme does not match the document's color scheme which in case of a dark theme results in a mismatch and the browser adds a white background. Avoid this by specifying the same color scheme outside and inside the iframe. See https://fvsch.com/transparent-iframes for more info. My initial attempt was to make the iframe document the same color-scheme as the parent page (light or dark) but with that, there was a ugly background flash on load in Chrome because Chrome apparently always loads iframe in light scheme initially. Firefox still shows a background flash on load but this is not possible to get rid of and it's certainly a browser bug. Before: <img width="1147" alt="Screen Shot 2022-10-31 at 13 30 55" src="https://user-images.githubusercontent.com/115237/199017132-9828aace-bdd0-4ede-8118-359e72bcf2fe.png"> After: <img width="1152" alt="Screen Shot 2022-10-31 at 13 30 36" src="https://user-images.githubusercontent.com/115237/199017137-989a9e67-3fe0-445f-a191-df5bf290dabf.png">
* fix: PR status layout on mobile (#21547)kolaente2022-10-281-0/+38
| | | | | | | | | | | | | | | | | This PR fixes the layout of PR status layouts on mobile. For longer status context names or on very small screens the text would overflow and push the "Details" and "Required" badges out of the container. Before: ![Screen Shot 2022-10-22 at 12 27 46](https://user-images.githubusercontent.com/13721712/197335454-e4decf09-4778-43e8-be88-9188fabbec23.png) After: ![Screen Shot 2022-10-22 at 12 53 24](https://user-images.githubusercontent.com/13721712/197335449-2c731a6c-7fd6-4b97-be0e-704a99fd3d32.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Localize time units on activity heatmap (#21570)Yarden Shoham2022-10-284-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the months and days were hardcoded into English * Closes #15541 ## Screenshots ### English ![image](https://user-images.githubusercontent.com/20454870/197410352-1b28a637-ce19-41ae-b4e5-27955555b082.png) ### German ![image](https://user-images.githubusercontent.com/20454870/197410455-f243ca84-807f-476e-b8ed-c24e827bfc2d.png) ### Spanish ![image](https://user-images.githubusercontent.com/20454870/197410366-55202ca5-08f9-4152-8f9d-d5eeebd532ef.png) ### Italian ![image](https://user-images.githubusercontent.com/20454870/197410385-75f754dd-e845-4444-8a04-472a8f45b617.png) ### Portuguese This one has a bit of overflow ![image](https://user-images.githubusercontent.com/20454870/197410414-b91f962e-77e9-4cc7-990b-01c0fc0cbd0b.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update JS dependencies and misc tweaks (#21583)silverwind2022-10-281-1/+2
| | | | | | | | | | | - Update all JS dependencies to latest version - Disable two redundant eslint rules - Adapt stylelint config to codebase - Regenerate SVGs - Make file editor spinner "reserve" height so page does not shift - Tested katex, swagger, monaco Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Use CSS color-scheme instead of invert (#21616)silverwind2022-10-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | The [`color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) property changes the base color of certain form elements like the datepicker icon in Chrome. Set it and remove the previous invert hack. Before with invert removed: <img width="840" alt="Screen Shot 2022-10-27 at 11 42 54" src="https://user-images.githubusercontent.com/115237/198251927-b742e14e-0c62-492c-b667-ee6c69de4ad8.png"> <img width="238" alt="Screen Shot 2022-10-27 at 12 23 28" src="https://user-images.githubusercontent.com/115237/198260413-37c1ca85-c2de-4c09-8b37-6aa8a23ab575.png"> After: <img width="841" alt="Screen Shot 2022-10-27 at 11 43 05" src="https://user-images.githubusercontent.com/115237/198251934-568fa291-0d18-4cd4-adec-58ae1ad90ab2.png"> <img width="839" alt="Screen Shot 2022-10-27 at 11 44 36" src="https://user-images.githubusercontent.com/115237/198251936-a435105e-572b-41f6-8262-a53820f1d364.png"> <img width="243" alt="Screen Shot 2022-10-27 at 12 23 42" src="https://user-images.githubusercontent.com/115237/198260432-5eaffc82-ffb8-4559-b1c2-08a39e8f4427.png"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Improve code comment review on mobile (#21461)Gusted2022-10-254-11/+38
| | | | | | | | | | | | | | | | | | | | | | | | | - Fix placement of avatar image, this was not placed in the `comment-header-left` and add CSS to cover the limiting of width+height of avatar for code-review comment on "Files changed" page. This fixes the big noticeable avatar issue. - Apply `margin-bottom` to the "next" button, so it's consistent with the "previous" button. - Make sure the "next"/"previous" start at `flex-start` on mobile and not off-screen at `flex-end`. As well force them to have `flex: 1` so they won't overflow on x-asis. This also requires the `width: 100%` for the `.ui.buttons` div. - Resolves #20074 ### Before <details><img width="512" src="https://user-images.githubusercontent.com/25481501/195952930-09560cad-419f-43a3-a8a4-a4166c117994.jpg"></details> ### After <details><img width="512" src="https://user-images.githubusercontent.com/25481501/197340081-0365dfa8-4344-46b4-8702-a40c778c073f.jpg"></details> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Consolidate remaining colors into variables (#21582)silverwind2022-10-253-121/+370
| | | | | | | | | | | | | | | | | Remove remaining non-color variables in arc-green, so the theme is now 100% defined from variables (excluding inverts). Adjusted red/green to match previous overwritten colors. `--color-gold-light` is removed, it was unused and is not part of fomantic colors. <img width="772" alt="Screen Shot 2022-10-24 at 20 22 25" src="https://user-images.githubusercontent.com/115237/197599339-1d1bf6e3-aa90-4f38-9753-24effd4b178d.png"> <img width="275" alt="Screen Shot 2022-10-24 at 20 25 52" src="https://user-images.githubusercontent.com/115237/197599344-79c1d3ac-c709-4e30-a60b-4738af672c12.png"> <img width="446" alt="Screen Shot 2022-10-24 at 20 26 46" src="https://user-images.githubusercontent.com/115237/197599346-f2ef6449-7efd-4f81-bbb6-e7bee4528f50.png"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Expand "Go to File" button again, fix 'Add File' margin (#21543)silverwind2022-10-241-0/+5
| | | | | | | | | | | | | | | | With https://github.com/go-gitea/gitea/pull/21428 we gained some space so we are again able to show the "Go to File" button as text instead of icon-only (the old icon was not particularily fitting anyways). Before: <img width="328" alt="image" src="https://user-images.githubusercontent.com/115237/197334423-07731d9d-bf26-4aeb-95fa-490d9d0bf2a2.png"> After: <img width="339" alt="Screen Shot 2022-10-22 at 12 28 01" src="https://user-images.githubusercontent.com/115237/197334383-467c4107-09c9-4881-b75f-7f403eab7f3a.png"> <img width="413" alt="Screen Shot 2022-10-22 at 12 28 16" src="https://user-images.githubusercontent.com/115237/197334384-f7d1fdda-a011-4138-ad1e-b52fc987501f.png">
* CSS color enhancements (#21534)silverwind2022-10-234-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add [`accent-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color) which will change the color of various native HTML elements from OS-color to specified one. Affects unstyled checkbox, radio, range and progress - Change `--color-accent` to `--color-primary-light-1` - Change progress bar color to `--color-accent` - Add new `--color-primary-contrast` meant to contrast over primary - Avoid layout shift on clicking `.viewed-file-form` - Add styles for `input[type=file]` upload button <img width="301" alt="Screen Shot 2022-10-21 at 18 05 35" src="https://user-images.githubusercontent.com/115237/197246896-7b3b5591-2934-4436-bf37-6aebcdfecb13.png"> <img width="98" alt="Screen Shot 2022-10-21 at 19 41 27" src="https://user-images.githubusercontent.com/115237/197256892-c8fc6a0a-5d2f-4757-a98b-a79f9b7fcbc5.png"> <img width="93" alt="image" src="https://user-images.githubusercontent.com/115237/197257029-293c02e9-ebf9-448a-a58f-ca418cf36953.png"> <img width="204" alt="Screen Shot 2022-10-21 at 18 21 24" src="https://user-images.githubusercontent.com/115237/197246957-a99f5178-bbd5-4204-bd32-7a6977026f76.png"> <img width="449" alt="Screen Shot 2022-10-21 at 18 56 59" src="https://user-images.githubusercontent.com/115237/197249305-d481abb7-9f16-4b48-936a-c75ed29f5b04.png"> <img width="449" alt="Screen Shot 2022-10-21 at 18 57 09" src="https://user-images.githubusercontent.com/115237/197249309-7ab70c3b-325e-41bc-a4ba-07402c6826b6.png"> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add color previews in markdown (#21474)Yarden Shoham2022-10-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | * Resolves #3047 Every time a color code will be in \`backticks`, a cute little color preview will pop up [Inspiration](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#supported-color-models) #### Before ![image](https://user-images.githubusercontent.com/20454870/196631524-298afbbf-d2c8-4018-92a5-0393a693d850.png) #### After ![image](https://user-images.githubusercontent.com/20454870/196631397-36c561e4-08f5-465a-a36e-76084e30b08a.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Enable Monaco automaticLayout (#21515)silverwind2022-10-201-4/+1
| | | | | | | | Enable [`automaticLayout`](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IDiffEditorOptions.html#automaticLayout) for monaco so it can reflow itself. Fixes: https://github.com/go-gitea/gitea/issues/21508
* Add team member invite by email (#20307)KN4CK3R2022-10-192-1/+19
| | | | | | | | | | | | | | | | | | | | | | | Allows to add (not registered) team members by email. related #5353 Invite by mail: ![grafik](https://user-images.githubusercontent.com/1666336/178154779-adcc547f-c0b7-4a2a-a131-4e41a3d9d3ad.png) Pending invitations: ![grafik](https://user-images.githubusercontent.com/1666336/178154882-9d739bb8-2b04-46c1-a025-c1f4be26af98.png) Email: ![grafik](https://user-images.githubusercontent.com/1666336/178164716-f2f90893-7ba6-4a5e-a3db-42538a660258.png) Join form: ![grafik](https://user-images.githubusercontent.com/1666336/178154840-aaab983a-d922-4414-b01a-9b1a19c5cef7.png) Co-authored-by: Jack Hay <jjphay@gmail.com>
* Remove vitest globals (#21505)silverwind2022-10-193-0/+3
| | | | | | | Explicitly import them instead which is cleaner and enables better editor integration. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Localize all timestamps (#21440)Yarden Shoham2022-10-171-4/+26
| | | | | | | | | | | | | | | | | | | | | Following * #21410 We are now able to localize all timestamps. Some examples: `short-date` format, French, user profile page: ![image](https://user-images.githubusercontent.com/20454870/195622461-aa0d5b93-f8df-42ad-881c-9c16606bf387.png) `date-time` format, Portuguese, mirror repository settings page: ![image](https://user-images.githubusercontent.com/20454870/195623191-7a37d77c-4a02-4140-846d-f290a65ea21d.png) Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>