-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Improve dashboard repo search #872
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few notes that I just want answers for 😜
public/js/index.js
Outdated
@@ -1474,16 +1475,45 @@ function selectRange($list, $select, $from) { | |||
changeHash('#' + $select.attr('rel')); | |||
} | |||
|
|||
$(function () { | |||
if ($('.user.signin').length > 0) return; | |||
$('form').areYouSure(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
|
||
searchRepos: function() { | ||
var self = this; | ||
$.getJSON('/api/v1/repos/search?q=' + self.searchQuery, function(result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And all of sudden I feel the urge to write an API-client for javascript (I hate hard-coded URLs 😆 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work if gitea is reached on a subfolder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️ Exactly my point
</li> | ||
{{end}} | ||
<ul class="repo-owner-name-list"> | ||
<li v-for="repo in repos" :class="{'private': repo.private}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means no more server-side rendering right? Is that a good idea?
@@ -54,9 +52,9 @@ | |||
{{.i18n.Tr "home.collaborative_repos"}} | |||
</h4> | |||
<div class="ui attached table segment"> | |||
<ul id="collaborative-repo-list" class="search-list"> | |||
<ul id="collaborative-repo-list"> | |||
{{range .CollaborativeRepos}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No search on collaborative repos?
any update? |
@lunny Not yet. I'll have to review if the API is already complete to finalize this. |
@andreynering I suggest move this to v1.3 |
@lunny Done. Sorry for the delay. |
@andreynering conflicts. |
Closed in favor of #1652 |
This is a WIP.
Followup of #773. This PR makes possible to search all repos, not just the 15 listed.