Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c04bd247
Commit
c04bd247
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 23 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
1173c801
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
66 additions
and
99 deletions
+66
-99
.prettierignore
.prettierignore
+0
-33
app/assets/javascripts/pages/projects/issues/show.js
app/assets/javascripts/pages/projects/issues/show.js
+1
-1
app/assets/javascripts/pages/projects/jobs/index/index.js
app/assets/javascripts/pages/projects/jobs/index/index.js
+2
-2
app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
.../pages/projects/labels/components/promote_label_modal.vue
+2
-2
app/assets/javascripts/pages/projects/labels/index/index.js
app/assets/javascripts/pages/projects/labels/index/index.js
+2
-2
app/assets/javascripts/pages/projects/merge_requests/creations/new/compare.js
...ts/pages/projects/merge_requests/creations/new/compare.js
+2
-2
app/assets/javascripts/pages/projects/new/index.js
app/assets/javascripts/pages/projects/new/index.js
+1
-1
app/assets/javascripts/pages/projects/pages_domains/form.js
app/assets/javascripts/pages/projects/pages_domains/form.js
+3
-3
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/target_branch_dropdown.js
...ine_schedules/shared/components/target_branch_dropdown.js
+4
-4
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js
...pipeline_schedules/shared/components/timezone_dropdown.js
+6
-6
app/assets/javascripts/pages/projects/pipelines/init_pipelines.js
...ts/javascripts/pages/projects/pipelines/init_pipelines.js
+1
-1
app/assets/javascripts/pages/projects/project.js
app/assets/javascripts/pages/projects/project.js
+2
-2
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+1
-1
app/assets/javascripts/pages/projects/shared/permissions/external.js
...javascripts/pages/projects/shared/permissions/external.js
+1
-1
app/assets/javascripts/pages/projects/shared/permissions/index.js
...ts/javascripts/pages/projects/shared/permissions/index.js
+1
-1
app/assets/javascripts/pages/projects/tags/index/index.js
app/assets/javascripts/pages/projects/tags/index/index.js
+1
-1
app/assets/javascripts/pages/search/show/refresh_counts.js
app/assets/javascripts/pages/search/show/refresh_counts.js
+1
-1
app/assets/javascripts/pages/sessions/new/length_validator.js
...assets/javascripts/pages/sessions/new/length_validator.js
+1
-1
app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js
...s/javascripts/pages/sessions/new/preserve_url_fragment.js
+2
-2
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
...ts/javascripts/pages/sessions/new/signin_tabs_memoizer.js
+1
-1
app/assets/javascripts/pages/sessions/new/username_validator.js
...sets/javascripts/pages/sessions/new/username_validator.js
+3
-3
app/assets/javascripts/pages/shared/mount_badge_settings.js
app/assets/javascripts/pages/shared/mount_badge_settings.js
+1
-1
app/assets/javascripts/pages/shared/wikis/wikis.js
app/assets/javascripts/pages/shared/wikis/wikis.js
+4
-4
app/assets/javascripts/pages/users/activity_calendar.js
app/assets/javascripts/pages/users/activity_calendar.js
+9
-9
app/assets/javascripts/pages/users/index.js
app/assets/javascripts/pages/users/index.js
+1
-1
app/assets/javascripts/pdf/index.vue
app/assets/javascripts/pdf/index.vue
+2
-2
app/assets/javascripts/pdf/page/index.vue
app/assets/javascripts/pdf/page/index.vue
+1
-1
app/assets/javascripts/performance/utils.js
app/assets/javascripts/performance/utils.js
+1
-1
app/assets/javascripts/performance_bar/components/detailed_metric.vue
...avascripts/performance_bar/components/detailed_metric.vue
+2
-2
app/assets/javascripts/performance_bar/components/request_selector.vue
...vascripts/performance_bar/components/request_selector.vue
+1
-1
app/assets/javascripts/performance_bar/index.js
app/assets/javascripts/performance_bar/index.js
+3
-3
app/assets/javascripts/performance_bar/performance_bar_log.js
...assets/javascripts/performance_bar/performance_bar_log.js
+3
-3
No files found.
.prettierignore
View file @
c04bd247
...
...
@@ -517,39 +517,6 @@ app/assets/javascripts/lib/utils/text_markdown.js
app/assets/javascripts/lib/utils/text_utility.js
app/assets/javascripts/lib/utils/type_utility.js
## vigorous-wiles
app/assets/javascripts/pages/projects/issues/show.js
app/assets/javascripts/pages/projects/jobs/index/index.js
app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
app/assets/javascripts/pages/projects/labels/index/index.js
app/assets/javascripts/pages/projects/merge_requests/creations/new/compare.js
app/assets/javascripts/pages/projects/new/index.js
app/assets/javascripts/pages/projects/pages_domains/form.js
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/target_branch_dropdown.js
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js
app/assets/javascripts/pages/projects/pipelines/init_pipelines.js
app/assets/javascripts/pages/projects/project.js
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
app/assets/javascripts/pages/projects/shared/permissions/external.js
app/assets/javascripts/pages/projects/shared/permissions/index.js
app/assets/javascripts/pages/projects/tags/index/index.js
app/assets/javascripts/pages/search/show/refresh_counts.js
app/assets/javascripts/pages/sessions/new/length_validator.js
app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
app/assets/javascripts/pages/sessions/new/username_validator.js
app/assets/javascripts/pages/shared/mount_badge_settings.js
app/assets/javascripts/pages/shared/wikis/wikis.js
app/assets/javascripts/pages/users/activity_calendar.js
app/assets/javascripts/pages/users/index.js
app/assets/javascripts/pdf/index.vue
app/assets/javascripts/pdf/page/index.vue
app/assets/javascripts/performance/utils.js
app/assets/javascripts/performance_bar/components/detailed_metric.vue
app/assets/javascripts/performance_bar/components/request_selector.vue
app/assets/javascripts/performance_bar/index.js
app/assets/javascripts/performance_bar/performance_bar_log.js
## musing-khayyam
app/assets/javascripts/performance_bar/services/performance_bar_service.js
app/assets/javascripts/performance_bar/stores/performance_bar_store.js
...
...
app/assets/javascripts/pages/projects/issues/show.js
View file @
c04bd247
...
...
@@ -37,7 +37,7 @@ export default function () {
initRelatedMergeRequestsApp
();
import
(
/* webpackChunkName: 'design_management' */
'
~/design_management
'
)
.
then
(
module
=>
module
.
default
())
.
then
(
(
module
)
=>
module
.
default
())
.
catch
(()
=>
{});
new
ZenMode
();
// eslint-disable-line no-new
...
...
app/assets/javascripts/pages/projects/jobs/index/index.js
View file @
c04bd247
...
...
@@ -5,7 +5,7 @@ import Tracking from '~/tracking';
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
remainingTimeElements
=
document
.
querySelectorAll
(
'
.js-remaining-time
'
);
remainingTimeElements
.
forEach
(
el
=>
(
el
)
=>
new
Vue
({
...
GlCountdown
,
el
,
...
...
@@ -22,5 +22,5 @@ document.addEventListener('DOMContentLoaded', () => {
}
};
const
buttons
=
document
.
querySelectorAll
(
'
.js-empty-state-button
'
);
buttons
.
forEach
(
button
=>
button
.
addEventListener
(
'
click
'
,
trackButtonClick
));
buttons
.
forEach
(
(
button
)
=>
button
.
addEventListener
(
'
click
'
,
trackButtonClick
));
});
app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
View file @
c04bd247
...
...
@@ -58,14 +58,14 @@ export default {
eventHub
.
$emit
(
'
promoteLabelModal.requestStarted
'
,
this
.
url
);
return
axios
.
post
(
this
.
url
,
{
params
:
{
format
:
'
json
'
}
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
eventHub
.
$emit
(
'
promoteLabelModal.requestFinished
'
,
{
labelUrl
:
this
.
url
,
successful
:
true
,
});
visitUrl
(
response
.
data
.
url
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
eventHub
.
$emit
(
'
promoteLabelModal.requestFinished
'
,
{
labelUrl
:
this
.
url
,
successful
:
false
,
...
...
app/assets/javascripts/pages/projects/labels/index/index.js
View file @
c04bd247
...
...
@@ -19,7 +19,7 @@ const initLabelIndex = () => {
}
};
const
onRequestStarted
=
labelUrl
=>
{
const
onRequestStarted
=
(
labelUrl
)
=>
{
const
button
=
document
.
querySelector
(
`.js-promote-project-label-button[data-url="
${
labelUrl
}
"]`
,
);
...
...
@@ -46,7 +46,7 @@ const initLabelIndex = () => {
eventHub
.
$on
(
'
promoteLabelModal.props
'
,
this
.
setModalProps
);
eventHub
.
$emit
(
'
promoteLabelModal.mounted
'
);
promoteLabelButtons
.
forEach
(
button
=>
{
promoteLabelButtons
.
forEach
(
(
button
)
=>
{
button
.
removeAttribute
(
'
disabled
'
);
button
.
addEventListener
(
'
click
'
,
()
=>
{
this
.
$root
.
$emit
(
'
bv::show::modal
'
,
'
promote-label-modal
'
);
...
...
app/assets/javascripts/pages/projects/merge_requests/creations/new/compare.js
View file @
c04bd247
...
...
@@ -19,7 +19,7 @@ const updateCommitList = (url, $loadingIndicator, $commitList, params) => {
});
};
export
default
mrNewCompareNode
=>
{
export
default
(
mrNewCompareNode
)
=>
{
const
{
sourceBranchUrl
,
targetBranchUrl
}
=
mrNewCompareNode
.
dataset
;
initTargetProjectDropdown
();
...
...
@@ -44,7 +44,7 @@ export default mrNewCompareNode => {
ref
:
$
(
mrNewCompareNode
).
find
(
"
input[name='merge_request[target_branch]']
"
).
val
(),
},
);
initCompareAutocomplete
(
'
branches
'
,
$dropdown
=>
{
initCompareAutocomplete
(
'
branches
'
,
(
$dropdown
)
=>
{
if
(
$dropdown
.
is
(
'
.js-target-branch
'
))
{
updateTargetBranchCommitList
();
}
else
if
(
$dropdown
.
is
(
'
.js-source-branch
'
))
{
...
...
app/assets/javascripts/pages/projects/new/index.js
View file @
c04bd247
...
...
@@ -10,7 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
import
(
/* webpackChunkName: 'experiment_new_project_creation' */
'
../../../projects/experiment_new_project_creation
'
)
.
then
(
m
=>
{
.
then
(
(
m
)
=>
{
const
el
=
document
.
querySelector
(
'
.js-experiment-new-project-creation
'
);
if
(
!
el
)
{
...
...
app/assets/javascripts/pages/projects/pages_domains/form.js
View file @
c04bd247
import
setupToggleButtons
from
'
~/toggle_buttons
'
;
function
updateVisibility
(
selector
,
isVisible
)
{
Array
.
from
(
document
.
querySelectorAll
(
selector
)).
forEach
(
el
=>
{
Array
.
from
(
document
.
querySelectorAll
(
selector
)).
forEach
(
(
el
)
=>
{
if
(
isVisible
)
{
el
.
classList
.
remove
(
'
d-none
'
);
}
else
{
...
...
@@ -14,12 +14,12 @@ export default () => {
const
toggleContainer
=
document
.
querySelector
(
'
.js-auto-ssl-toggle-container
'
);
if
(
toggleContainer
)
{
const
onToggleButtonClicked
=
isAutoSslEnabled
=>
{
const
onToggleButtonClicked
=
(
isAutoSslEnabled
)
=>
{
updateVisibility
(
'
.js-shown-unless-auto-ssl
'
,
!
isAutoSslEnabled
);
updateVisibility
(
'
.js-shown-if-auto-ssl
'
,
isAutoSslEnabled
);
Array
.
from
(
document
.
querySelectorAll
(
'
.js-enabled-unless-auto-ssl
'
)).
forEach
(
el
=>
{
Array
.
from
(
document
.
querySelectorAll
(
'
.js-enabled-unless-auto-ssl
'
)).
forEach
(
(
el
)
=>
{
if
(
isAutoSslEnabled
)
{
el
.
setAttribute
(
'
disabled
'
,
'
disabled
'
);
}
else
{
...
...
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/target_branch_dropdown.js
View file @
c04bd247
...
...
@@ -15,19 +15,19 @@ export default class TargetBranchDropdown {
data
:
this
.
formatBranchesList
(),
filterable
:
true
,
selectable
:
true
,
toggleLabel
:
item
=>
item
.
name
,
toggleLabel
:
(
item
)
=>
item
.
name
,
search
:
{
fields
:
[
'
name
'
],
},
clicked
:
cfg
=>
this
.
updateInputValue
(
cfg
),
text
:
item
=>
item
.
name
,
clicked
:
(
cfg
)
=>
this
.
updateInputValue
(
cfg
),
text
:
(
item
)
=>
item
.
name
,
});
this
.
setDropdownToggle
();
}
formatBranchesList
()
{
return
this
.
$dropdown
.
data
(
'
data
'
).
map
(
val
=>
({
name
:
val
}));
return
this
.
$dropdown
.
data
(
'
data
'
).
map
(
(
val
)
=>
({
name
:
val
}));
}
setDropdownToggle
()
{
...
...
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js
View file @
c04bd247
...
...
@@ -5,10 +5,10 @@ const defaults = {
$inputEl
:
null
,
$dropdownEl
:
null
,
onSelectTimezone
:
null
,
displayFormat
:
item
=>
item
.
name
,
displayFormat
:
(
item
)
=>
item
.
name
,
};
export
const
formatUtcOffset
=
offset
=>
{
export
const
formatUtcOffset
=
(
offset
)
=>
{
const
parsed
=
parseInt
(
offset
,
10
);
if
(
Number
.
isNaN
(
parsed
)
||
parsed
===
0
)
{
return
`0`
;
...
...
@@ -17,11 +17,11 @@ export const formatUtcOffset = offset => {
return
`
${
prefix
}
${
Math
.
abs
(
offset
/
3600
)}
`
;
};
export
const
formatTimezone
=
item
=>
`[UTC
${
formatUtcOffset
(
item
.
offset
)}
]
${
item
.
name
}
`
;
export
const
formatTimezone
=
(
item
)
=>
`[UTC
${
formatUtcOffset
(
item
.
offset
)}
]
${
item
.
name
}
`
;
export
const
findTimezoneByIdentifier
=
(
tzList
=
[],
identifier
=
null
)
=>
{
if
(
tzList
&&
tzList
.
length
&&
identifier
&&
identifier
.
length
)
{
return
tzList
.
find
(
tz
=>
tz
.
identifier
===
identifier
)
||
null
;
return
tzList
.
find
(
(
tz
)
=>
tz
.
identifier
===
identifier
)
||
null
;
}
return
null
;
};
...
...
@@ -52,8 +52,8 @@ export default class TimezoneDropdown {
search
:
{
fields
:
[
'
name
'
],
},
clicked
:
cfg
=>
this
.
updateInputValue
(
cfg
),
text
:
item
=>
formatTimezone
(
item
),
clicked
:
(
cfg
)
=>
this
.
updateInputValue
(
cfg
),
text
:
(
item
)
=>
formatTimezone
(
item
),
});
this
.
setDropdownToggle
(
this
.
displayFormat
(
this
.
initialTimezone
));
...
...
app/assets/javascripts/pages/projects/pipelines/init_pipelines.js
View file @
c04bd247
...
...
@@ -6,7 +6,7 @@ export default () => {
const
fullMergeRequestList
=
document
.
querySelector
(
'
.js-full-mr-list
'
);
if
(
mergeRequestListToggle
)
{
mergeRequestListToggle
.
addEventListener
(
'
click
'
,
e
=>
{
mergeRequestListToggle
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
truncatedMergeRequestList
.
classList
.
toggle
(
'
hide
'
);
fullMergeRequestList
.
classList
.
toggle
(
'
hide
'
);
...
...
app/assets/javascripts/pages/projects/project.js
View file @
c04bd247
...
...
@@ -46,7 +46,7 @@ export default class Project {
static
projectSelectDropdown
()
{
projectSelect
();
$
(
'
.project-item-select
'
).
on
(
'
click
'
,
e
=>
Project
.
changeProject
(
$
(
e
.
currentTarget
).
val
()));
$
(
'
.project-item-select
'
).
on
(
'
click
'
,
(
e
)
=>
Project
.
changeProject
(
$
(
e
.
currentTarget
).
val
()));
}
static
changeProject
(
url
)
{
...
...
@@ -124,7 +124,7 @@ export default class Project {
if
(
loc
.
includes
(
'
/-/
'
))
{
const
refs
=
this
.
fullData
.
Branches
.
concat
(
this
.
fullData
.
Tags
);
const
currentRef
=
refs
.
find
(
ref
=>
loc
.
indexOf
(
ref
)
>
-
1
);
const
currentRef
=
refs
.
find
(
(
ref
)
=>
loc
.
indexOf
(
ref
)
>
-
1
);
if
(
currentRef
)
{
const
targetPath
=
loc
.
split
(
currentRef
)[
1
].
slice
(
1
);
selectedUrl
.
searchParams
.
set
(
'
path
'
,
targetPath
);
...
...
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
View file @
c04bd247
...
...
@@ -23,7 +23,7 @@ document.addEventListener('DOMContentLoaded', () => {
// hide extra auto devops settings based checkbox state
const
autoDevOpsExtraSettings
=
document
.
querySelector
(
'
.js-extra-settings
'
);
const
instanceDefaultBadge
=
document
.
querySelector
(
'
.js-instance-default-badge
'
);
document
.
querySelector
(
'
.js-toggle-extra-settings
'
).
addEventListener
(
'
click
'
,
event
=>
{
document
.
querySelector
(
'
.js-toggle-extra-settings
'
).
addEventListener
(
'
click
'
,
(
event
)
=>
{
const
{
target
}
=
event
;
if
(
instanceDefaultBadge
)
instanceDefaultBadge
.
style
.
display
=
'
none
'
;
autoDevOpsExtraSettings
.
classList
.
toggle
(
'
hidden
'
,
!
target
.
checked
);
...
...
app/assets/javascripts/pages/projects/shared/permissions/external.js
View file @
c04bd247
...
...
@@ -14,5 +14,5 @@ export function toggleHiddenClassBySelector(selector, hidden) {
if
(
!
selectorCache
[
selector
])
{
selectorCache
[
selector
]
=
document
.
querySelectorAll
(
selector
);
}
selectorCache
[
selector
].
forEach
(
elm
=>
toggleHiddenClass
(
elm
,
hidden
));
selectorCache
[
selector
].
forEach
(
(
elm
)
=>
toggleHiddenClass
(
elm
,
hidden
));
}
app/assets/javascripts/pages/projects/shared/permissions/index.js
View file @
c04bd247
...
...
@@ -8,6 +8,6 @@ export default function initProjectPermissionsSettings() {
return
new
Vue
({
el
:
mountPoint
,
render
:
createElement
=>
createElement
(
settingsPanel
,
{
props
:
{
...
componentProps
}
}),
render
:
(
createElement
)
=>
createElement
(
settingsPanel
,
{
props
:
{
...
componentProps
}
}),
});
}
app/assets/javascripts/pages/projects/tags/index/index.js
View file @
c04bd247
...
...
@@ -2,7 +2,7 @@ import { initRemoveTag } from '../remove_tag';
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initRemoveTag
({
onDelete
:
path
=>
{
onDelete
:
(
path
)
=>
{
document
.
querySelector
(
`[data-path="
${
path
}
"]`
).
closest
(
'
.js-tag-list
'
).
remove
();
},
});
...
...
app/assets/javascripts/pages/search/show/refresh_counts.js
View file @
c04bd247
...
...
@@ -11,7 +11,7 @@ function refreshCount(el) {
return
axios
.
get
(
url
)
.
then
(({
data
})
=>
showCount
(
el
,
data
.
count
))
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
// eslint-disable-next-line no-console
console
.
error
(
`Failed to fetch search count from '
${
url
}
'.`
,
e
);
});
...
...
app/assets/javascripts/pages/sessions/new/length_validator.js
View file @
c04bd247
...
...
@@ -9,7 +9,7 @@ export default class LengthValidator extends InputValidator {
const
container
=
opts
.
container
||
''
;
const
validateLengthElements
=
document
.
querySelectorAll
(
`
${
container
}
.js-validate-length`
);
validateLengthElements
.
forEach
(
element
=>
validateLengthElements
.
forEach
(
(
element
)
=>
element
.
addEventListener
(
'
input
'
,
this
.
eventHandler
.
bind
(
this
)),
);
}
...
...
app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js
View file @
c04bd247
...
...
@@ -13,7 +13,7 @@ export default function preserveUrlFragment(fragment = '') {
// Append the fragment to all sign-in/sign-up form actions so it is preserved when the user is
// eventually redirected back to the originally requested URL.
const
forms
=
document
.
querySelectorAll
(
'
#signin-container .tab-content form
'
);
Array
.
prototype
.
forEach
.
call
(
forms
,
form
=>
{
Array
.
prototype
.
forEach
.
call
(
forms
,
(
form
)
=>
{
const
actionWithFragment
=
setUrlFragment
(
form
.
getAttribute
(
'
action
'
),
`#
${
normalFragment
}
`
);
form
.
setAttribute
(
'
action
'
,
actionWithFragment
);
});
...
...
@@ -21,7 +21,7 @@ export default function preserveUrlFragment(fragment = '') {
// Append a redirect_fragment query param to all oauth provider links. The redirect_fragment
// query param will be available in the omniauth callback upon successful authentication
const
oauthForms
=
document
.
querySelectorAll
(
'
#signin-container .omniauth-container form
'
);
Array
.
prototype
.
forEach
.
call
(
oauthForms
,
oauthForm
=>
{
Array
.
prototype
.
forEach
.
call
(
oauthForms
,
(
oauthForm
)
=>
{
const
newHref
=
mergeUrlParams
(
{
redirect_fragment
:
normalFragment
},
oauthForm
.
getAttribute
(
'
action
'
),
...
...
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
View file @
c04bd247
...
...
@@ -20,7 +20,7 @@ export default class SigninTabsMemoizer {
bootstrap
()
{
const
tabs
=
document
.
querySelectorAll
(
this
.
tabSelector
);
if
(
tabs
.
length
>
0
)
{
tabs
[
0
].
addEventListener
(
'
click
'
,
e
=>
{
tabs
[
0
].
addEventListener
(
'
click
'
,
(
e
)
=>
{
if
(
e
.
target
&&
e
.
target
.
nodeName
===
'
A
'
)
{
const
anchorName
=
e
.
target
.
getAttribute
(
'
href
'
);
this
.
saveData
(
anchorName
);
...
...
app/assets/javascripts/pages/sessions/new/username_validator.js
View file @
c04bd247
...
...
@@ -20,11 +20,11 @@ export default class UsernameValidator extends InputValidator {
const
container
=
opts
.
container
||
''
;
const
validateLengthElements
=
document
.
querySelectorAll
(
`
${
container
}
.js-validate-username`
);
this
.
debounceValidateInput
=
debounce
(
inputDomElement
=>
{
this
.
debounceValidateInput
=
debounce
(
(
inputDomElement
)
=>
{
UsernameValidator
.
validateUsernameInput
(
inputDomElement
);
},
debounceTimeoutDuration
);
validateLengthElements
.
forEach
(
element
=>
validateLengthElements
.
forEach
(
(
element
)
=>
element
.
addEventListener
(
'
input
'
,
this
.
eventHandler
.
bind
(
this
)),
);
}
...
...
@@ -42,7 +42,7 @@ export default class UsernameValidator extends InputValidator {
if
(
inputDomElement
.
checkValidity
()
&&
username
.
length
>
1
)
{
UsernameValidator
.
setMessageVisibility
(
inputDomElement
,
pendingMessageSelector
);
UsernameValidator
.
fetchUsernameAvailability
(
username
)
.
then
(
usernameTaken
=>
{
.
then
(
(
usernameTaken
)
=>
{
UsernameValidator
.
setInputState
(
inputDomElement
,
!
usernameTaken
);
UsernameValidator
.
setMessageVisibility
(
inputDomElement
,
pendingMessageSelector
,
false
);
UsernameValidator
.
setMessageVisibility
(
...
...
app/assets/javascripts/pages/shared/mount_badge_settings.js
View file @
c04bd247
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
BadgeSettings
from
'
~/badges/components/badge_settings.vue
'
;
import
store
from
'
~/badges/store
'
;
export
default
kind
=>
{
export
default
(
kind
)
=>
{
const
badgeSettingsElement
=
document
.
getElementById
(
'
badge-settings
'
);
store
.
dispatch
(
'
loadBadges
'
,
{
...
...
app/assets/javascripts/pages/shared/wikis/wikis.js
View file @
c04bd247
...
...
@@ -20,7 +20,7 @@ export default class Wikis {
const
sidebarToggles
=
document
.
querySelectorAll
(
'
.js-sidebar-wiki-toggle
'
);
for
(
let
i
=
0
;
i
<
sidebarToggles
.
length
;
i
+=
1
)
{
sidebarToggles
[
i
].
addEventListener
(
'
click
'
,
e
=>
this
.
handleToggleSidebar
(
e
));
sidebarToggles
[
i
].
addEventListener
(
'
click
'
,
(
e
)
=>
this
.
handleToggleSidebar
(
e
));
}
this
.
isNewWikiPage
=
Boolean
(
document
.
querySelector
(
'
.js-new-wiki-page
'
));
...
...
@@ -35,7 +35,7 @@ export default class Wikis {
if
(
this
.
editTitleInput
.
value
)
this
.
setWikiCommitMessage
(
this
.
editTitleInput
.
value
);
// Set the commit message as the page title is changed
this
.
editTitleInput
.
addEventListener
(
'
keyup
'
,
e
=>
this
.
handleWikiTitleChange
(
e
));
this
.
editTitleInput
.
addEventListener
(
'
keyup
'
,
(
e
)
=>
this
.
handleWikiTitleChange
(
e
));
}
window
.
addEventListener
(
'
resize
'
,
()
=>
this
.
renderSidebar
());
...
...
@@ -45,7 +45,7 @@ export default class Wikis {
const
linkExample
=
document
.
querySelector
(
'
.js-markup-link-example
'
);
if
(
changeFormatSelect
)
{
changeFormatSelect
.
addEventListener
(
'
change
'
,
e
=>
{
changeFormatSelect
.
addEventListener
(
'
change
'
,
(
e
)
=>
{
linkExample
.
innerHTML
=
MARKDOWN_LINK_TEXT
[
e
.
target
.
value
];
});
}
...
...
@@ -121,6 +121,6 @@ export default class Wikis {
static
showToasts
()
{
const
toasts
=
document
.
querySelectorAll
(
'
.js-toast-message
'
);
toasts
.
forEach
(
toast
=>
showToast
(
toast
.
dataset
.
message
));
toasts
.
forEach
(
(
toast
)
=>
showToast
(
toast
.
dataset
.
message
));
}
}
app/assets/javascripts/pages/users/activity_calendar.js
View file @
c04bd247
...
...
@@ -173,17 +173,17 @@ export default class ActivityCalendar {
return
`translate(
${
this
.
daySizeWithSpace
*
i
+
1
+
this
.
daySizeWithSpace
}
, 18)`
;
})
.
selectAll
(
'
rect
'
)
.
data
(
stamp
=>
stamp
)
.
data
(
(
stamp
)
=>
stamp
)
.
enter
()
.
append
(
'
rect
'
)
.
attr
(
'
x
'
,
'
0
'
)
.
attr
(
'
y
'
,
stamp
=>
this
.
dayYPos
(
stamp
.
day
))
.
attr
(
'
y
'
,
(
stamp
)
=>
this
.
dayYPos
(
stamp
.
day
))
.
attr
(
'
width
'
,
this
.
daySize
)
.
attr
(
'
height
'
,
this
.
daySize
)
.
attr
(
'
fill
'
,
stamp
=>
.
attr
(
'
fill
'
,
(
stamp
)
=>
stamp
.
count
!==
0
?
this
.
color
(
Math
.
min
(
stamp
.
count
,
40
))
:
'
#ededed
'
,
)
.
attr
(
'
title
'
,
stamp
=>
formatTooltipText
(
stamp
))
.
attr
(
'
title
'
,
(
stamp
)
=>
formatTooltipText
(
stamp
))
.
attr
(
'
class
'
,
'
user-contrib-cell has-tooltip
'
)
.
attr
(
'
data-html
'
,
true
)
.
attr
(
'
data-container
'
,
'
body
'
)
...
...
@@ -226,8 +226,8 @@ export default class ActivityCalendar {
.
append
(
'
text
'
)
.
attr
(
'
text-anchor
'
,
'
middle
'
)
.
attr
(
'
x
'
,
8
)
.
attr
(
'
y
'
,
day
=>
day
.
y
)
.
text
(
day
=>
day
.
text
)
.
attr
(
'
y
'
,
(
day
)
=>
day
.
y
)
.
text
(
(
day
)
=>
day
.
text
)
.
attr
(
'
class
'
,
'
user-contrib-text
'
);
}
...
...
@@ -239,10 +239,10 @@ export default class ActivityCalendar {
.
data
(
this
.
months
)
.
enter
()
.
append
(
'
text
'
)
.
attr
(
'
x
'
,
date
=>
date
.
x
)
.
attr
(
'
x
'
,
(
date
)
=>
date
.
x
)
.
attr
(
'
y
'
,
10
)
.
attr
(
'
class
'
,
'
user-contrib-text
'
)
.
text
(
date
=>
this
.
monthNames
[
date
.
month
]);
.
text
(
(
date
)
=>
this
.
monthNames
[
date
.
month
]);
}
renderKey
()
{
...
...
@@ -272,7 +272,7 @@ export default class ActivityCalendar {
.
attr
(
'
height
'
,
this
.
daySize
)
.
attr
(
'
x
'
,
(
color
,
i
)
=>
this
.
daySizeWithSpace
*
i
)
.
attr
(
'
y
'
,
0
)
.
attr
(
'
fill
'
,
color
=>
color
)
.
attr
(
'
fill
'
,
(
color
)
=>
color
)
.
attr
(
'
class
'
,
'
has-tooltip
'
)
.
attr
(
'
title
'
,
(
color
,
i
)
=>
keyValues
[
i
])
.
attr
(
'
data-container
'
,
'
body
'
)
...
...
app/assets/javascripts/pages/users/index.js
View file @
c04bd247
...
...
@@ -8,7 +8,7 @@ function initUserProfile(action) {
new
UserTabs
({
parentEl
:
'
.user-profile
'
,
action
});
// hide project limit message
$
(
'
.hide-project-limit-message
'
).
on
(
'
click
'
,
e
=>
{
$
(
'
.hide-project-limit-message
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
Cookies
.
set
(
'
hide_project_limit_message
'
,
'
false
'
);
$
(
this
).
parents
(
'
.project-limit-message
'
).
remove
();
...
...
app/assets/javascripts/pdf/index.vue
View file @
c04bd247
...
...
@@ -40,11 +40,11 @@ export default {
cMapPacked
:
true
,
})
.
promise
.
then
(
this
.
renderPages
)
.
then
(
pages
=>
{
.
then
(
(
pages
)
=>
{
this
.
pages
=
pages
;
this
.
$emit
(
'
pdflabload
'
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
$emit
(
'
pdflaberror
'
,
error
);
});
},
...
...
app/assets/javascripts/pdf/page/index.vue
View file @
c04bd247
...
...
@@ -39,7 +39,7 @@ export default {
.
promise
.
then
(()
=>
{
this
.
rendering
=
false
;
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
$emit
(
'
pdflaberror
'
,
error
);
});
},
...
...
app/assets/javascripts/performance/utils.js
View file @
c04bd247
...
...
@@ -3,7 +3,7 @@ export const performanceMarkAndMeasure = ({ mark, measures = [] } = {}) => {
if
(
mark
&&
!
performance
.
getEntriesByName
(
mark
).
length
)
{
performance
.
mark
(
mark
);
}
measures
.
forEach
(
measure
=>
{
measures
.
forEach
(
(
measure
)
=>
{
performance
.
measure
(
measure
.
name
,
measure
.
start
,
measure
.
end
);
});
});
...
...
app/assets/javascripts/performance_bar/components/detailed_metric.vue
View file @
c04bd247
...
...
@@ -76,12 +76,12 @@ export default {
this
.
openedBacktraces
=
[...
this
.
openedBacktraces
,
toggledIndex
];
}
else
{
this
.
openedBacktraces
=
this
.
openedBacktraces
.
filter
(
openedIndex
=>
openedIndex
!==
toggledIndex
,
(
openedIndex
)
=>
openedIndex
!==
toggledIndex
,
);
}
},
itemHasOpenedBacktrace
(
toggledIndex
)
{
return
this
.
openedBacktraces
.
find
(
openedIndex
=>
openedIndex
===
toggledIndex
)
>=
0
;
return
this
.
openedBacktraces
.
find
(
(
openedIndex
)
=>
openedIndex
===
toggledIndex
)
>=
0
;
},
},
};
...
...
app/assets/javascripts/performance_bar/components/request_selector.vue
View file @
c04bd247
...
...
@@ -25,7 +25,7 @@ export default {
},
computed
:
{
requestsWithWarnings
()
{
return
this
.
requests
.
filter
(
request
=>
request
.
hasWarnings
);
return
this
.
requests
.
filter
(
(
request
)
=>
request
.
hasWarnings
);
},
warningMessage
()
{
return
n__
(
...
...
app/assets/javascripts/performance_bar/index.js
View file @
c04bd247
...
...
@@ -10,7 +10,7 @@ import initPerformanceBarLog from './performance_bar_log';
Vue
.
use
(
Translate
);
const
initPerformanceBar
=
el
=>
{
const
initPerformanceBar
=
(
el
)
=>
{
const
performanceBarData
=
el
.
dataset
;
return
new
Vue
({
...
...
@@ -55,7 +55,7 @@ const initPerformanceBar = el => {
this
.
store
.
addRequest
(
requestId
,
requestUrl
);
PerformanceBarService
.
fetchRequestDetails
(
this
.
peekUrl
,
requestId
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
store
.
addRequestDetails
(
requestId
,
res
.
data
);
if
(
this
.
requestId
===
requestId
)
this
.
collectFrontendPerformanceMetrics
();
...
...
@@ -84,7 +84,7 @@ const initPerformanceBar = el => {
if
(
'
PerformanceObserver
'
in
window
)
{
// We start observing for more incoming timings
const
observer
=
new
PerformanceObserver
(
list
=>
{
const
observer
=
new
PerformanceObserver
(
(
list
)
=>
{
newEntries
=
newEntries
.
concat
(
list
.
getEntries
().
map
(
this
.
transformResourceEntry
));
this
.
updateFrontendPerformanceMetrics
(
durationString
,
newEntries
);
});
...
...
app/assets/javascripts/performance_bar/performance_bar_log.js
View file @
c04bd247
...
...
@@ -3,7 +3,7 @@ import { getCLS, getFID, getLCP } from 'web-vitals';
import
{
PERFORMANCE_TYPE_MARK
,
PERFORMANCE_TYPE_MEASURE
}
from
'
~/performance/constants
'
;
const
initVitalsLog
=
()
=>
{
const
reportVital
=
data
=>
{
const
reportVital
=
(
data
)
=>
{
console
.
log
(
`
${
String
.
fromCodePoint
(
0x1f4c8
)}
${
data
.
name
}
: `
,
data
);
};
...
...
@@ -18,9 +18,9 @@ const initVitalsLog = () => {
};
const
logUserTimingMetrics
=
()
=>
{
const
metricsProcessor
=
list
=>
{
const
metricsProcessor
=
(
list
)
=>
{
const
entries
=
list
.
getEntries
();
entries
.
forEach
(
entry
=>
{
entries
.
forEach
(
(
entry
)
=>
{
const
{
name
,
entryType
,
startTime
,
duration
}
=
entry
;
const
typeMapper
=
{
[
PERFORMANCE_TYPE_MARK
]:
String
.
fromCodePoint
(
0x1f3af
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment