aboutsummaryrefslogtreecommitdiffstats
path: root/templates/shared
Commit message (Collapse)AuthorAgeFilesLines
* Add flat-square action badge style (#34062)bytedream13 days2-0/+15
| | | | | | | | | Adds the `flat-square` style to action badges. Styles can be selected by adding `?style=<style>` to the badge endpoint. If no style query is given, or if the query is invalid, the style defaults to `flat`. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update action status badge layout (#34018)bytedream2025-03-281-19/+21
| | | | | | | | | | The current action status badge are looking different from most other badges renders, which is especially noticeable when using them along with other badges. This PR updates the action badges to match the commonly used badges from other providers. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Added Description Field for Secrets and Variables (#33526)John Smith2025-03-172-0/+30
| | | | | | | Fixes #33484 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Replace text-align classes with tailwind (#33905)silverwind2025-03-163-3/+3
| | | | | | | Small refactor to remove these CSS classes in favor of tailwind. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix cannot delete runners via the modal dialog (#33895)ChristopherHX2025-03-151-1/+1
| | | | | delete-button and show-modal class are conflicting Closes #33894
* Improve issue & code search (#33860)wxiaoguang2025-03-135-26/+34
| | | | Each "indexer" should provide the "search modes" they support by themselves. And we need to remove the "fuzzy" search for code.
* Refactor markup and pdf-viewer to use new init framework (#33772)Kerwin Bryant2025-03-031-1/+1
| | | | | | | | | | | | | | | | 1. Add some "render-content" classes to "markup" elements when the content is rendered 2. Use correct "markup" wrapper for "preview" (but not set that class on the tab) 3. Remove incorrect "markup" class from LFS file view, because there is no markup content * "edit-diff" is also removed because it does nothing 5. Use "initPdfViewer" for PDF viewer 6. Remove incorrect "content" class from milestone markup 7. Init all ".markup" elements by new init framework --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix dynamic content loading init problem (#33748)wxiaoguang2025-03-011-1/+1
| | | | | | | | | | | | | | | | 1. Rewrite `dirauto.ts` to `observer.ts`. * We have been using MutationObserver for long time, it's proven that it is quite performant. * Now we extend its ability to handle more "init" works. 2. Use `observeAddedElement` to init all non-custom "dropdown". 3. Use `data-global-click` to handle click events from dynamically loaded elements. * By this new approach, the old fragile selector-based (`.comment-reaction-button`) mechanism is removed. 4. By the way, remove unused `.diff-box` selector, it was abused and never really used. A lot of FIXMEs in "repo-diff.ts" are completely fixed, newly loaded contents could work as expected.
* Add No Results Prompt Message on Issue List Page (#33699)Kerwin Bryant2025-02-241-0/+5
|
* Add a option "--user-type bot" to admin user create, improve role display ↵mscherer2025-02-071-1/+1
| | | | | | | | | | | (#27885) Partially solve #13044 Fix #33295 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add cropping support when modifying the user/org/repo avatar (#33498)Kerwin Bryant2025-02-061-0/+8
| | | | | | | | Fixed #33321 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Correct bot label `vertical-align` (#33477)Typed SIGTERM2025-02-021-1/+1
|
* Worktime tracking for the organization level (#19808)K Kovacs2025-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dear Gitea team, first of all, thanks for the great work you're doing with this project. I'm planning to introduce Gitea at a client site, and noticed that while there is time recording, there are no project-manager-friendly reports to actually make use of that data, as were also mentioned by others in #4870 #8684 and #13531. Since I had a little time last weekend, I had put together something that I hope to be a useful contribution to this great project (while of course useful for me too). This PR adds a new "Worktime" tab to the Organisation level. There is a date range selector (by default set to the current month), and there are three possible views: - by repository, - by milestone, and - by team member. Happy to receive any feedback! There are several possible future improvements of course (predefined date ranges, charts, a member time sheet, matrix of repos/members, etc) but I hope that even in this relatively simple state this would be useful to lots of people. <img width="1161" alt="Screen Shot 2022-05-25 at 22 12 58" src="https://user-images.githubusercontent.com/118010/170366976-af00c7af-c4f3-4117-86d7-00356d6797a5.png"> Keep up the good work! Kristof --------- Co-authored-by: user <user@kk-git1> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update feishu icon (#33470)Typed SIGTERM2025-02-011-1/+1
|
* Trivial fixes (#33304)wxiaoguang2025-01-171-1/+2
| | | | | | | 1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures. 2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead) 3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch") 4. align maven xml 5. fix closed PR color&icon
* Fix bleve fuzziness search (#33078)wxiaoguang2025-01-031-1/+2
| | | Close #31565
* always show assignees on right (#33006)metiftikci2024-12-291-24/+24
| | | | | | | | | ### Before ![old_issue_list](https://github.com/user-attachments/assets/c7a6631d-9330-4e29-9e01-c1bcb2a0387f) ### After ![new_issue_list](https://github.com/user-attachments/assets/5a13c413-b58e-40bb-888b-9edfe3c94e0c)
* Add `show more` organizations icon in user's profile (#32986)yp053272024-12-271-0/+3
| | | | | | | | | | | | | | | | | | | Close #32952 # ⚠️ Doc update is required ![image](https://github.com/user-attachments/assets/296c5109-8fc1-43ea-b7dc-e79919cc1f9a) ![image](https://github.com/user-attachments/assets/d30980f6-22e4-4b97-9143-c750dc399da6) ------ ⚠️This PR refuses to be cherry-picked by any forked projects without any mentions. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor tmpl and blob_excerpt (#32967)wxiaoguang2024-12-251-2/+1
| | | | | 1. do not use `{{/* */}}` to remove spaces, use `{{- -}}` 2. fix "blob_excerpt" endpoint, remove the legacy fragile code: have tested commit diff and wiki diff
* Add sub issue list support (#32940)wxiaoguang2024-12-241-24/+24
| | | Just like GitHub, show issue icon/title when the issue number is in a list
* Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token (#32946)wxiaoguang2024-12-231-3/+7
| | | | | | Fix #23703 When Gitea starts, it reads GITEA_RUNNER_REGISTRATION_TOKEN or GITEA_RUNNER_REGISTRATION_TOKEN_FILE to add registration token.
* Fix bug of branch/tag selector in the issue sidebar (#32744)hiifong2024-12-131-1/+1
| | | | | | | Fix: #32731 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor markdown editor and use it for milestone description editor (#32688)wxiaoguang2024-12-041-7/+31
| | | | | | | | | | Refactor markdown editor to clarify its "preview" behavior and remove jQuery code. Close #15045 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix issue title rendering and refactor legacy function names (#32703)wxiaoguang2024-12-041-1/+1
| | | | | | | | Fix #32700, regression of recent markup refactoring And by the way, clarify many legacy problems: 1. Some "RenderXxx" functions do not really "render", they only call "post processors" 2. Merge "RenderEmoji | RenderCodeBlock", they are all for "simple issue title"
* Refactor template ctx and render utils (#32422)wxiaoguang2024-11-051-2/+2
| | | Clean up the templates
* Refactor DateUtils and merge TimeSince (#32409)wxiaoguang2024-11-047-9/+9
| | | Follow #32383 and #32402
* Add some handy markdown editor features (#32400)wxiaoguang2024-11-041-1/+14
| | | | | | | | | There were some missing features from EasyMDE: 1. H1 - H3 style 2. Auto add task list 3. Insert a table And added some tests
* Replace DateTime with DateUtils (#32383)wxiaoguang2024-11-024-4/+4
|
* Suggestions for issues (#32327)Anbraten2024-10-291-1/+1
| | | closes #16872
* Move admin routers from /admin to /-/admin (#32189)Lunny Xiao2024-10-101-1/+1
| | | | | | | Resolve #32181 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve detecting empty files (#31332)wxiaoguang2024-06-132-1/+4
| | | Co-authored-by: silverwind <me@silverwind.io>
* Optimize profile layout to enhance visual experience (#31278)Kerwin Bryant2024-06-121-10/+2
| | | Co-authored-by: silverwind <me@silverwind.io>
* Optimize runner-tags layout to enhance visual experience (#31258)Kerwin Bryant2024-06-051-1/+1
| | | ![image](https://github.com/go-gitea/gitea/assets/3371163/b8199005-94f2-45be-8ca9-4fa1b3f221b2)
* Replace `gt-word-break` with `tw-break-anywhere` (#31183)silverwind2024-06-042-3/+3
| | | | | `overflow-wrap: anywhere` is a superior alternative to `word-wrap: break-word` and we were already setting it in the class. I tested a few cases, all look good.
* Prevent tab shifting, remove extra margin on fluid pages (#31090)silverwind2024-05-272-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Extend concept of https://github.com/go-gitea/gitea/pull/29831 to all tabular menus, there were only three left that weren't already `<overflow-menu>`. <img width="634" alt="Screenshot 2024-05-27 at 00 42 16" src="https://github.com/go-gitea/gitea/assets/115237/d9a7e219-d05e-40a1-9e93-777f9a8a90dd"> <img width="965" alt="Screenshot 2024-05-27 at 00 29 32" src="https://github.com/go-gitea/gitea/assets/115237/e6ed71b1-11fb-4a74-9adb-af4524286cff"> 2. Remove extra padding on `fluid padded` container like for example PR diff view. The page margin is already correctly sized via `.ui.container`, so this was just extraneous padding that looked ugly. Before: <img width="1351" alt="Screenshot 2024-05-27 at 00 45 11" src="https://github.com/go-gitea/gitea/assets/115237/4b45fd11-b1b2-4fbb-a618-26eb22be9472"> After: <img width="1344" alt="Screenshot 2024-05-27 at 00 45 22" src="https://github.com/go-gitea/gitea/assets/115237/d09593eb-6c7f-45e7-85b6-f0050047004b"> 3. Replace `gt-word-break` with `tw-break-anywhere` in issue-title, fixing overflow. Before: <img width="1333" alt="Screenshot 2024-05-27 at 00 50 14" src="https://github.com/go-gitea/gitea/assets/115237/64d15d04-b456-401e-a972-df636965f0eb"> After: <img width="1316" alt="Screenshot 2024-05-27 at 00 50 26" src="https://github.com/go-gitea/gitea/assets/115237/ed1ce830-1408-414b-8263-eeaf773f52c8">
* Rename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762)wxiaoguang2024-04-291-1/+1
| | | | | | Fix #30761 Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so it should always use `IsRepoIndexerEnabled` for consistency.
* Remove obsolete CSS text classes (#30576)silverwind2024-04-221-1/+1
| | | | | | | | | | | - `.text-thin` and `.text-italic` are not present in CSS so were doing nothing and I removed them. - `.text.middle` was unused so I removed it. - `.text.italic` is replaced with `tw-italic`. - `.text.normal` had exactly one use and it wasn't even needed. - add a `muted` class to the link to `org_profile_avatar.tmpl`. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix issue comment form and quick-submit (#30623)wxiaoguang2024-04-221-1/+1
| | | | 1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery) 2. Fix issue comment form layout
* Expose fuzzy search for issues/pulls (#29701)65432024-04-181-2/+2
| | | | | | | | close #29685 --------- Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io>
* Fix long branch name overflows (#30345)silverwind2024-04-161-6/+9
| | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27971 Fixes: https://github.com/go-gitea/gitea/pull/28010 <img width="689" alt="Screenshot 2024-04-09 at 00 19 57" src="https://github.com/go-gitea/gitea/assets/115237/7c895a47-274f-40a6-a126-290658f1982d"> Also fixes a similar issue in issue list where CSS was there but not active because of missing `display: block`. <img width="372" alt="Screenshot 2024-04-09 at 00 18 25" src="https://github.com/go-gitea/gitea/assets/115237/cfbee7cd-2e15-4ac7-96ce-020816f48798">
* Refactor file view & render (#30227)wxiaoguang2024-04-011-0/+4
| | | The old code is inconsistent and fragile, and the UI isn't right.
* Migrate font-family to tailwind (#30118)silverwind2024-03-281-1/+1
| | | | | | | | | | | Enable us to use tailwind's [`font-family`](https://tailwindcss.com/docs/font-family) classes as well as remove `gt-mono` in favor of `tw-font-mono`. I also merged the "compensation" to one selector, previously this was two different values 0.9em and 0.95em. I did not declare a `serif` font because I don't think there will ever be a use case for those. Command ran: ```sh perl -p -i -e 's#gt-mono#tw-font-mono#g' web_src/js/**/* templates/**/*
* Migrate margin and padding helpers to tailwind (#30043)silverwind2024-03-249-19/+19
| | | | | | | | | | | | | This will conclude the refactor of 1:1 class replacements to tailwind, except `gt-hidden`. Commands ran: ```bash perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/* ```
* Support repo code search without setting up an indexer (#29998)wxiaoguang2024-03-242-4/+13
| | | | | | | | | | | | | | | | | By using git's ability, end users (especially small instance users) do not need to enable the indexer, they could also benefit from the code searching feature. Fix #29996 ![image](https://github.com/go-gitea/gitea/assets/2114189/11b7e458-88a4-480d-b4d7-72ee59406dd1) ![image](https://github.com/go-gitea/gitea/assets/2114189/0fe777d5-c95c-4288-a818-0427680805b6) --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove fomantic header module (#30033)silverwind2024-03-241-1/+1
| | | | | | | | | Likely still a few useless classes left, but I think I at least don't have missed any. --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Migrate font-weight helpers to tailwind (#30027)silverwind2024-03-231-1/+1
| | | | | | | | | | | Commands ran: ```sh perl -p -i -e 's#gt-font-light#tw-font-light#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-normal#tw-font-normal#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-medium#tw-font-medium#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-semibold#tw-font-semibold#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-font-bold#tw-font-bold#g' web_src/js/**/* templates/**/* ```
* Fix incorrect tailwind migration (#30007)silverwind2024-03-224-5/+5
| | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30005. Regression from https://github.com/go-gitea/gitea/pull/29945. There was only once instance of `tw-content-center` before that PR, so I just ran below command and reverted that one instance. ```sh perl -p -i -e 's#tw-content-center#tw-items-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/* ```
* Replace 10 more gt- classes with tw- (#29945)silverwind2024-03-227-16/+16
| | | | | | | | | | | | | | | | | | | | Likely the biggest change of the tailwind refactors. Only thing of note is that `tw-flex-1` resolves to `flex: 1 1 0%` while our `gt-f1` was `flex: 1 1 0`, I don't think it will make any difference. Commands I've ran: ```sh perl -p -i -e 's#gt-vm#tw-align-middle#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-fw#tw-flex-wrap#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-f1#tw-flex-1#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-fc#tw-flex-col#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-sb#tw-justify-between#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-je#tw-justify-end#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-jc#tw-justify-center#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-ac#tw-content-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/* perl -p -i -e 's#gt-df#tw-flex#g' web_src/js/**/* templates/**/* models/**/* tests/**/* perl -p -i -e 's#gt-dib#tw-inline-block#g' web_src/js/**/* templates/**/* models/**/* tests/**/* Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Performance improvements for pull request list page (#29900)Lunny Xiao2024-03-211-8/+8
| | | | | | | | | | | This PR will avoid load pullrequest.Issue twice in pull request list page. It will reduce x times database queries for those WIP pull requests. Partially fix #29585 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary ".Link" usages (#29909)wxiaoguang2024-03-202-2/+2
| | | In HTML, `?key=val` already means "use the current link with new query parameters"