summaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
* Remove duplicate logic in initListSubmits (#12660)赵智超2020-09-021-56/+36
| | | | | | | | | | | | | | | | | | * Remove duplicate logic in initListSubmits Using the same logic to handle Choosing reviewers and assignees as choosing label. It's the first step of #10926. Signed-off-by: a1012112796 <1012112796@qq.com> * fix choose block * fix nit * try fix bug * simple code Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Do not disable commit changes button on repost (#12644)zeripath2020-08-291-1/+3
| | | | | | | | If the user has pressed commit changes and the post has failed - do not disable the commit changes button. Fix #12072 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Dark theme for line numbers in blame view (#12632)Mike L2020-08-291-2/+4
|
* Avoid unnecessary system-ui expansion (#12522)Mike L2020-08-281-8/+8
| | | | | | | | * Avoid unnecessary system-ui expansion (fix #12325) * extract config to static object Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Apply #12576 to top right reaction picker (#12623)Mike L2020-08-282-13/+10
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Git migration UX (#12619)John Olheiser2020-08-283-27/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Implementation Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix gitlab and token cloning Signed-off-by: jolheiser <john.olheiser@gmail.com> * Imports and JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Linting Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move mirror toggle and rename options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix ellipsis in files table (#12617)silverwind2020-08-271-2/+3
| | | | | | | Turns out text ellispsis does not work in combination with flexbox and while wrapping in a display:block can help in some cases, I could not get this to work properly so this changes the truncate to inline-block again and reduces the clickable area to just vertical expansion from the links.
* Extract Swagger CSS to its own file (#12616)silverwind2020-08-261-0/+31
|
* Fix file table overflows (#12603)silverwind2020-08-263-5/+21
| | | | | | | | | - Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reindent Less to 2-space (#12602)silverwind2020-08-2520-5828/+5828
| | | Reindent and unify codebase to 2-space indentation.
* Fix emoji replacements, make emoji images consistent (#12567)silverwind2020-08-231-1/+1
| | | | | | | - Fix emoji not being replaced in issue title change text - Make the image attributes consistent, add alt, remove align Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reaction picker display improvements (#12576)silverwind2020-08-232-7/+28
| | | | | | | | - Remove overly thin font-width on counter - Add hover effect on reaction picker - Change colors on arc-green to green to match the theme Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Increase clickable area on files table links (#12553)silverwind2020-08-231-5/+10
|
* Set z-index for sticky diff box lower (#12537)zeripath2020-08-191-1/+1
| | | | | Fix #12525 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Kanban board (#8346)Lanre Adelowo2020-08-164-1/+201
| | | | | | | | | | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: Kerry <flatline-studios@users.noreply.github.com> Co-authored-by: Jaqra <jaqra@hotmail.com> Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com> Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com> Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Actually fix image diff padding/border (#12381)silverwind2020-08-061-2/+2
| | | | | | | | https://github.com/go-gitea/gitea/pull/12346 was using the wrong selector which affected only the single image view. Use the correct selector for image diffs. Removal of border-radius is still worth to keep to override the global 3px on <img>. Co-authored-by: Lauris BH <lauris@nix.lv>
* Render the git graph on the server (#12333)zeripath2020-08-068-589/+383
| | | | | | | | | | | | | Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation. * This implementation provides a 16 limited color selection * The uniqued color numbers are also provided * And there is also a monochrome version *In addition is a hover highlight that allows users to highlight commits on the same flow. Closes #12209 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: silverwind <me@silverwind.io>
* Collapse Swagger UI tags by default (#12428)silverwind2020-08-051-0/+1
| | | | | | | | This makes is slightly faster to navigate through the swagger docs by initially collapsing the tags like 'admin' or 'miscellaneous'. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Add loading spinners and mermaid error handling (#12358)silverwind2020-08-047-19/+120
| | | | | - Add loading spinners on editor and mermaid renderers - Add error handling and inline error box for mermaid - Fix Mermaid rendering by using the .init api
* Improve HTML escaping helper (#12383)silverwind2020-07-301-10/+7
| | | | | | | | The previous method did not escape single quotes which under some circumstances can lead to XSS vulnerabilites and the fact that it depends on jQuery is also not ideal. Replace it with a lightweight module. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Various arc-green fixes (#12384)silverwind2020-07-301-6/+27
| | | | | | | | - Fix various white borders - Fix dropdown triangle - Fix tab backgrounds - Fix release page timeline dots Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Move jquery-minicolors to npm/webpack (#12305)silverwind2020-07-292-3/+14
| | | | | | | | | | | | | | | | | | | | * Move jquery-minicolors to npm/webpack - Unvendor and add as npm dependency - Removed unneeded backend variable - Fixed existing bug where picker would previously initizalize to the same green color when editing a label. There was probably a version bump because the previous version was over 3 years old but it seems to be compatible. * use file-loader * trailing comma and comment update * misc tweaks Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove padding/border-radius on image diffs (#12346)silverwind2020-07-281-1/+2
|
* Add mermaid JS renderer (#12334)silverwind2020-07-276-0/+57
| | | | | | | | | | | | | | | | | | | * Add mermaid JS renderer For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes. Ref: https://github.com/go-gitea/gitea/issues/3340 Fixes: https://github.com/go-gitea/gitea/issues/12307 * add feature entry, switch to neutral theme, remove border * add bindFunctions support * remove unnecessary border-radius Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reduce emoji size (#12317)silverwind2020-07-252-20/+5
| | | | | | | | | | * Reduce emoji size Rendering should now pretty much match GitHub with 1.25em. I verified that emojis don't increase the line height and removed unecessary size overrides because now all emojis should appear similar in relation to the font size. * fix reaction hover
* Remove unused svg and improve 'make svg-check' (#12311)silverwind2020-07-241-1/+0
| | | | - Remove unused source SVG gitea-settings (it was changed to ociticon) - Improve 'make svg-check' to also detect added files
* Fix input box value access on repo create (#12299)silverwind2020-07-231-2/+2
| | | Followup to https://github.com/go-gitea/gitea/pull/12202
* Auto-init repo on license, .gitignore select (#12202)Alexander Scheel2020-07-231-0/+11
| | | | | | | | | | | | | | | | | | | * Auto-init repo on license, .gitignore select When a .gitignore or LICENSE file is added, the user is expecting the repository to be auto-initialized. However, nothing sets the auto_init value, so it remains at its default. We should set it to checked when a .gitignore or LICENSE file is added, matching user expectations. If the user clears .gitignore or LICENSE, it will leave repository creation enabled. If the user changes the value again, it will re-check the box if the user has since de-checked it. This behavior is at least consistent. Resolves: #11071 Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Update Octicons to v10 (#12240)silverwind2020-07-179-40/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update Octicons to v10 Besides a few renames, these icons are no longer present in v10 that we've used, so had to change: file-symlink-directory -> file-submodule internal-repo -> repo repo-force-push -> repo-push repo-template-private -> repo-template Fixes: https://github.com/go-gitea/gitea/issues/11889 Ref: https://github.com/primer/octicons/releases/tag/v10.0.0 * add custom sliders svg for removed octicon-settings * apply suggestion * fix triangles and use play on admin dashboard * add custom mirror svg * add missing build files * unify custom svgs * move to octicon-repo-clone to gitea-mirror * use octicon-x on conflicts * tweak timeline icons * tweak comment buttons * update settings icon to octicons v1 * switch to octicon-mirror and octicon-tools * replace two wiki buttons with octicons * remove whitespace in svg sources * Fix filepath basename on Windows for SVG bindata (#12241) * move octicons to devDependencies * move back to dependencies * move svgo to devDependencies again Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Replace code fold icons with octicons (#12222)silverwind2020-07-135-47/+63
| | | | | | | | - replace font-awesome icons with octicons - clean up js and css surrounding the code expansion and file folding - fix hover color on arc-green - tweak diff line number colors Co-authored-by: zeripath <art27@cantab.net>
* Fix repolist icons (#12228)silverwind2020-07-132-2/+26
| | | Fixes: https://github.com/go-gitea/gitea/issues/12226
* Direct SVG rendering (#12157)silverwind2020-07-128-16/+42
| | | | | | | | | | | | Introduce 'make svg' which calls a node script that compiles svg files to `public/img/svg`. These files are vendored to not create a dependency on Node for the backend build. On the frontend side, configure webpack using `raw-loader` so SVGs can be imported as string. Also moved our existing SVGs to web_src/svg for consistency. Fixes: https://github.com/go-gitea/gitea/issues/11618
* Make copy/paste work for source code (#12191)mrsdizzie2020-07-081-0/+4
| | | | | | | | | | | | | | | * Make copy/paste work for source code Fix regression casued by #12047 so copy/paste works properly in all browsers. Fixes #12184 Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore. * use pseudo-element to prevent copying of comment + symbol even when not visually selected * remove added newline here should not be necessary anymore * make sure empty line is newline so there is something to select and copy
* Adjust margin-top for repo header label (#12174)Cirno the Strongest2020-07-071-0/+1
|
* Fonts rework (#12114)silverwind2020-07-064-56/+208
| | | | | | | | | | | | | - Use system fonts only for text to avoid FOUT - Move font-awesome to npm/webpack - Move NotoColorEmoji to web_src - Remove presumably unneccesary 'PT Sans Narrow' - Simplify webpack import exclusions Fixes: https://github.com/go-gitea/gitea/issues/11818 Fixes: https://github.com/go-gitea/gitea/pull/11814 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Ensure tabs wrap correctly on user profile page (#12144)George Merlocco2020-07-051-0/+3
| | | Co-authored-by: zeripath <art27@cantab.net>
* Rewrite GitGraph.js (#12137)zeripath2020-07-053-436/+567
| | | | | | | | | | | | | | | | | | | The current vendored gitgraph.js is no longer maintained and is difficult to understand, fix and maintain. This PR completely rewrites its logic - hopefully in a clearer fashion and easier to maintain. It also includes @silverwind's improvements of coloring the commit dots and preventing the flash of incorrect content. Further changes to contemplate in future will be abstracting out of the flows to an object, storing the involved commit references on the flows etc. However, this is probably a required step for this. Replaces #12131 Fixes #11981 (part 3) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Re-fix #12095 again (#12138)zeripath2020-07-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately some of the suggested changes to #12095 introduced bugs which due to caching behaviour of sharedworkers were not caught on simple tests. These are as follows: * Changing from simple for loop to use includes here: ```js register(port) { if (!this.clients.includes(port)) return; this.clients.push(port); port.postMessage({ type: 'status', message: `registered to ${this.url}`, }); } ``` The additional `!` prevents any clients from being added and should read: ```js if (this.clients.includes(port)) return; ``` * Dropping the use of jQuery `$(...)` selection and using DOM `querySelector` here: ```js async function receiveUpdateCount(event) { try { const data = JSON.parse(event.data); const notificationCount = document.querySelector('.notification_count'); if (data.Count > 0) { notificationCount.classList.remove('hidden'); } else { notificationCount.classList.add('hidden'); } notificationCount.text() = `${data.Count}`; await updateNotificationTable(); } catch (error) { console.error(error, event); } } ``` Requires that `notificationCount.text()` be changed to use `textContent` instead. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Bugfix for shared event source (#12129)zeripath2020-07-042-17/+7
| | | | | | | | For some reason our eslint configuration is not working correctly and a bug has become apparent when trying to backport this to 1.12. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Move EventSource to SharedWorker (#12095)zeripath2020-07-033-30/+209
| | | | | | | | | | | | | Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1 open browser connections from preventing gitea from opening multiple tabs. Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating Fix #11978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Provide option to unlink a fork (#11858)zeripath2020-07-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | * Provide option to unlink a fork Fix #4566 Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * Add check that user can create repo Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @cirnoT Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Improve arc-green code colors (#12111)silverwind2020-07-012-72/+59
| | | | | | | | | | * Improve arc-green code colors This should fix all previous colors that had too few contrast on the background. I took solarized-dark as a baseline and did various improvments. I removed bold/italic flags because I don't think they fit and generally other tools also don't use those font flags. * diff tweak
* Fix merge section in dark theme (#12086)Lauris BH2020-07-011-26/+29
| | | | | * Fix merge section in dark theme * Fix lint
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-018-185/+826
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Server-side syntax hilighting for all code This PR does a few things: * Remove all traces of highlight.js * Use chroma library to provide fast syntax hilighting directly on the server * Provide syntax hilighting for diffs * Re-style both unified and split diffs views * Add custom syntax hilighting styling for both regular and arc-green Fixes #7729 Fixes #10157 Fixes #11825 Fixes #7728 Fixes #3872 Fixes #3682 And perhaps gets closer to #9553 * fix line marker * fix repo search * Fix single line select * properly load settings * npm uninstall highlight.js * review suggestion * code review * forgot to call function * fix test * Apply suggestions from code review suggestions from @silverwind thanks Co-authored-by: silverwind <me@silverwind.io> * code review * copy/paste error * Use const for highlight size limit * Update web_src/less/_repository.less Co-authored-by: Lauris BH <lauris@nix.lv> * update size limit to 1MB and other styling tweaks * fix highlighting for certain diff sections * fix test * add worker back as suggested Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix commit icon position (#12087)Lauris BH2020-06-292-1/+2
|
* Use custom SVGs for commit signing lock icon (#12017)Cirno the Strongest2020-06-281-1/+5
| | | | | | | | | | | | * Use custom SVGs for commit signing lock icon * missing spans * editorconfig * xmlns and remove aria-hidden Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Shorten markdown heading anchors links (#11903)silverwind2020-06-263-73/+67
| | | | | | | | | | | | | | | | | | | | | This changes the links on headings like '# Usage' in markdown from `https://host/user/repo#user-content-usage` to just `https://host/user/repo#usage` matching GitHub and GitLab. The linked id elements still have the prefix and this behaviour matches GitHub and GitLab too, so JS is needed to scroll to the active anchor. I suspect it's like that to avoid namespace collission between user-generated content and other page content. Compatibilty for old links is included so they will continue to work. Also included are some enhancements to make the clickable area for the link icon larger and fix its color on arc-green. Fixes: https://github.com/go-gitea/gitea/issues/11896 Fixes: https://github.com/go-gitea/gitea/issues/12062
* Add org avatar on top of internal repo icon (#11895)Cirno the Strongest2020-06-263-5/+24
| | | | | | | | | | | | | | | | | * Add org avatar on top of internal repo icon * add color for arc-green * use wrapper div to avoid negative margins * rename class and move div * move div to icon tmpl * remove unnecessary margin for lock octicon * fix label align together with #11891 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use Fomantic's fluid padded for blame full width (#12023)Cirno the Strongest2020-06-251-6/+0
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix gitgraph branch continues after merge (#12044)zeripath2020-06-251-0/+7
| | | | | | | | | | | | | | | | | | | * Fix gitgraph branch continues after merge After fixing the initial problem in #11981 another problem has come to light... Fix #11981 (part 2) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>