summaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
* Replace coloris with vanilla-colorful (#30201)silverwind2024-04-034-155/+85
| | | | | | | | | | | | | | Found [a better color picker](https://github.com/web-padawan/vanilla-colorful) that [does not rely](https://github.com/mdbassit/Coloris/issues/139) on `querySelectorAll` or a global shared instance, and is also around a third of the size of the previous one. The popover is handled by tippy.js for which I introduced a new "bare" theme and it uses a new sibling-based mechanism which should prove useful later to create tippy popovers via HTML only. <img width="846" alt="Screenshot 2024-03-31 at 04 03 38" src="https://github.com/go-gitea/gitea/assets/115237/7639b911-a2d7-4f5c-bffd-a9d84561e747">
* Show 12 lines in markup code preview (#30255)silverwind2024-04-021-1/+1
| | | Show up to 12 lines instead of previous 5.
* Render embedded code preview by permlink in markdown (#30234)wxiaoguang2024-04-024-3/+43
| | | | | The permlink in markdown will be rendered as a code preview block, like GitHub Co-authored-by: silverwind <me@silverwind.io>
* Fix spacing in issue navbar (#30238)silverwind2024-04-021-0/+5
| | | | | | | Create a new `issue-navbar` class specifically for this bar, previous class used in many places and I thought I had them all removed, but not this one. Fixes: https://github.com/go-gitea/gitea/issues/30226
* Refactor dropzone (#30232)wxiaoguang2024-04-021-29/+21
| | | Simplify code and use `.files` elements
* Remove fomantic input module (#30194)silverwind2024-03-319-810/+205
| | | | Another pure CSS module. Some styling is part of the `form` module which will likely follow next.
* Remove most jQuery function calls from the repository topic box (#30191)Yarden Shoham2024-03-314-63/+43
| | | | | | | | | Remove most jQuery function calls --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Prevent flash of dropdown menu on labels list (#30215)silverwind2024-03-311-0/+6
| | | | | | | | | | | | On the labels list, This `left` class caused the dropdown content to flash on page load until JS had hidden it. Remove it as I see no purpose to it. <img width="215" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/9e1de97f-dd89-41e0-9229-5c4a786ba762"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove jQuery class from the `repo-issue.js` file (#30192)Yarden Shoham2024-03-311-70/+85
| | | | | | | | | | | | | | | | | | Switched from jQuery class functions to plain JavaScript `classList`. Tested the following functionalities and they work as before: - delete issue comment - cancel code comment - update (merge or rebase) pull request - re-request review - reply to code comment - show/hide outdated comments - add code comment - edit issue title --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Make a distinction between `active` and `selected` in the issue author ↵Yarden Shoham2024-03-311-1/+3
| | | | | dropdown (#30207) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Move and simplify tab-size helpers (#30196)silverwind2024-03-312-80/+17
| | | | | Tailwind does not support. Dropped the vendor-prefix. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix unclickable checkboxes (#30195)silverwind2024-03-312-5/+14
| | | | | | | | | | | | | | Fix https://github.com/go-gitea/gitea/issues/30185, regression from https://github.com/go-gitea/gitea/pull/30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that.
* Remove jQuery class from the issue author dropdown (#30188)Yarden Shoham2024-03-301-7/+13
| | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the issue author dropdown functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery class from the comment edit history (#30186)Yarden Shoham2024-03-301-2/+5
| | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the comment edit history functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery class from the repository branch settings (#30184)Yarden Shoham2024-03-301-13/+18
| | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the repository branch settings functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery class from the project page (#30183)Yarden Shoham2024-03-301-22/+23
| | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the edit column modal functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery class from the comment context menu (#30179)Yarden Shoham2024-03-301-1/+1
| | | | | | | | | - Switched from jQuery class functions to plain JavaScript - Tested the comment context menu functionality and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery class from the commit button (#30178)Yarden Shoham2024-03-291-2/+2
| | | | | | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the commit button disabled toggling functionality and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery class from the diff view (#30176)Yarden Shoham2024-03-292-25/+32
| | | | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the diff view functionality and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery class from the notification count (#30172)Yarden Shoham2024-03-291-7/+5
| | | | | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the notification count and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery class from the code range selection (#30173)Yarden Shoham2024-03-291-3/+5
| | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the code range selection functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix:the rounded corners of the folded file are not displayed correctly (#29953)HEREYUA2024-03-291-1/+2
| | | | | | | | | | | | | | | | | | Fix: [#29933](https://github.com/go-gitea/gitea/issues/29933) **Before** ![image](https://github.com/go-gitea/gitea/assets/37935145/71ec80f6-5896-4e4a-b686-4d792c11ebe2) **After** ![image](https://github.com/go-gitea/gitea/assets/37935145/81348a61-946a-4562-881d-8d873e50228f) --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery class from the image diff (#30140)Yarden Shoham2024-03-291-9/+20
| | | | | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the image diff and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove fomantic checkbox module (#30162)silverwind2024-03-2916-1727/+178
| | | | | | | | | | | | | | | | | | | CSS is pretty slim already and the `.ui.toggle.checkbox` sliders on admin page also still work. The only necessary JS is the one that links `input` and `label` so that it can be toggled via label. All checkboxes except the markdown ones render at `--checkbox-size: 16px` now. <img width="174" alt="Screenshot 2024-03-28 at 22 15 10" src="https://github.com/go-gitea/gitea/assets/115237/3455c1bb-166b-47e4-9847-2d20dd1f04db"> <img width="499" alt="Screenshot 2024-03-28 at 21 00 07" src="https://github.com/go-gitea/gitea/assets/115237/412be2b3-d5a0-478a-b17b-43e6bc12e8ce"> <img width="83" alt="Screenshot 2024-03-28 at 22 14 34" src="https://github.com/go-gitea/gitea/assets/115237/d8c89838-a420-4723-8c49-89405bb39474"> --------- Co-authored-by: delvh <dev.lh@web.de>
* replace jquery-minicolors with coloris (#30055)silverwind2024-03-299-78/+208
| | | | | | | | | | | | | | | | | | Get rid of one more jQuery dependant and have a nicer color picker as well. Now there is only a single global color picker init because that is all that's necessary because the elements are present on the page when the init code runs. The init is slightly weird because the module only takes a selector instead of DOM elements directly. The label modals now also perform form validation because previously it was possible to trigger a 500 error `Color cannot be empty.` by clearing out the color value on labels. <img width="867" alt="Screenshot 2024-03-25 at 00 21 05" src="https://github.com/go-gitea/gitea/assets/115237/71215c39-abb1-4881-b5c1-9954b4a89adb"> <img width="860" alt="Screenshot 2024-03-25 at 00 20 48" src="https://github.com/go-gitea/gitea/assets/115237/a12cb68f-c38b-4433-ba05-53bbb4b1023e">
* Render code tags in commit messages (#30146)silverwind2024-03-281-2/+2
| | | | | | | | | | | | | | | | | | Extend https://github.com/go-gitea/gitea/pull/21432 to commit messages. Color is changed because the markup code block bg does not offer enough contrast on varying backgrounds. <img width="568" alt="Screenshot 2024-03-27 at 19 52 55" src="https://github.com/go-gitea/gitea/assets/115237/ddc9307e-f32f-4e97-8b88-91f88ced2a36"> <img width="573" alt="Screenshot 2024-03-27 at 19 53 33" src="https://github.com/go-gitea/gitea/assets/115237/14b30fd2-bf28-46b8-9e82-eb60a28f6bf2"> <img width="422" alt="Screenshot 2024-03-27 at 19 53 01" src="https://github.com/go-gitea/gitea/assets/115237/a12136b5-c02b-460c-9830-f830542987ae"> <img width="397" alt="Screenshot 2024-03-27 at 19 53 27" src="https://github.com/go-gitea/gitea/assets/115237/c9f05d81-c73e-468e-98e9-e5929bc0da3e"> <img width="333" alt="Screenshot 2024-03-27 at 19 53 07" src="https://github.com/go-gitea/gitea/assets/115237/06b5a9f9-f95d-46b6-8c57-df0b02555652"> <img width="279" alt="Screenshot 2024-03-27 at 19 53 21" src="https://github.com/go-gitea/gitea/assets/115237/b06a0afc-ddd8-48ae-b557-a6dc47802e68">
* Migrate font-family to tailwind (#30118)silverwind2024-03-285-9/+11
| | | | | | | | | | | 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/**/*
* Drag-and-drop improvements for projects and issue pins (#29875)silverwind2024-03-285-8/+25
| | | | | | | | | | | | | | | 1. Add "grabbing" cursor while dragging items: ![](https://github.com/go-gitea/gitea/assets/115237/c60845ff-7544-4215-aeaa-408e8c4ef03a) 2. Make project board only drag via their header, not via their whole body. ![](https://github.com/go-gitea/gitea/assets/115237/62c27f3d-993a-481d-9cc3-b6226b4c5d61) 3. Fix some cursor problems in projects 4. Move shared options into `createSortable`.
* Fix table alignment classes (#30144)silverwind2024-03-271-0/+25
| | | | | Fixes https://github.com/go-gitea/gitea/issues/30142, regression from https://github.com/go-gitea/gitea/pull/30047. I searched the codebase and only `bottom aligned` was definitely not in use so I removed it.
* Add default board to new projects, remove uncategorized pseudo-board (#29874)Denys Konovalov2024-03-271-1/+0
| | | | | | | | | | | | | | | | | | On creation of an empty project (no template) a default board will be created instead of falling back to the uneditable pseudo-board. Every project now has to have exactly one default boards. As a consequence, you cannot unset a board as default, instead you have to set another board as default. Existing projects will be modified using a cron job, additionally this check will run every midnight by default. Deleting the default board is not allowed, you have to set another board as default to do it. Fixes #29873 Fixes #14679 along the way Fixes #29853 Co-authored-by: delvh <dev.lh@web.de>
* Fix loading spinner on ContextPopup (#30145)silverwind2024-03-271-1/+1
| | | | | | | Fix regression from https://github.com/go-gitea/gitea/pull/26670. Here with simulated delay: ![](https://github.com/go-gitea/gitea/assets/115237/9de5a136-c8a6-4d69-adc7-07e1184e3311)
* Fix download buttons on branches page (#30147)silverwind2024-03-272-1/+2
| | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30143, regression from https://github.com/go-gitea/gitea/pull/29920. We have `.button` on the repo page, but on the branch page it's a `.btn`. Eventually we should find a solution to have a single button class but until then this solution should be acceptable.
* Remove jQuery class from the common admin functions (#30137)Yarden Shoham2024-03-271-7/+6
| | | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the new authentication source form and the deletion of system notices. They work as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery class from the reaction selector (#30138)Yarden Shoham2024-03-271-1/+1
| | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the reaction selector and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery `.attr` from the Fomantic dropdowns (#30114)Yarden Shoham2024-03-271-56/+64
| | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested the dropdowns and they work as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery `.attr` from the common admin functions (#30115)Yarden Shoham2024-03-271-62/+91
| | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested most of the functions and they work as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery from the create/rename branch modals (except Fomantic) (#30109)Yarden Shoham2024-03-271-25/+25
| | | | | | | | | | | | | | | | - Switched to plain JavaScript - Tested the create/rename branch modals' functionality and they work as before # Demo using JavaScript without jQuery ![demo](https://github.com/go-gitea/gitea/assets/20454870/ca53155e-856e-44ca-9852-12ff60065735) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove fomantic label module (#30081)silverwind2024-03-276-1331/+296
| | | | | | | | | | | Of note is the CSS has references to "floating label" and "transparent label" but I could not find those anywhere in the code. They are related to https://github.com/go-gitea/gitea/pull/3939, but I think these have long been removed. --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix: The interface is broken when modifying code comments under mobile ↵HEREYUA2024-03-271-3/+0
| | | | | | | | | | | | | | devices (#30125) **Fix**: [#30123](https://github.com/go-gitea/gitea/issues/30123) **Before** ![image](https://github.com/go-gitea/gitea/assets/37935145/2a186399-85b0-480a-b2f9-f4feffd9a8e2) **After** ![image](https://github.com/go-gitea/gitea/assets/37935145/ce1ce3e4-3bbb-4a4b-b0e7-e7943a0774f2)
* When the title in the issue has a value, set the text cursor at the end of ↵HEREYUA2024-03-272-0/+8
| | | | | | | | | | | | | | | the text. (#30090) Fix: [#25055](https://github.com/go-gitea/gitea/issues/25055) Before ![image](https://github.com/go-gitea/gitea/assets/37935145/1b89cd7b-4fa3-49aa-9b5e-a8413add436e) After ![image](https://github.com/go-gitea/gitea/assets/37935145/fa808f8d-d3ce-4245-a4fe-dd0282ba3fdf) ps: I've noticed that we are gradually replacing jQuery, so I didn't use jQuery here.
* Fix click handler in job-step-summary (#30122)silverwind2024-03-271-1/+1
| | | | | Fix mistake from https://github.com/go-gitea/gitea/pull/29977 where the click handler wasn't updated for the change with the `isExpandable` function.
* Remove jQuery `.attr` from the Fomantic modal cancel buttons (#30113)Yarden Shoham2024-03-261-1/+3
| | | | | | | | - Switched from jQuery `attr` to plain javascript `setAttribute` - Tested the modals and they work as before --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery `.attr` from the code comments (#30112)Yarden Shoham2024-03-261-60/+71
| | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` - Tested the code comments and they work as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery calls that have no effect on `showElem` and `hideElem` (#30110)Yarden Shoham2024-03-263-22/+22
| | | | | | There's no need to initialize a jQuery object with a CSS selector when we can pass the CSS selector directly. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery `.attr` from the common issue page functions (#30083)Yarden Shoham2024-03-261-73/+83
| | | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested most of the functions and they work as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Restore aligned grid column CSS (#30106)silverwind2024-03-261-0/+18
| | | Fixes #30097, regression from #29894.
* Update JS any PY dependencies, remove workarounds (#30085)silverwind2024-03-261-1/+1
| | | | | | | | - Update dependencies via `make update-js update-py svg` - Remove `postcss` workaround - https://github.com/postcss/postcss/issues/1914 - Remove `happy-dom` workaround - https://github.com/capricorn86/happy-dom/pull/1365. - Tested Katex and Asciinema
* Fix alignment in actions right view (#29979)silverwind2024-03-261-3/+2
| | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/29974, Regression from https://github.com/go-gitea/gitea/pull/29640. Depending on the number of steps on the left side, the right side will vertically expand. Collapse it with `align-self`. <img width="1308" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/9bcede9c-d869-4f3f-8a10-026c74c03f71">
* Fix table header text-align (#30084)silverwind2024-03-261-0/+4
| | | | | | | | | | | | | Fix regression from https://github.com/go-gitea/gitea/pull/30047. Apparently tables have certain user-agent styles that center inside `<th>` etc. Restored the original fomantic rules for these. Before: <img width="1332" alt="Screenshot 2024-03-25 at 21 59 33" src="https://github.com/go-gitea/gitea/assets/115237/e06a5509-b505-4752-9b6e-91d5ed49f61d"> After: <img width="1330" alt="Screenshot 2024-03-25 at 21 59 40" src="https://github.com/go-gitea/gitea/assets/115237/6444817f-dd61-4a1e-a8b3-959c2780148d">
* Remove jQuery `.attr` from the code line range selection (#30077)Yarden Shoham2024-03-251-22/+20
| | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested the code line range selection and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>