aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
...
* Vendor `jquery.are-you-sure` with strict mode fixes (#26901)silverwind2023-09-062-1/+196
| | | | | | | | | | | | | | Extract from https://github.com/go-gitea/gitea/pull/25940 and because https://github.com/go-gitea/gitea/pull/26743 does seem to need more work. This will be required if we are to run our JS in [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). Previously, the two variables `$fields` and `$dirtyForms` polluted `window`: <img width="1145" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/e0270a0e-b881-4ed7-9cc4-e9ab25c0a2bc">
* More fixes for the "commit-body" (#26898)wxiaoguang2023-09-041-2/+3
| | | | | | | | | | | The changes for "commit-body" in #26877 are not ideal. The reason is: the "commit-body" is usually a `<pre>`, it has default margins. In most cases, we do not need that large margin. So, this PR introduces a general but small margin for all "commit-body" elements. Then these `gt-m-0` could be removed. The `:not` selector is not needed, because the `.timeline-item` selector is already clear enough.
* Remove CSS `has` selector and improve various styles (#26891)wxiaoguang2023-09-043-38/+29
| | | | | | | | | | | | | | | | | | | | Replace #26850 Major changes: 1. Remove all `has` selectors, it is still not supported by firefox. Actually there could be some more general and clearer approaches 2. Remove `two-toggle-buttons`, the `.ui.buttons` just works well 3. Rewrite the `.ui.buttons` border styles, see the screenshots 4. Remove the "fine-tuning" paddings from the the flex children, they could layout themselves well. ![image](https://github.com/go-gitea/gitea/assets/2114189/a32ed6f3-60f7-43d5-9492-62c45d2397f6) ![image](https://github.com/go-gitea/gitea/assets/2114189/5cb173c5-c942-4237-8cb4-2697220b3f06) ![image](https://github.com/go-gitea/gitea/assets/2114189/8a1c12b3-a632-48ff-b1a7-a01a4417f821) ![image](https://github.com/go-gitea/gitea/assets/2114189/46bde1bd-9113-4231-965d-6ec9076f6a3b)
* Refactor "shortsha" (#26877)wxiaoguang2023-09-033-72/+5
| | | | | | | | | | | | | | | | | | | | The old code used complex `if` blocks and strange HTML layouts. <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/7fbee2b8-d150-4e6b-b67e-83400fa290eb) </details> This PR refactors the template code and remove legacy CSS styles. The UI doesn't change much. ![image](https://github.com/go-gitea/gitea/assets/2114189/3e195df9-0ab5-4182-bcb2-bb20cad823f2) ![image](https://github.com/go-gitea/gitea/assets/2114189/f707a49f-be41-4dfe-871f-2869f2230380)
* Reorder blocks in vue SFCs (#26874)silverwind2023-09-0213-679/+661
| | | | | | | | | | | | | The [recommended order](https://vuejs.org/guide/scaling-up/sfc.html) for SFC blocks is script -> template -> style, which we were violating because template and script were swapped. I do find script first also easier to read because the imports are on top, letting me immideatly see a component's dependencies. This is a pure cut-paste refactor with some removal of some empty lines. --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Make it posible to customize nav text color via css var (#26807)65432023-09-022-0/+5
| | | | --- *Sponsored by Kithara Software GmbH*
* Remove some unused CSS styles (#26852)wxiaoguang2023-09-012-13/+1
| | | | 1. `icons`: globally searched, no use in templates. 2. toast's `display: inline-block;`: there is a `display: flex` below.
* Minor dashboard tweaks, fix flex-list margins (#26829)silverwind2023-08-312-8/+13
| | | | | | | | | | | | | | | | | | | | Some small dashboard tweaks: - Remove margin-bottom from divider so first item does not appear to have un-equal margins - Restore previous icon color - Add slight margin-right to icon Before: <img width="783" alt="Screenshot 2023-08-31 at 00 10 28" src="https://github.com/go-gitea/gitea/assets/115237/b75f70d7-8704-4afb-866d-fea0484c52d4"> After: <img width="783" alt="Screenshot 2023-08-31 at 00 10 08" src="https://github.com/go-gitea/gitea/assets/115237/50ed0c47-6f7c-449e-a054-13091369d43f"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove "TODO" tasks from CSS file (#26835)wxiaoguang2023-08-314-28/+8
| | | | | | | | 1. Use `gt-invisible` instead of `invisible`. 2. Use `gt-word-break` instead of `dont-break-out` (there is a slight different "hyphens", but I think it won't affect too much since it is only used for the "full name"). 3. Remove `.small.button:has(svg)` , now our buttons could layout SVG correctly, and actually I didn't see this CSS class is used in code.
* User details page (#26713)Denys Konovalov2023-08-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR implements a proposal to clean up the admin users table by moving some information out to a separate user details page (which also displays some additional information). Other changes: - move edit user page from `/admin/users/{id}` to `/admin/users/{id}/edit` -> `/admin/users/{id}` now shows the user details page - show if user is instance administrator as a label instead of a separate column - separate explore users template into a page- and a shared one, to make it possible to use it on the user details page - fix issue where there was no margin between alert message and following content on admin pages <details> <summary>Screenshots</summary> ![grafik](https://github.com/go-gitea/gitea/assets/47871822/1ad57ac9-f20a-45a4-8477-ffe572a41e9e) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/25786ecd-cb9d-4c92-90f4-e7f4292c073b) </details> Partially resolves #25939 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Render code blocks in repo description (#26830)silverwind2023-08-312-5/+1
| | | | | | | | | | Backtick syntax now works in repo description too. Also, I replaced the CSS for this was a new single class, making it more flexible and not dependent on a parent. Also, very slightly reduced font size from 16.8px to 16px. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove joinPaths function (#26833)silverwind2023-08-313-53/+2
| | | | | | Extract from https://github.com/go-gitea/gitea/pull/25940. `assetUrlPrefix` is guaranteed to not contain trailing slashes, making this function unneeded.
* Remove polluted `.ui.right` (#26825)wxiaoguang2023-08-313-11/+2
| | | | | | | | | | | | | Each change is tested manually line by line. There are too many changes so I can't share dozens of screenshots. In short: 1. `ui right` could be still used in `ui top attached header`, because there is a special case. 2. A lot of `ui right` are just no-op, so they can be removed safely. 3. Some of the `ui right` should be replaced by `gt-float-right` (to avoid breaking, leave them to the future). 4. A few of the `ui right` could be rewritten by flex.
* Remove polluted ".ui.left" style (#26809)wxiaoguang2023-08-303-24/+1
|
* Remove fomantic `text` module (#26777)delvh2023-08-303-141/+5
| | | | | | Corollary to #26775: All selectors I found that are actually used and not necessarily present in the current code have been copied to `web_src/css/base.css`. Everything else should be a clean removal.
* Fix Uint8Array comparisons and update vitest (#26805)silverwind2023-08-301-7/+12
| | | | | | | | | Compare those `Uint8Array` via conversion to Array which are properly comparable, so that we don't have to worry about whether `TextEncoder` and `UInt8Array` from the environment are compatible or not. --------- Co-authored-by: delvh <dev.lh@web.de>
* Improve flex list item padding (#26779)wxiaoguang2023-08-291-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Replace #26761 It's better to keep children elements simple, and let parent containers layout the necessary padding/margin. The old `not(:last-child)` and `.flex-item + .flex-item` are not easy to maintain (for example, what if the developer would like to use a "tiny height" item?) The old approach also makes some UI look strange because the first item doesn't have proper padding-top. In this PR, we just simply use `.flex-item { padding: ... }`: * Developers could manually set the item height they want easily * It's easier to make it work with various containers -- with padding (`ui segment`) and without padding (`div`) And added more samples/examples. ![image](https://github.com/go-gitea/gitea/assets/2114189/719ea712-0241-4426-b67f-5723993c4ed7) Co-authored-by: Giteabot <teabot@gitea.io>
* Fix notification circle (border-radius) (#26794)wxiaoguang2023-08-292-3/+3
| | | `border-radius` means `radius`, not `diameter`, so it should be `50%` and `boxHeight / 2`
* Add default label in branch select list (#26697)yp053272023-08-291-0/+3
|
* Remove fomantic `item` module (#26775)silverwind2023-08-292-526/+0
| | | | | | All selectors had `.ui.items` prefix and I did not find it in any of the templates or JS, so this is a pretty safe removal. Co-authored-by: Giteabot <teabot@gitea.io>
* Improve modal dialog UI (#26764)wxiaoguang2023-08-282-7/+20
| | | | | 1. Fine tune the CSS styles, and add more examples 2. Add necessary "dimmer" animation for modal dialogs, otherwise the UI seems flicking (follow #26469)
* Unify `border-radius` behavior (#26770)delvh2023-08-2817-42/+41
| | | | | | | | | | | | | | ## Changes - no more hardcoded `border-radius`es (apart from `0`) - no more value inconsistencies - no more guessing what pixel value you should use - two new variables: - `--border-radius-medium` (for elements where the normal border radius does not suffice) - `--border-radius-circle` (for displaying circles) --------- Co-authored-by: silverwind <me@silverwind.io>
* Refactor some CSS styles and simplify code (#26771)wxiaoguang2023-08-281-27/+13
| | | | | Refactor some CSS styles and simplify code. Some styles are not in use, remove them.
* Remove some transition related code (#26755)wxiaoguang2023-08-282-8/+0
| | | | Remove transition related code because the transition module has been removed by #26469
* Adding hint `Archived` to archive label. (#26741)puni98692023-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup https://github.com/go-gitea/gitea/pull/26478 ## Archived labels UI Changed: * Enhanced the Filtered UI page to seamlessly incorporate a list of archived labels. Outsourced: * Defer the implementation of specialized handling for archived labels to upcoming pull requests. This step will be undertaken subsequent to the successful merge of this pull request. Screenshots ![image](https://github.com/go-gitea/gitea/assets/80308335/1f33cfb2-2bac-46f0-9103-9e62d235b1d2) ![image](https://github.com/go-gitea/gitea/assets/80308335/3609acd0-b1ba-4ee9-8c4e-1a34dbc37dd7) ![image](https://github.com/go-gitea/gitea/assets/80308335/9860196d-2391-409b-a9a0-1205ab4b412b) --- Part of https://github.com/go-gitea/gitea/issues/25237 --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* Fix incorrect "tabindex" attributes (#26733)wxiaoguang2023-08-261-4/+3
| | | | | | | | | | | | Fix #26731 Almost all "tabindex" in code are incorrect. 1. All "input/button" by default are focusable, so no need to use "tabindex=0" 2. All "div/span" by default are not focusable, so no need to use "tabindex=-1" 3. All "dropdown" are focusable by framework, so no need to use "tabindex" 4. Some tabindex values are incorrect (eg: `new_form.tmpl`), so remove them Co-authored-by: Giteabot <teabot@gitea.io>
* Simplify helper CSS classes and avoid abuse (#26728)wxiaoguang2023-08-263-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed CSS helper classes (some of them are not useful while some of them are abused often) * `gt-db`: in most cases it could be replaced by `gt-df` and the flex layout should be encouraged. Other cases: either it does need the `gt-df` (eg: by using `div` directly) or it is an abuse (eg: the warning message in a form) * `gt-di`: it doesn't seem useful, or it could be replaced by `gt-dib` in most cases. * `gt-dif`: not useful, it could be replaced by `flex-text-inline` or `gt-df` * `gt-js`: never used * All `<i class="icon gt-df gt-ac gt-jc">` could be written as `<i class="icon">` ## Some UI samples ### Admin Notice ![image](https://github.com/go-gitea/gitea/assets/2114189/d02010d4-dc7d-463f-bc99-dcc9b6e2e2ac) ### Admin Stacktrace ![image](https://github.com/go-gitea/gitea/assets/2114189/4045695c-a8c4-4e37-b720-e77a61b1e965) ### Org Home ![image](https://github.com/go-gitea/gitea/assets/2114189/069f02d0-76ad-4052-8a80-700d7e501d40) ### Org Team Repo ![image](https://github.com/go-gitea/gitea/assets/2114189/dc8d6106-bb6b-4f60-83ac-06cb28df3ab5) ### Release List ![image](https://github.com/go-gitea/gitea/assets/2114189/0845e8a5-d1a9-487a-9d25-3c200ad54c17) ### User Setting Application Token Scope ![image](https://github.com/go-gitea/gitea/assets/2114189/fffbde27-432b-49c6-827e-17b8cd3457ff) Co-authored-by: Giteabot <teabot@gitea.io>
* Remove fomantic loader module (#26670)silverwind2023-08-256-984/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Replace Fomantic `loader` CSS module with our existing `is-loading` spinner. Only three places in the UI used this module, which are pictured here: imagediff: <img width="1237" alt="Screenshot 2023-08-22 at 22 18 01" src="https://github.com/go-gitea/gitea/assets/115237/b0d82531-f05e-43c6-9e5b-1bfc268c056d"> webauthn: <img width="894" alt="Screenshot 2023-08-22 at 22 05 05" src="https://github.com/go-gitea/gitea/assets/115237/7b583425-d944-474a-a57a-22a65bbd8b29"> heatmap (I removed the previous loading text, it was unreadable because it was tiny and on fast machines only visible for a fraction of a second): <img width="764" alt="Screenshot 2023-08-22 at 22 18 44" src="https://github.com/go-gitea/gitea/assets/115237/1c7472d6-3e17-4224-a992-d8c0b380cc73"> Also, heatmap container does not resize any more after loading now and previous duplicate id `user-heatmap` is gone. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add `eslint-plugin-vue-scoped-css` (#26720)silverwind2023-08-252-23/+21
| | | | | | | | | | Adds [eslint-plugin-vue-scoped-css](https://github.com/future-architect/eslint-plugin-vue-scoped-css) and fixes discovered issues which are: - 1 unused selector - 3 selectors with `.full.height` parent in a `<style scoped>` block so the rule could not find the parent. Move these into the unscoped block instead. They worked before and after.
* Fixed text overflow in dropdown menu (#26694)Viktor Suprun2023-08-251-0/+5
| | | | | | | | Fixes #26622 ![image](https://github.com/go-gitea/gitea/assets/683358/168b7e4d-97ba-4b5f-a5f5-33ee67e8b4be) Co-authored-by: Giteabot <teabot@gitea.io>
* Remove incorrect CSS helper classes (#26712)wxiaoguang2023-08-253-23/+15
|
* Focus editor on "Write" tab click (#26714)silverwind2023-08-251-0/+6
| | | | | Focus the editor when clicking the "Write" tab. Works for both Textarea and EasyMDE. Does for some reason not work without the `requestAnimationFrame`.
* Fix review bar misalignment (#26711)wxiaoguang2023-08-241-10/+6
|
* Use "small-loading-icon" insead of "btn-octicon is-loading" (#26710)wxiaoguang2023-08-242-9/+2
| | | | | | | | The "btn-octicon is-loading" was introduced by #21842 , it is only used by the "Copy Content" button, but the "btn-octicon" selector would affect too many uncertain elements. Now there is a general "small-loading-icon" class, so the "btn-octicon is-loading" could be removed.
* Improve Image Diff UI (#26696)wxiaoguang2023-08-242-6/+14
| | | | | 1. Use `is-loading` instead of `ui loader` 2. Introduce class name `image-diff-tabs`, instead of searching `gt-hidden`, which is fragile 3. Align the UI elements, see the screenshots.
* Handle "comment form combo editor init" more gracefully (#26688)wxiaoguang2023-08-231-2/+3
| | | | | Now Gitea exposes unhandled promise rejection messages as error message on the UI. The "comment form" was quite unclear before, so it should be handled more gracefully to avoid such error.
* Fix doubled box-shadow in branch dropdown menu (#26678)wxiaoguang2023-08-231-1/+1
|
* Refactor toast module (#26677)wxiaoguang2023-08-233-20/+15
| | | | 1. Do not use "async" 2. Call `hideToast` instead of `removeElement` for manual closing
* More improvements for the "flex list" and the dashboard list (#26675)wxiaoguang2023-08-232-5/+3
| | | Follow #26649 and #25790 and add one more example (text truncate) in the devtest page
* Use line-height: normal by default (#26635)wxiaoguang2023-08-222-6/+2
| | | Fix #26537 again because 1.15 is too small for some fonts.
* Fix organization list in dashboard (#26650)yp053272023-08-221-3/+7
| | | | | | | | | | | Fix ui problem comes from #26326 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/c59264c9-ed63-48ae-8f76-779058e4b226) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/77d69274-6988-494a-970a-42fe69767e1e)
* Improve some flex layouts (#26649)wxiaoguang2023-08-222-5/+3
| | | | | | | | Fix #26617 1. Separate the "flex-list" examples into a dedicated template, and add some more examples 2. Use `flex-basis` instead of `flex-shrink` for `flex-item-trailing`, to avoid wrapping the texts too aggressively 3. Some `flex-wrap: wrap;` are removed
* Check disabled workflow when rerun jobs (#26535)yp053272023-08-223-86/+55
| | | | | | | | In GitHub, we can not rerun jobs if the workflow is disabled. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve the branch selector tab UI (#26631)wxiaoguang2023-08-212-22/+39
|
* Replace box-shadow for `floating` dropdown as well (#26581)silverwind2023-08-212-1/+5
| | | | | | | | | | | | | Add `box-shadow` replacement to the `floating` dropdown variant as well, which was missed in https://github.com/go-gitea/gitea/pull/26469. The Fomantic style has `!important`, so this has to have too. Also made a tiny adjustment to shadow color on dark theme. <img width="305" alt="Screenshot 2023-08-18 at 16 40 34" src="https://github.com/go-gitea/gitea/assets/115237/a0aac9cb-6393-4d69-b0b3-00eaac5ccf9f"> <img width="202" alt="Screenshot 2023-08-18 at 16 40 22" src="https://github.com/go-gitea/gitea/assets/115237/0a5fa3aa-7452-4dbd-86ed-ccbc1c872ebb"> Co-authored-by: Giteabot <teabot@gitea.io>
* Add link to job details and tooltip to commit status in repo list in ↵yp053272023-08-211-7/+14
| | | | | | | | | | | dashboard (#26326) Tooltip: ![image](https://github.com/go-gitea/gitea/assets/18380374/237cb545-7844-424b-b995-1008eaaaedec) Link to the target job: ![image](https://github.com/go-gitea/gitea/assets/18380374/0c11a97f-6517-47f2-8773-f381488c084e)
* Use "input" event instead of "keyup" event for migration form (#26602)wxiaoguang2023-08-201-3/+3
| | | Otherwise, "pasted" content won't update the UI.
* Update JS dependencies (#26586)silverwind2023-08-191-2/+2
| | | | | - Update all JS dependencies - Adapt `ansi_up` import for ESM - Tested Mermaid and Ansi rendering
* Rewrite the DiffFileTreeItem and fix misalignment (#26565)wxiaoguang2023-08-182-108/+46
| | | | | | | | | | | | | | | Fix some layout / user-interaction problems and close #25650 , the code has been simplified (+46 −108) <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/55c38812-3338-4048-9137-0cae0ef213e8) </details> --------- Co-authored-by: delvh <dev.lh@web.de>
* Allow text selection in actions step header (#26588)silverwind2023-08-181-1/+0
|