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>2022-02-02 00:12:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-02 00:12:02 +0300
commit71722304bef22d1b162207e3e25e4109b0d0f8c1 (patch)
treea80189974f400946831c047ca5d4f018b9bacccc /app/assets/javascripts/behaviors
parent143a33345cf3607ad35ec31130cec4922bc1113c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r--app/assets/javascripts/behaviors/shortcuts/shortcuts.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts.js b/app/assets/javascripts/behaviors/shortcuts/shortcuts.js
index acb2355852d..9297b14aac9 100644
--- a/app/assets/javascripts/behaviors/shortcuts/shortcuts.js
+++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts.js
@@ -1,9 +1,9 @@
import $ from 'jquery';
-import Cookies from 'js-cookie';
import { flatten } from 'lodash';
import Mousetrap from 'mousetrap';
import Vue from 'vue';
-import { parseBoolean } from '~/lib/utils/common_utils';
+import { getCookie, setCookie, parseBoolean } from '~/lib/utils/common_utils';
+
import findAndFollowLink from '~/lib/utils/navigation_utility';
import { refreshCurrentPage, visitUrl } from '~/lib/utils/url_utility';
import {
@@ -161,10 +161,10 @@ export default class Shortcuts {
static onTogglePerfBar(e) {
e.preventDefault();
const performanceBarCookieName = 'perf_bar_enabled';
- if (parseBoolean(Cookies.get(performanceBarCookieName))) {
- Cookies.set(performanceBarCookieName, 'false', { expires: 365, path: '/' });
+ if (parseBoolean(getCookie(performanceBarCookieName))) {
+ setCookie(performanceBarCookieName, 'false', { path: '/' });
} else {
- Cookies.set(performanceBarCookieName, 'true', { expires: 365, path: '/' });
+ setCookie(performanceBarCookieName, 'true', { path: '/' });
}
refreshCurrentPage();
}
@@ -172,8 +172,8 @@ export default class Shortcuts {
static onToggleCanary(e) {
e.preventDefault();
const canaryCookieName = 'gitlab_canary';
- const currentValue = parseBoolean(Cookies.get(canaryCookieName));
- Cookies.set(canaryCookieName, (!currentValue).toString(), {
+ const currentValue = parseBoolean(getCookie(canaryCookieName));
+ setCookie(canaryCookieName, (!currentValue).toString(), {
expires: 365,
path: '/',
// next.gitlab.com uses a leading period. See https://gitlab.com/gitlab-org/gitlab/-/issues/350186