@@ -34,12 +35,16 @@ import ActiveUsers from '../components/ActiveUsers.vue';
import ActiveOrgs from '../components/ActiveOrgs.vue';
import { getUrlSearchParams } from '~/utils';
+const staticSquareTopics = JSON.stringify(window.staticSquareTopics || []);
+
export default {
data() {
return {
reposListSortType: 'mostpopular',
reposListQurey: '',
reposListTopic: '',
+
+ staticSquareTopics: staticSquareTopics,
};
},
components: {
@@ -71,10 +76,12 @@ export default {
this.reposListTopic = urlParams.topic || '';
this.reposListSortType = urlParams.sort || 'mostpopular';
this.search();
- this.$refs.reposFiltersRef.setDefaultFilter(this.reposListSortType);
- this.$refs.searchBarRef.setDefaultSearch({
- q: this.reposListQurey,
- topic: this.reposListTopic,
+ this.$nextTick(() => {
+ this.$refs.reposFiltersRef.setDefaultFilter(this.reposListSortType);
+ this.$refs.searchBarRef.setDefaultSearch({
+ q: this.reposListQurey,
+ topic: this.reposListTopic,
+ });
});
},
beforeDestroy() { },
diff --git a/web_src/vuepages/pages/repos/square/index.vue b/web_src/vuepages/pages/repos/square/index.vue
index 256b35555..56a8bb539 100644
--- a/web_src/vuepages/pages/repos/square/index.vue
+++ b/web_src/vuepages/pages/repos/square/index.vue
@@ -1,14 +1,15 @@
-
+
+
-
+
-
+
@@ -41,12 +42,22 @@ import ReposList from '../components/ReposList.vue';
import ActiveUsers from '../components/ActiveUsers.vue';
import ActiveOrgs from '../components/ActiveOrgs.vue';
+const staticSquareBanners = JSON.stringify(window.staticSquareBanners || []);
+const staticSquarePreferredRepos = window.staticSquarePreferredRepos || [];
+const staticSquareTopics = JSON.stringify(window.staticSquareTopics || []);
+const staticSquareRecommendRepos = window.staticSquareRecommendRepos || [];
+
export default {
data() {
return {
reposListSortType: 'mostpopular',
reposListQurey: '',
reposListTopic: '',
+
+ staticSquareBanners: staticSquareBanners,
+ staticSquarePreferredRepos: staticSquarePreferredRepos,
+ staticSquareTopics: staticSquareTopics,
+ staticSquareRecommendRepos: staticSquareRecommendRepos,
};
},
components: {