summaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Add minimum polyfill to support "relative-time-element" in PaleMoon (#26575)wxiaoguang2023-08-182-0/+19
| | | Close #26525
* Fix various line-height styles (#26553)wxiaoguang2023-08-173-6/+13
| | | | | | | | | | | | | | Fix #26537 Use the same default line-height as "normalize.css" instead of "1". "1" is not right because it doesn't work with descent part and causes overflow problems. ![image](https://github.com/go-gitea/gitea/assets/2114189/3f2e8fb5-b326-4889-bfff-c79c75f1b7f4) --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove fomantic transition module (#26469)silverwind2023-08-167-3177/+72
| | | | | | | | | | Removes all dropdown and dimmer animations. Works everywhere as far as I can tell, but need to give this thorough testing. Removes around 70kb JS/CSS. Note, I'm not 100% sure regarding the various callbacks, those will need more investigation, but it appears to work nonetheless. Fixes: https://github.com/go-gitea/gitea/issues/15709
* Use unique class for breadcrumb divider (#26524)silverwind2023-08-162-5/+10
| | | | | | | | | | | | | | | Fix regression from https://github.com/go-gitea/gitea/pull/25539: https://github.com/go-gitea/gitea/pull/26519#issuecomment-1678825200. Before: <img width="429" alt="Screenshot 2023-08-15 at 15 46 12" src="https://github.com/go-gitea/gitea/assets/115237/a818f60a-77a2-48fe-8e6f-363d152ccb1e"> After: <img width="424" alt="Screenshot 2023-08-15 at 15 46 19" src="https://github.com/go-gitea/gitea/assets/115237/c90159e2-ced2-4a74-8a0f-a1b2b5d0b565"> <img width="605" alt="Screenshot 2023-08-15 at 15 56 11" src="https://github.com/go-gitea/gitea/assets/115237/3ded6f57-86f4-422a-86cb-56dd2c216dee">
* Improve clickable area in repo action view page (#26115)yp053272023-08-161-14/+10
| | | | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/52e4dda1-0221-440b-93e1-242db8bd5885) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/dda5e72b-205e-44f7-b4a9-83703021f2d1) In current design, the clickable area is too small, and it is hard to find the correct clickable area as the area with background color (div with class name `job-brief-item selected`) is bigger than it. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix dark theme highlight for "NameNamespace" (#26519)wxiaoguang2023-08-161-1/+1
| | | | | | | | | | | | | | | | The color is taken from "Name" Before: ![image](https://github.com/go-gitea/gitea/assets/2114189/b94d7521-770c-4e14-a63b-f30c44fe883f) After: ![image](https://github.com/go-gitea/gitea/assets/2114189/d99c1f13-a0c0-4dc8-82ab-bfdd451e46ec) Co-authored-by: Giteabot <teabot@gitea.io>
* Remove duplicate CSS import for chroma/base.css (#26523)silverwind2023-08-161-1/+0
|
* Use `hidden` over `clip` for text truncation (#26520)silverwind2023-08-151-1/+1
| | | | | | | | Avoid browser bugs: - Firefox not cutting off - https://github.com/go-gitea/gitea/pull/26354#issuecomment-1678456052 - Safari not showing ellipsis - https://github.com/go-gitea/gitea/pull/26354#issuecomment-1678812801
* Set "type=button" for editor's toolbar buttons (#26510)wxiaoguang2023-08-151-0/+2
| | | | The editor usually is in a form, so the buttons should have "type=button", avoid conflicting with the form's submit.
* add disable workflow feature (#26413)a10121127962023-08-141-0/+17
| | | | | | | | | | | | | | | | As title, that's simmilar with github. ![image](https://github.com/go-gitea/gitea/assets/25342410/9e8b2444-63e0-4e87-80da-730c1e4d09d6) ![image](https://github.com/go-gitea/gitea/assets/25342410/6c3a3345-3ba7-48c9-9acd-3e621632491b) --------- Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Jason Song <i@wolfogre.com>
* Move dropzone progress bar to bottom to show filename when uploading (#26492)wxiaoguang2023-08-141-0/+6
| | | | 1. Make the "filename" visible 2. Avoiding UI flicker when the uploading is completing
* Allow to archive labels (#26478)puni98692023-08-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Archived labels This adds the structure to allow for archived labels. Archived labels are, just like closed milestones or projects, a medium to hide information without deleting it. It is especially useful if there are outdated labels that should no longer be used without deleting the label entirely. ## Changes 1. UI and API have been equipped with the support to mark a label as archived 2. The time when a label has been archived will be stored in the DB ## Outsourced for the future There's no special handling for archived labels at the moment. This will be done in the future. ## Screenshots ![image](https://github.com/go-gitea/gitea/assets/80308335/208f95cd-42e4-4ed7-9a1f-cd2050a645d4) ![image](https://github.com/go-gitea/gitea/assets/80308335/746428e0-40bb-45b3-b992-85602feb371d) Part of https://github.com/go-gitea/gitea/issues/25237 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix tooltip of commit select button (#26472)silverwind2023-08-141-1/+4
| | | | | Previously, the tooltip for this button was only shown after opening and closing it once because it was only set after the server response, now it shows before opening it.
* Refactor project templates (#26448)Denys Konovalov2023-08-127-103/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR refactors a bunch of projects-related code, mostly the templates. The following things were done: - rename boards to columns in frontend code - use the new `ctx.Locale.Tr` method - cleanup template, remove useless newlines, classes, comments - merge org-/user and repo level project template together - move "new column" button into project toolbar - move issue card (shared by projects and pinned issues) to shared template, remove useless duplicated styles - add search function to projects (to make the layout more similar to milestones list where it is inherited from :laughing:) - maybe more changes I forgot I've done :laughing: Closes #24893 After: ![Bildschirmfoto vom 2023-08-10 23-02-00](https://github.com/go-gitea/gitea/assets/47871822/cab61456-1d23-4373-8163-e567f1b3b5f9) ![Bildschirmfoto vom 2023-08-10 23-02-26](https://github.com/go-gitea/gitea/assets/47871822/94b55d60-5572-48eb-8111-538a52d8bcc6) ![Bildschirmfoto vom 2023-08-10 23-02-46](https://github.com/go-gitea/gitea/assets/47871822/a0358f4b-4e05-4194-a7bc-6e0ecba5a9b6) --------- Co-authored-by: silverwind <me@silverwind.io>