diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-25 19:48:58 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-25 19:48:58 +0300 |
commit | 142bbd900b791478b2ad473efc8e0f78a7afe00d (patch) | |
tree | c93aa1cf9dbd53da3a5b7dd008509678490951eb /app/assets/javascripts/vue_shared | |
parent | fea7b9e68255771a308e9d391079d83c58340814 (diff) | |
parent | b83dcd3a30539f86b13d91ffd24fb708652eae80 (diff) |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into 18608-lock-issues
# Conflicts:
# app/assets/javascripts/notes/components/issue_comment_form.vue
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/table_pagination.vue | 10 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/vue_resource_interceptor.js | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/app/assets/javascripts/vue_shared/components/table_pagination.vue b/app/assets/javascripts/vue_shared/components/table_pagination.vue index c9dbc048345..710452bb3d3 100644 --- a/app/assets/javascripts/vue_shared/components/table_pagination.vue +++ b/app/assets/javascripts/vue_shared/components/table_pagination.vue @@ -1,11 +1,13 @@ <script> +import { s__ } from '../../locale'; + const PAGINATION_UI_BUTTON_LIMIT = 4; const UI_LIMIT = 6; const SPREAD = '...'; -const PREV = 'Prev'; -const NEXT = 'Next'; -const FIRST = '« First'; -const LAST = 'Last »'; +const PREV = s__('Pagination|Prev'); +const NEXT = s__('Pagination|Next'); +const FIRST = s__('Pagination|« First'); +const LAST = s__('Pagination|Last »'); export default { props: { diff --git a/app/assets/javascripts/vue_shared/vue_resource_interceptor.js b/app/assets/javascripts/vue_shared/vue_resource_interceptor.js index 7f8e514fda1..b9693892f45 100644 --- a/app/assets/javascripts/vue_shared/vue_resource_interceptor.js +++ b/app/assets/javascripts/vue_shared/vue_resource_interceptor.js @@ -1,5 +1,6 @@ import Vue from 'vue'; import VueResource from 'vue-resource'; +import csrf from '../lib/utils/csrf'; Vue.use(VueResource); @@ -18,9 +19,7 @@ Vue.http.interceptors.push((request, next) => { // New Vue Resource version uses Headers, we are expecting a plain object to render pagination // and polling. Vue.http.interceptors.push((request, next) => { - if ($.rails) { - request.headers.set('X-CSRF-Token', $.rails.csrfToken()); - } + request.headers.set(csrf.headerKey, csrf.token); next((response) => { // Headers object has a `forEach` property that iterates through all values. |