debian-mirror-gitlab/app/assets/javascripts/super_sidebar/constants.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.6 KiB
JavaScript
Raw Normal View History

2023-05-27 22:25:52 +05:30
// Note: all constants defined here are considered internal implementation
// details for the sidebar. They should not be imported by anything outside of
// the super_sidebar directory.
import Vue from 'vue';
export const SIDEBAR_PORTAL_ID = 'sidebar-portal-mount';
2023-06-20 00:43:36 +05:30
export const JS_TOGGLE_COLLAPSE_CLASS = 'js-super-sidebar-toggle-collapse';
export const JS_TOGGLE_EXPAND_CLASS = 'js-super-sidebar-toggle-expand';
2023-05-27 22:25:52 +05:30
export const portalState = Vue.observable({
ready: false,
});
2023-06-20 00:43:36 +05:30
export const sidebarState = Vue.observable({
contextSwitcherOpen: false,
isCollapsed: false,
isPeek: false,
2023-07-09 08:55:56 +05:30
isPeekable: false,
});
export const helpCenterState = Vue.observable({
showTanukiBotChatDrawer: false,
2023-06-20 00:43:36 +05:30
});
2023-05-27 22:25:52 +05:30
export const MAX_FREQUENT_PROJECTS_COUNT = 5;
export const MAX_FREQUENT_GROUPS_COUNT = 3;
2023-06-20 00:43:36 +05:30
export const SUPER_SIDEBAR_PEEK_OPEN_DELAY = 200;
export const SUPER_SIDEBAR_PEEK_CLOSE_DELAY = 500;
export const TRACKING_UNKNOWN_ID = 'item_without_id';
export const TRACKING_UNKNOWN_PANEL = 'nav_panel_unknown';
export const CLICK_MENU_ITEM_ACTION = 'click_menu_item';
2023-07-09 08:55:56 +05:30
export const CLICK_PINNED_MENU_ITEM_ACTION = 'click_pinned_menu_item';
2023-06-20 00:43:36 +05:30
export const PANELS_WITH_PINS = ['group', 'project'];
export const USER_MENU_TRACKING_DEFAULTS = {
'data-track-property': 'nav_user_menu',
'data-track-action': 'click_link',
};
export const HELP_MENU_TRACKING_DEFAULTS = {
'data-track-property': 'nav_help_menu',
'data-track-action': 'click_link',
};
export const SIDEBAR_PINS_EXPANDED_COOKIE = 'sidebar_pinned_section_expanded';
export const SIDEBAR_COOKIE_EXPIRATION = 365 * 10;
export const DROPDOWN_Y_OFFSET = 4;
2023-07-09 08:55:56 +05:30
export const NAV_ITEM_LINK_ACTIVE_CLASS = 'gl-bg-t-gray-a-08';