forgejo/routers/web/repo
wxiaoguang 59d060622d
Improve RSS (#24335)
Follow  #22719

### Major changes

1. `ServerError` doesn't do format, so remove the `%s`
2. Simplify `RenderBranchFeed` (slightly)
3. Remove unused `BranchFeedRSS`
4. Make `feed.RenderBranchFeed` respect `EnableFeed` config
5. Make `RepoBranchTagSelector.vue` respect `EnableFeed` setting,
otherwise there is always RSS icon
6. The `(branchURLPrefix + item.url).replace('src', 'rss')` doesn't seem
right for all cases, for example, the string `src` could appear in
`branchURLPrefix`, so we need a separate `rssURLPrefix`
7. The `<a>` in Vue menu needs `@click.stop`, otherwise the menu itself
would be triggered at the same time
8. Change `<a><button></button></a>` to `<a role=button>`
9. Use `{{PathEscapeSegments .TreePath}}` instead of `{{range $i, $v :=
.TreeNames}}/{{$v}}{{end}}`


Screenshot of changed parts:

<details>


![image](https://user-images.githubusercontent.com/2114189/234315538-66603694-9093-48a8-af33-83575fd7a018.png)


![image](https://user-images.githubusercontent.com/2114189/234315786-f1efa60b-012e-490b-8ce2-d448dc6fe5c9.png)


![image](https://user-images.githubusercontent.com/2114189/234334941-446941bc-1baa-4256-8850-ccc439476cda.png)

</details>


### Other thoughts

Should we remove the RSS icon from the branch dropdown list? It seems
too complex for a list UI, and users already have the chance to get the
RSS feed URL from "branches" page.

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
2023-04-25 22:53:44 -04:00
..
actions default show closed actions list if all actions was closed (#24234) 2023-04-24 23:34:16 -04:00
activity.go
attachment.go
blame.go Sort repo topic labels by name (#24123) 2023-04-14 15:29:05 -04:00
branch.go Improve RSS (#24335) 2023-04-25 22:53:44 -04:00
cherry_pick.go
commit.go
compare.go Don't list root repository on compare page if pulls not allowed (#24183) 2023-04-19 11:16:46 -04:00
download.go
editor.go Allow adding new files to an empty repo (#24164) 2023-04-19 21:40:42 +08:00
editor_test.go
find.go
helper.go
helper_test.go
http.go Fix incorrect CORS response in Http Git handler (#24303) 2023-04-25 14:35:50 -04:00
http_test.go
issue.go Show commit history for closed/merged PRs (#24238) 2023-04-21 12:36:37 -04:00
issue_content_history.go
issue_dependency.go
issue_label.go
issue_label_test.go
issue_lock.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
lfs.go
main_test.go
middlewares.go
migrate.go
milestone.go
packages.go
patch.go
projects.go Add unset default project column (#23531) 2023-04-19 10:28:28 -04:00
projects_test.go
pull.go
pull_review.go
release.go Add tags list for repos whose release setting is disabled (#23465) 2023-04-25 18:29:00 +02:00
release_test.go
render.go
repo.go
runners.go
search.go
setting.go
setting_protected_branch.go
setting_secrets.go Only delete secrets belonging to its owner (#24284) 2023-04-23 21:35:14 +08:00
settings_test.go
tag.go
topic.go
treelist.go
view.go Add RSS Feeds for branches and files (#22719) 2023-04-25 22:08:29 +08:00
view_test.go
webhook.go
wiki.go Make wiki title supports dashes and improve wiki name related features (#24143) 2023-04-19 13:50:10 -04:00
wiki_test.go Make wiki title supports dashes and improve wiki name related features (#24143) 2023-04-19 13:50:10 -04:00