Commit graph

1746 commits

Author SHA1 Message Date
Earl Warren ba35934824 Merge pull request '[BUG] Center icon and callout text' (#3010) from gusted/forgejo-center-icon into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3010
Reviewed-by: Gergely Nagy <algernon@noreply.codeberg.org>
2024-04-04 12:10:27 +00:00
Gusted 6ffae461d4
[BUG] Center icon and callout text
- Wrap the icon and callout into a seperate `<p>` which has `display:
flex; align-items: center` set. To center the icon with the callout text.
- Resolves #3006
2024-04-03 22:26:19 +02:00
Earl Warren efd0f0f224 Merge pull request 'Port archived labels visual filter' (#2887) from 0ko/forgejo:lable-archive-bw into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2887
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-03 20:06:39 +00:00
Earl Warren 5ff20d4583 Merge pull request 'Better color for labels/counters' (#2935) from 0ko/forgejo:glorious-label-color into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2935
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-03 20:03:54 +00:00
Gusted eae9397fa2
[THEME] Update variables
- Follows a579a0f318
- Remove `--color-code-sidebar-bg`.
- `--color-active-line` -> `--color-highlight-bg`.
- Add `--color-highlight-fg`.
- Resolves #2964
2024-04-03 15:15:13 +02:00
Gergely Nagy d58143e4e1
Adjust the signed tag verification line
Move the signed tag verification line above the release notes, don't
disable the bottom margin, and make sure the verification line's box is
properly rounded like other boxes.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-04-02 23:02:34 +02:00
0ko a245fb5c83 [THEME] Use better color for labels/counters
- improves contrast
- looks good
- improves consistency with other label-y elements
2024-04-02 17:40:34 +00:00
Earl Warren 2e744dc991 Merge pull request 'Render inline file permalinks' (#2669) from Mai-Lapyst/forgejo:markup-add-filepreview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2669
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-01 13:57:01 +00:00
Earl Warren b9a1d5c2be Merge pull request 'Highlight signed tags like signed commits' (#2534) from algernon/forgejo:message-in-a-bottle-ctrl-w-tag into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2534
2024-04-01 13:38:55 +00:00
0ko 1060b7cfa8 Add opacity and grayscale to archived labels
Co-authored-by: Gusted <gusted@noreply.codeberg.org>
2024-04-01 17:46:02 +05:00
Earl Warren 76fca987a7 Merge pull request 'Fix New issue button position consistency' (#2845) from 0ko/forgejo:issue-button-const into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2845
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-31 08:07:53 +00:00
Gergely Nagy 432ff7d767
Highlight signed tags like signed commits
This makes signed tags show a badge in the tag list similar to signed
commits in the commit list, and a more verbose block when viewing a
single tag. Works for both GPG and SSH signed tags.

Fixes #1316.

Work sponsored by @glts.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-03-30 20:14:42 +01:00
0ko 892fc82a20 Fix New issue button consistency
Fixes https://codeberg.org/forgejo/forgejo/issues/2613
Based on https://codeberg.org/forgejo/forgejo/issues/2613#issuecomment-1654709

- add new class `list-header-issues`;
- add rules that fix button position;
- use variable to keep the vertical offset constant;
- fix gap for edit button.

Co-authored-by: Gusted <gusted@noreply.codeberg.org>
2024-03-30 21:08:34 +05:00
0ko 177d8e7769 Fix selector inner radius
- Fixes https://codeberg.org/forgejo/forgejo/issues/2835
2024-03-30 21:04:48 +05:00
Gusted ec459b23c8 Merge pull request '[BUG] Render emojis in labels in issue info popup' (#2888) from gusted/forgejo-emoji-popup into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2888
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-30 11:20:57 +00:00
Gusted ddc24177dd
[BUG] Render emojis in labels in issue info popup
- Currently emojis that are part of the label's name aren't rendered
when shown in the popup that you get when you hover over issue
references.
- This patch fixes that by rendering the emoji.
- Adds CSS to not make the emoji big in the label.
- Resolves #1531
2024-03-30 11:18:46 +01:00
0ko 951a276174 Improve look of user profiles
- use more standard backgounds for user card and readme
- add proper border to user card
2024-03-30 14:40:50 +05:00
Earl Warren 8f10247585
[BUG] Fix Ctrl+Enter on editor (followup)
s/$editContentZone/editContentZone/

because the variable was renamed by

Remove jQuery `.attr` from the code comments (#30112)
2024-03-30 07:17:32 +01:00
Yarden Shoham d8fa9b1580
Remove jQuery from the user search form in admin page (#29151)
- Switched to plain JavaScript
- Tested the form and it works as before

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit a8748eedae3518550bd43fd592d206df2bea6bef)

Conflicts:
	web_src/js/features/admin/users.js
	prefer Gitea version and discard jQuery specific fixes from
	Forbid jQuery `.prop` and fix related issues (#29832)
2024-03-30 07:17:32 +01:00
silverwind 3ccb0c2512
Render code tags in commit messages (#30146)
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">

(cherry picked from commit e40fc75bac65933f2ed3de8fbc5fb336195b59f5)
2024-03-30 07:17:32 +01:00
silverwind bcfb7e0356
Migrate font-family to tailwind (#30118)
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/**/*

(cherry picked from commit 226a82a9396dc94f362ba27bd1c9318630df74b4)
2024-03-30 07:17:32 +01:00
silverwind 47c61f909c
Drag-and-drop improvements for projects and issue pins (#29875)
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`.

(cherry picked from commit 7fda109aba6cd077343edef086b2f2ff60124f78)
2024-03-30 07:17:31 +01:00
silverwind c5ac296cd9
Fix table alignment classes (#30144)
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.

(cherry picked from commit b08c7afe5f60075ed62a5ffe034b88624983d007)
2024-03-30 07:17:31 +01:00
Denys Konovalov 8ffb9c6fb1
Add default board to new projects, remove uncategorized pseudo-board (#29874)
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>
(cherry picked from commit e5160185ed65fd1c2bcb2fc7dc7e0b5514ddb299)

Conflicts:
	options/locale/locale_en-US.ini
	trivial conflict because Forgejo strings do not have
	surrounding double quotes
2024-03-30 07:17:31 +01:00
silverwind d67e7ae25a
Fix loading spinner on ContextPopup (#30145)
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)

(cherry picked from commit 4eb86d68233241d53cff1009ecff17ac35efccd4)
2024-03-30 07:17:31 +01:00
silverwind 8d2b764607
Fix download buttons on branches page (#30147)
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.

(cherry picked from commit c85619b82d19a928cb219eba3f38473928b29b0c)
2024-03-30 07:17:31 +01:00
Yarden Shoham 708fdf2da9
Remove jQuery class from the common admin functions (#30137)
- 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>
(cherry picked from commit 1551d73d3f95284965675b828e1eeceafa378437)
2024-03-30 07:17:31 +01:00
Yarden Shoham 36ee0745cc
Remove jQuery class from the reaction selector (#30138)
- 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>
(cherry picked from commit 1a71dbfb7881f65d39b689a5be26cc94afefb10f)
2024-03-30 07:17:31 +01:00
Yarden Shoham bdc3f7beb1
Remove jQuery .attr from the Fomantic dropdowns (#30114)
- 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>
(cherry picked from commit 0922ce8191ae83834b89b59c5c504209a8a0558e)
2024-03-30 07:17:31 +01:00
Yarden Shoham b95a893b22
Remove jQuery .attr from the common admin functions (#30115)
- 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>
(cherry picked from commit a190f68f1bf92554923a4adde50e5cbc637a2a2e)
2024-03-30 07:17:31 +01:00
Yarden Shoham 4249512c73
Remove jQuery from the create/rename branch modals (except Fomantic) (#30109)
- 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>
(cherry picked from commit 4efe7884a3c99235b39998472ea430bffe0799e5)
2024-03-30 07:17:31 +01:00
silverwind 8bc4c1c9b0
Remove fomantic label module (#30081)
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>
(cherry picked from commit 643e6b09587a89dba1f6b58ae21e5d0e7cfd9776)

Conflicts:
	web_src/css/base.css
	trivial context conflict
2024-03-30 07:17:31 +01:00
HEREYUA b4e97d6881
Fix: The interface is broken when modifying code comments under mobile 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)

(cherry picked from commit 4640441a0e23e40bc9ad73ca60f8ade0f29950ee)
2024-03-30 07:17:31 +01:00
HEREYUA 8c2559a726
When the title in the issue has a value, set the text cursor at the end of 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.
(cherry picked from commit 1261dd6742fb7095e51c173ca4641477d81a3634)
2024-03-30 07:17:31 +01:00
silverwind 43db1e81c1
Fix click handler in job-step-summary (#30122)
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.

(cherry picked from commit 57539bcdc024110c890320e3e785bf3d6ad6df55)
2024-03-30 07:17:31 +01:00
Yarden Shoham 544e66ec3a
Remove jQuery .attr from the Fomantic modal cancel buttons (#30113)
- Switched from jQuery `attr` to plain javascript `setAttribute`
- Tested the modals and they work as before

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit f47e00d9d3c3bd58b5944a29c4ff5cec0357520a)
2024-03-30 07:17:30 +01:00
Yarden Shoham 0cf308107e
Remove jQuery .attr from the code comments (#30112)
- 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>
(cherry picked from commit 5687aca4fc9aef44e1fb5af655b2320d18583dbd)
2024-03-30 07:17:30 +01:00
Yarden Shoham 95024f1486
Remove jQuery calls that have no effect on showElem and hideElem (#30110)
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>
(cherry picked from commit a1f11e2e33f20409eac65b2d0e9a7cd7c767eb72)
2024-03-30 07:17:30 +01:00
Yarden Shoham 7e0dfa07ba
Remove jQuery .attr from the common issue page functions (#30083)
- 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>
(cherry picked from commit e0b018706fa7703ef1759d9a75a1399383715808)
2024-03-30 07:17:30 +01:00
silverwind c7091d5476
Restore aligned grid column CSS (#30106)
Fixes #30097, regression from #29894.

(cherry picked from commit 30a561ce569fcb1dfc12edf658104a126281494d)
2024-03-30 07:17:30 +01:00
silverwind f77922ce4e
Update JS any PY dependencies, remove workarounds (#30085)
- 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

(cherry picked from commit c1ac72150885b327f56ea61273e27b16d6da5435)
2024-03-30 07:17:30 +01:00
silverwind 82e83d3076
Fix alignment in actions right view (#29979)
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">

(cherry picked from commit a4455d313e2c129dc9734292035b89339577174d)
2024-03-30 07:17:30 +01:00
silverwind 11765a8206
Fix table header text-align (#30084)
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">

(cherry picked from commit dd75237c3492140140c7413d788bd961692048d8)
2024-03-30 07:17:30 +01:00
Yarden Shoham e8c5406971
Remove jQuery .attr from the code line range selection (#30077)
- 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>
(cherry picked from commit a9a5734185a1a2837cfae42de7b17cf41dbb218a)
2024-03-30 07:17:30 +01:00
yp05327 18caa53859
Add muted class to author name in repo commit list (#29989)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/f6b3728c-ed9a-4e47-8755-89373235dff2)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/272c85e3-620d-4758-ae4d-ad90b54e142c)

If repo is a mirror, external user's name will be white, but if user is
existed, then you will see blue names and white names together:

![image](https://github.com/go-gitea/gitea/assets/18380374/747622da-56e3-4162-b391-919787a8cee4)

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 13921569dd5f77ee7d8352d0036ff649b03e72c8)
2024-03-30 07:17:30 +01:00
silverwind c55e30ff13
Refactor all .length === 0 patterns in JS (#30045)
This pattern comes of often during review, so let's fix it once and for
all. Did not test, but changes are trivial enough imho.

(cherry picked from commit 8fe26fb314f1710139728d9118b455fc6a16cce2)
2024-03-30 07:17:30 +01:00
silverwind c5745f9d24
Remove fomantic table module (#30047)
Big CSS module. I tested basic functionality on admin and commits table.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit f73d891fc4979cbd704d145f7e892f73d0eb5e39)
2024-03-30 07:17:30 +01:00
silverwind 553ef46226
Fix button hover border (#30048)
Fix regression from https://github.com/go-gitea/gitea/pull/30014. The
rule was to broad and affecting things like `primary` button
unintentionally.

(cherry picked from commit bbaf62589fe538be4afc86455d772360de80e7d8)
2024-03-30 07:17:30 +01:00
Yarden Shoham 8e3e31a566
Remove jQuery .attr from the reaction selector (#30052)
- Switched from jQuery `attr` to plain javascript `getAttribute`
- Tested the reaction selector and it works as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 2e31a2800e1112ee0ab5a8d3c66b0fba2e737870)
2024-03-30 07:17:29 +01:00
Yarden Shoham 8557c6ae43
Remove jQuery .attr from the ComboMarkdownEditor (#30051)
- Switched from jQuery `attr` to plain javascript `getAttribute` and
`setAttribute`
- Tested the markdown editor and it works as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 428e05662f4f745fe7fef04ce9218a86aa4f1b6c)
2024-03-30 07:17:29 +01:00