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>2020-04-01 18:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 18:07:45 +0300
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /app/assets
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/blob/pipeline_tour_success_modal.vue27
-rw-r--r--app/assets/javascripts/lib/utils/icon_utils.js4
-rw-r--r--app/assets/javascripts/pages/static_site_editor/index.js5
-rw-r--r--app/assets/javascripts/static_site_editor/components/static_site_editor.vue3
-rw-r--r--app/assets/javascripts/static_site_editor/index.js20
-rw-r--r--app/assets/javascripts/static_site_editor/store/index.js13
-rw-r--r--app/assets/javascripts/static_site_editor/store/state.js6
7 files changed, 72 insertions, 6 deletions
diff --git a/app/assets/javascripts/blob/pipeline_tour_success_modal.vue b/app/assets/javascripts/blob/pipeline_tour_success_modal.vue
index 179a515e5ca..3ccd84037a7 100644
--- a/app/assets/javascripts/blob/pipeline_tour_success_modal.vue
+++ b/app/assets/javascripts/blob/pipeline_tour_success_modal.vue
@@ -21,6 +21,8 @@ export default {
},
false,
),
+ goToTrackValue: 10,
+ trackEvent: 'click_button',
components: {
GlModal,
GlSprintf,
@@ -43,12 +45,17 @@ export default {
},
data() {
return {
- tracking: {
- label: 'congratulate_first_pipeline',
- property: this.humanAccess,
- },
+ trackLabel: 'congratulate_first_pipeline',
};
},
+ computed: {
+ tracking() {
+ return {
+ label: this.trackLabel,
+ property: this.humanAccess,
+ };
+ },
+ },
mounted() {
this.track();
this.disableModalFromRenderingAgain();
@@ -89,7 +96,17 @@ export default {
</template>
</gl-sprintf>
<template #modal-footer>
- <a :href="goToPipelinesPath" class="btn btn-success">{{ __('Go to Pipelines') }}</a>
+ <a
+ ref="goto"
+ :href="goToPipelinesPath"
+ class="btn btn-success"
+ :data-track-property="humanAccess"
+ :data-track-value="$options.goToTrackValue"
+ :data-track-event="$options.trackEvent"
+ :data-track-label="trackLabel"
+ >
+ {{ __('Go to Pipelines') }}
+ </a>
</template>
</gl-modal>
</template>
diff --git a/app/assets/javascripts/lib/utils/icon_utils.js b/app/assets/javascripts/lib/utils/icon_utils.js
index 97ee773358d..043043f2eb5 100644
--- a/app/assets/javascripts/lib/utils/icon_utils.js
+++ b/app/assets/javascripts/lib/utils/icon_utils.js
@@ -9,8 +9,10 @@ const getSvgDom = memoize(() =>
axios
.get(gon.sprite_icons)
.then(({ data: svgs }) => new DOMParser().parseFromString(svgs, 'text/xml'))
- .catch(() => {
+ .catch(e => {
getSvgDom.cache.clear();
+
+ throw e;
}),
);
diff --git a/app/assets/javascripts/pages/static_site_editor/index.js b/app/assets/javascripts/pages/static_site_editor/index.js
new file mode 100644
index 00000000000..8f808dae56c
--- /dev/null
+++ b/app/assets/javascripts/pages/static_site_editor/index.js
@@ -0,0 +1,5 @@
+import initStaticSiteEditor from '~/static_site_editor';
+
+window.addEventListener('DOMContentLoaded', () => {
+ initStaticSiteEditor(document.querySelector('#static-site-editor'));
+});
diff --git a/app/assets/javascripts/static_site_editor/components/static_site_editor.vue b/app/assets/javascripts/static_site_editor/components/static_site_editor.vue
new file mode 100644
index 00000000000..7b8b46cb048
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/components/static_site_editor.vue
@@ -0,0 +1,3 @@
+<template>
+ <div></div>
+</template>
diff --git a/app/assets/javascripts/static_site_editor/index.js b/app/assets/javascripts/static_site_editor/index.js
new file mode 100644
index 00000000000..4290cb9a9ba
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/index.js
@@ -0,0 +1,20 @@
+import Vue from 'vue';
+import StaticSiteEditor from './components/static_site_editor.vue';
+import createStore from './store';
+
+const initStaticSiteEditor = el => {
+ const store = createStore();
+
+ return new Vue({
+ el,
+ store,
+ components: {
+ StaticSiteEditor,
+ },
+ render(createElement) {
+ return createElement('static-site-editor', StaticSiteEditor);
+ },
+ });
+};
+
+export default initStaticSiteEditor;
diff --git a/app/assets/javascripts/static_site_editor/store/index.js b/app/assets/javascripts/static_site_editor/store/index.js
new file mode 100644
index 00000000000..653c2532ee6
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/store/index.js
@@ -0,0 +1,13 @@
+import Vuex from 'vuex';
+import Vue from 'vue';
+import createState from './state';
+
+Vue.use(Vuex);
+
+const createStore = ({ initialState } = {}) => {
+ return new Vuex.Store({
+ state: createState(initialState),
+ });
+};
+
+export default createStore;
diff --git a/app/assets/javascripts/static_site_editor/store/state.js b/app/assets/javascripts/static_site_editor/store/state.js
new file mode 100644
index 00000000000..512967cc3d9
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/store/state.js
@@ -0,0 +1,6 @@
+const createState = (initialState = {}) => ({
+ content: '',
+ ...initialState,
+});
+
+export default createState;