Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 17:36:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 17:36:54 +0300
commitf61bb2a16a514b71bf33aabbbb999d6732016a24 (patch)
tree9548caa89e60b4f40b99bbd1dac030420b812aa8 /app/assets/javascripts/branches/branch_sort_dropdown.js
parent35fc54e5d261f8898e390aea7c2f5ec5fdf0539d (diff)
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc42
Diffstat (limited to 'app/assets/javascripts/branches/branch_sort_dropdown.js')
-rw-r--r--app/assets/javascripts/branches/branch_sort_dropdown.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/assets/javascripts/branches/branch_sort_dropdown.js b/app/assets/javascripts/branches/branch_sort_dropdown.js
new file mode 100644
index 00000000000..9914ce05a95
--- /dev/null
+++ b/app/assets/javascripts/branches/branch_sort_dropdown.js
@@ -0,0 +1,25 @@
+import Vue from 'vue';
+import SortDropdown from './components/sort_dropdown.vue';
+
+const mountDropdownApp = (el) => {
+ const { mode, projectBranchesFilteredPath, sortOptions } = el.dataset;
+
+ return new Vue({
+ el,
+ name: 'SortBranchesDropdownApp',
+ components: {
+ SortDropdown,
+ },
+ provide: {
+ mode,
+ projectBranchesFilteredPath,
+ sortOptions: JSON.parse(sortOptions),
+ },
+ render: (createElement) => createElement(SortDropdown),
+ });
+};
+
+export default () => {
+ const el = document.getElementById('js-branches-sort-dropdown');
+ return el ? mountDropdownApp(el) : null;
+};