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
0e6e345f
Commit
0e6e345f
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 19 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
dc6c2412
Changes
32
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
96 additions
and
129 deletions
+96
-129
.prettierignore
.prettierignore
+0
-33
app/assets/javascripts/lib/utils/unit_format/formatter_factory.js
...ts/javascripts/lib/utils/unit_format/formatter_factory.js
+2
-2
app/assets/javascripts/lib/utils/url_utility.js
app/assets/javascripts/lib/utils/url_utility.js
+8
-8
app/assets/javascripts/line_highlighter.js
app/assets/javascripts/line_highlighter.js
+1
-1
app/assets/javascripts/locale/ensure_single_line.js
app/assets/javascripts/locale/ensure_single_line.js
+1
-1
app/assets/javascripts/locale/index.js
app/assets/javascripts/locale/index.js
+2
-2
app/assets/javascripts/locale/sprintf.js
app/assets/javascripts/locale/sprintf.js
+1
-1
app/assets/javascripts/logs/components/log_advanced_filters.vue
...sets/javascripts/logs/components/log_advanced_filters.vue
+1
-1
app/assets/javascripts/logs/logs_tracking_helper.js
app/assets/javascripts/logs/logs_tracking_helper.js
+1
-1
app/assets/javascripts/logs/stores/actions.js
app/assets/javascripts/logs/stores/actions.js
+4
-4
app/assets/javascripts/logs/stores/getters.js
app/assets/javascripts/logs/stores/getters.js
+2
-2
app/assets/javascripts/logs/utils.js
app/assets/javascripts/logs/utils.js
+1
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+1
-1
app/assets/javascripts/manual_ordering.js
app/assets/javascripts/manual_ordering.js
+1
-1
app/assets/javascripts/member_expiration_date.js
app/assets/javascripts/member_expiration_date.js
+2
-2
app/assets/javascripts/members.js
app/assets/javascripts/members.js
+1
-1
app/assets/javascripts/members/components/avatars/user_avatar.vue
...ts/javascripts/members/components/avatars/user_avatar.vue
+1
-1
app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue
...rs/components/filter_sort/members_filtered_search_bar.vue
+3
-3
app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue
...ascripts/members/components/filter_sort/sort_dropdown.vue
+12
-12
app/assets/javascripts/members/store/index.js
app/assets/javascripts/members/store/index.js
+1
-1
app/assets/javascripts/members/utils.js
app/assets/javascripts/members/utils.js
+6
-6
app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
...avascripts/merge_conflicts/components/diff_file_editor.js
+1
-1
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
...ripts/merge_conflicts/components/inline_conflict_lines.js
+1
-1
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
...pts/merge_conflicts/components/parallel_conflict_lines.js
+1
-1
app/assets/javascripts/merge_conflicts/merge_conflict_store.js
...ssets/javascripts/merge_conflicts/merge_conflict_store.js
+14
-14
app/assets/javascripts/merge_request.js
app/assets/javascripts/merge_request.js
+6
-6
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+3
-3
app/assets/javascripts/milestone.js
app/assets/javascripts/milestone.js
+1
-1
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+7
-7
app/assets/javascripts/milestones/components/milestone_combobox.vue
.../javascripts/milestones/components/milestone_combobox.vue
+1
-1
app/assets/javascripts/milestones/stores/actions.js
app/assets/javascripts/milestones/stores/actions.js
+8
-8
app/assets/javascripts/milestones/stores/mutations.js
app/assets/javascripts/milestones/stores/mutations.js
+1
-1
No files found.
.prettierignore
View file @
0e6e345f
...
...
@@ -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
## zen-robinson
app/assets/javascripts/lib/utils/unit_format/formatter_factory.js
app/assets/javascripts/lib/utils/url_utility.js
app/assets/javascripts/line_highlighter.js
app/assets/javascripts/locale/ensure_single_line.js
app/assets/javascripts/locale/index.js
app/assets/javascripts/locale/sprintf.js
app/assets/javascripts/logs/components/log_advanced_filters.vue
app/assets/javascripts/logs/logs_tracking_helper.js
app/assets/javascripts/logs/stores/actions.js
app/assets/javascripts/logs/stores/getters.js
app/assets/javascripts/logs/utils.js
app/assets/javascripts/main.js
app/assets/javascripts/manual_ordering.js
app/assets/javascripts/member_expiration_date.js
app/assets/javascripts/members.js
app/assets/javascripts/members/components/avatars/user_avatar.vue
app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue
app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue
app/assets/javascripts/members/store/index.js
app/assets/javascripts/members/utils.js
app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
app/assets/javascripts/merge_conflicts/merge_conflict_store.js
app/assets/javascripts/merge_request.js
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/milestone.js
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestones/components/milestone_combobox.vue
app/assets/javascripts/milestones/stores/actions.js
app/assets/javascripts/milestones/stores/mutations.js
## inspiring-lovelace
app/assets/javascripts/mini_pipeline_graph_dropdown.js
app/assets/javascripts/mirrors/mirror_repos.js
...
...
app/assets/javascripts/lib/utils/unit_format/formatter_factory.js
View file @
0e6e345f
...
...
@@ -106,7 +106,7 @@ export const scaledSIFormatter = (unit = '', prefixOffset = 0) => {
const
multiplicative
=
[
'
k
'
,
'
M
'
,
'
G
'
,
'
T
'
,
'
P
'
,
'
E
'
,
'
Z
'
,
'
Y
'
];
const
symbols
=
[...
fractional
,
''
,
...
multiplicative
];
const
units
=
symbols
.
slice
(
fractional
.
length
+
prefixOffset
).
map
(
prefix
=>
{
const
units
=
symbols
.
slice
(
fractional
.
length
+
prefixOffset
).
map
(
(
prefix
)
=>
{
return
`
${
prefix
}${
unit
}
`
;
});
...
...
@@ -126,7 +126,7 @@ export const scaledBinaryFormatter = (unit = '', prefixOffset = 0) => {
const
multiplicative
=
[
'
Ki
'
,
'
Mi
'
,
'
Gi
'
,
'
Ti
'
,
'
Pi
'
,
'
Ei
'
,
'
Zi
'
,
'
Yi
'
];
const
symbols
=
[
''
,
...
multiplicative
];
const
units
=
symbols
.
slice
(
prefixOffset
).
map
(
prefix
=>
{
const
units
=
symbols
.
slice
(
prefixOffset
).
map
(
(
prefix
)
=>
{
return
`
${
prefix
}${
unit
}
`
;
});
...
...
app/assets/javascripts/lib/utils/url_utility.js
View file @
0e6e345f
...
...
@@ -112,13 +112,13 @@ export function mergeUrlParams(params, url, options = {}) {
const
mergedKeys
=
sort
?
Object
.
keys
(
merged
).
sort
()
:
Object
.
keys
(
merged
);
const
newQuery
=
mergedKeys
.
filter
(
key
=>
merged
[
key
]
!==
null
)
.
map
(
key
=>
{
.
filter
(
(
key
)
=>
merged
[
key
]
!==
null
)
.
map
(
(
key
)
=>
{
let
value
=
merged
[
key
];
const
encodedKey
=
encodeURIComponent
(
key
);
if
(
spreadArrays
&&
Array
.
isArray
(
value
))
{
value
=
merged
[
key
]
.
map
(
arrayValue
=>
encodeURIComponent
(
arrayValue
))
.
map
(
(
arrayValue
)
=>
encodeURIComponent
(
arrayValue
))
.
join
(
`&
${
encodedKey
}
[]=`
);
return
`
${
encodedKey
}
[]=
${
value
}
`
;
}
...
...
@@ -150,11 +150,11 @@ export function removeParams(params, url = window.location.href, skipEncoding =
return
url
;
}
const
removableParams
=
skipEncoding
?
params
:
params
.
map
(
param
=>
encodeURIComponent
(
param
));
const
removableParams
=
skipEncoding
?
params
:
params
.
map
(
(
param
)
=>
encodeURIComponent
(
param
));
const
updatedQuery
=
query
.
split
(
'
&
'
)
.
filter
(
paramPair
=>
{
.
filter
(
(
paramPair
)
=>
{
const
[
foundParam
]
=
paramPair
.
split
(
'
=
'
);
return
removableParams
.
indexOf
(
foundParam
)
<
0
;
})
...
...
@@ -237,7 +237,7 @@ export function redirectTo(url) {
return
window
.
location
.
assign
(
url
);
}
export
const
escapeFileUrl
=
fileUrl
=>
encodeURIComponent
(
fileUrl
).
replace
(
/%2F/g
,
'
/
'
);
export
const
escapeFileUrl
=
(
fileUrl
)
=>
encodeURIComponent
(
fileUrl
).
replace
(
/%2F/g
,
'
/
'
);
export
function
webIDEUrl
(
route
=
undefined
)
{
let
returnUrl
=
`
${
gon
.
relative_url_root
||
''
}
/-/ide/`
;
...
...
@@ -396,7 +396,7 @@ export function queryToObject(query, options = {}) {
*/
export
function
objectToQuery
(
obj
)
{
return
Object
.
keys
(
obj
)
.
map
(
k
=>
`
${
encodeURIComponent
(
k
)}
=
${
encodeURIComponent
(
obj
[
k
])}
`
)
.
map
(
(
k
)
=>
`
${
encodeURIComponent
(
k
)}
=
${
encodeURIComponent
(
obj
[
k
])}
`
)
.
join
(
'
&
'
);
}
...
...
@@ -420,7 +420,7 @@ export const setUrlParams = (
const
queryString
=
urlObj
.
search
;
const
searchParams
=
clearParams
?
new
URLSearchParams
(
''
)
:
new
URLSearchParams
(
queryString
);
Object
.
keys
(
params
).
forEach
(
key
=>
{
Object
.
keys
(
params
).
forEach
(
(
key
)
=>
{
if
(
params
[
key
]
===
null
||
params
[
key
]
===
undefined
)
{
searchParams
.
delete
(
key
);
}
else
if
(
Array
.
isArray
(
params
[
key
]))
{
...
...
app/assets/javascripts/line_highlighter.js
View file @
0e6e345f
...
...
@@ -55,7 +55,7 @@ LineHighlighter.prototype.bindEvents = function () {
$fileHolder
.
on
(
'
click
'
,
'
a[data-line-number]
'
,
this
.
clickHandler
);
$fileHolder
.
on
(
'
highlight:line
'
,
this
.
highlightHash
);
window
.
addEventListener
(
'
hashchange
'
,
e
=>
this
.
highlightHash
(
e
.
target
.
location
.
hash
));
window
.
addEventListener
(
'
hashchange
'
,
(
e
)
=>
this
.
highlightHash
(
e
.
target
.
location
.
hash
));
};
LineHighlighter
.
prototype
.
highlightHash
=
function
(
newHash
)
{
...
...
app/assets/javascripts/locale/ensure_single_line.js
View file @
0e6e345f
...
...
@@ -18,7 +18,7 @@ module.exports = function ensureSingleLine(str) {
if
(
str
.
includes
(
'
\n
'
)
||
str
.
includes
(
'
\r
'
))
{
return
str
.
split
(
SPLIT_REGEX
)
.
filter
(
s
=>
s
!==
''
)
.
filter
(
(
s
)
=>
s
!==
''
)
.
join
(
'
'
);
}
return
str
;
...
...
app/assets/javascripts/locale/index.js
View file @
0e6e345f
...
...
@@ -11,7 +11,7 @@ delete window.translations;
@param text The text to be translated
@returns {String} The translated text
*/
const
gettext
=
text
=>
locale
.
gettext
(
ensureSingleLine
(
text
));
const
gettext
=
(
text
)
=>
locale
.
gettext
(
ensureSingleLine
(
text
));
/**
Translate the text with a number
...
...
@@ -56,7 +56,7 @@ const pgettext = (keyOrContext, key) => {
@param formatOptions for available options, please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
@returns {Intl.DateTimeFormat}
*/
const
createDateTimeFormat
=
formatOptions
=>
Intl
.
DateTimeFormat
(
languageCode
(),
formatOptions
);
const
createDateTimeFormat
=
(
formatOptions
)
=>
Intl
.
DateTimeFormat
(
languageCode
(),
formatOptions
);
export
{
languageCode
};
export
{
gettext
as
__
};
...
...
app/assets/javascripts/locale/sprintf.js
View file @
0e6e345f
...
...
@@ -15,7 +15,7 @@ export default (input, parameters, escapeParameters = true) => {
let
output
=
input
;
if
(
parameters
)
{
Object
.
keys
(
parameters
).
forEach
(
parameterName
=>
{
Object
.
keys
(
parameters
).
forEach
(
(
parameterName
)
=>
{
const
parameterValue
=
parameters
[
parameterName
];
const
escapedParameterValue
=
escapeParameters
?
escape
(
parameterValue
)
:
parameterValue
;
output
=
output
.
replace
(
new
RegExp
(
`%{
${
parameterName
}
}`
,
'
g
'
),
escapedParameterValue
);
...
...
app/assets/javascripts/logs/components/log_advanced_filters.vue
View file @
0e6e345f
...
...
@@ -42,7 +42,7 @@ export default {
*/
podOptions
()
{
if
(
this
.
pods
.
options
.
length
)
{
return
this
.
pods
.
options
.
map
(
podName
=>
({
value
:
podName
,
title
:
podName
}));
return
this
.
pods
.
options
.
map
(
(
podName
)
=>
({
value
:
podName
,
title
:
podName
}));
}
return
null
;
},
...
...
app/assets/javascripts/logs/logs_tracking_helper.js
View file @
0e6e345f
...
...
@@ -8,7 +8,7 @@ import Tracking from '~/tracking';
* 3. Change the time range
* 4. Use the search bar
*/
const
trackLogs
=
label
=>
const
trackLogs
=
(
label
)
=>
Tracking
.
event
(
document
.
body
.
dataset
.
page
,
'
logs_view
'
,
{
label
,
property
:
'
count
'
,
...
...
app/assets/javascripts/logs/stores/actions.js
View file @
0e6e345f
...
...
@@ -11,14 +11,14 @@ const requestUntilData = (url, params) =>
backOff
((
next
,
stop
)
=>
{
axios
.
get
(
url
,
{
params
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
status
===
httpStatusCodes
.
ACCEPTED
)
{
next
();
return
;
}
stop
(
res
);
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
stop
(
err
);
});
});
...
...
@@ -66,12 +66,12 @@ const requestLogsUntilData = ({ commit, state }) => {
const
filtersToParams
=
(
filters
=
[])
=>
{
// Strings become part of the `search`
const
search
=
filters
.
filter
(
f
=>
typeof
f
===
'
string
'
)
.
filter
(
(
f
)
=>
typeof
f
===
'
string
'
)
.
join
(
'
'
)
.
trim
();
// null podName to show all pods
const
podName
=
filters
.
find
(
f
=>
f
?.
type
===
TOKEN_TYPE_POD_NAME
)?.
value
?.
data
??
null
;
const
podName
=
filters
.
find
(
(
f
)
=>
f
?.
type
===
TOKEN_TYPE_POD_NAME
)?.
value
?.
data
??
null
;
return
{
search
,
podName
};
};
...
...
app/assets/javascripts/logs/stores/getters.js
View file @
0e6e345f
...
...
@@ -3,9 +3,9 @@ import { formatDate } from '../utils';
const
mapTrace
=
({
timestamp
=
null
,
pod
=
''
,
message
=
''
})
=>
[
timestamp
?
formatDate
(
timestamp
)
:
''
,
pod
,
message
].
join
(
'
|
'
);
export
const
trace
=
state
=>
state
.
logs
.
lines
.
map
(
mapTrace
).
join
(
'
\n
'
);
export
const
trace
=
(
state
)
=>
state
.
logs
.
lines
.
map
(
mapTrace
).
join
(
'
\n
'
);
export
const
showAdvancedFilters
=
state
=>
{
export
const
showAdvancedFilters
=
(
state
)
=>
{
if
(
state
.
environments
.
current
)
{
const
environment
=
state
.
environments
.
options
.
find
(
({
name
})
=>
name
===
state
.
environments
.
current
,
...
...
app/assets/javascripts/logs/utils.js
View file @
0e6e345f
...
...
@@ -22,4 +22,4 @@ export const getTimeRange = (seconds = 0) => {
};
};
export
const
formatDate
=
timestamp
=>
dateFormat
(
timestamp
,
dateFormatMask
);
export
const
formatDate
=
(
timestamp
)
=>
dateFormat
(
timestamp
,
dateFormatMask
);
app/assets/javascripts/main.js
View file @
0e6e345f
...
...
@@ -298,7 +298,7 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
flashContainer
&&
flashContainer
.
children
.
length
)
{
flashContainer
.
querySelectorAll
(
'
.flash-alert, .flash-notice, .flash-success
'
)
.
forEach
(
flashEl
=>
{
.
forEach
(
(
flashEl
)
=>
{
removeFlashClickListener
(
flashEl
);
});
}
...
...
app/assets/javascripts/manual_ordering.js
View file @
0e6e345f
...
...
@@ -39,7 +39,7 @@ const initManualOrdering = (draggableSelector = 'li.issue') => {
onStart
:
()
=>
{
sortableStart
();
},
onUpdate
:
event
=>
{
onUpdate
:
(
event
)
=>
{
const
el
=
event
.
item
;
const
url
=
el
.
getAttribute
(
'
url
'
)
||
el
.
dataset
.
url
;
...
...
app/assets/javascripts/member_expiration_date.js
View file @
0e6e345f
...
...
@@ -24,8 +24,8 @@ export default function memberExpirationDate(selector = '.js-access-expiration-d
format
:
'
yyyy-mm-dd
'
,
minDate
:
new
Date
(),
container
:
$input
.
parent
().
get
(
0
),
parse
:
dateString
=>
parsePikadayDate
(
dateString
),
toString
:
date
=>
pikadayToString
(
date
),
parse
:
(
dateString
)
=>
parsePikadayDate
(
dateString
),
toString
:
(
date
)
=>
pikadayToString
(
date
),
onSelect
(
dateText
)
{
$input
.
val
(
calendar
.
toString
(
dateText
));
...
...
app/assets/javascripts/members.js
View file @
0e6e345f
...
...
@@ -46,7 +46,7 @@ export default class Members {
return
$el
.
data
(
'
id
'
);
},
toggleLabel
:
(
selected
,
$el
)
=>
this
.
dropdownToggleLabel
(
selected
,
$el
,
$btn
),
clicked
:
options
=>
this
.
dropdownClicked
(
options
),
clicked
:
(
options
)
=>
this
.
dropdownClicked
(
options
),
});
});
}
...
...
app/assets/javascripts/members/components/avatars/user_avatar.vue
View file @
0e6e345f
...
...
@@ -38,7 +38,7 @@ export default {
return
this
.
member
.
user
;
},
badges
()
{
return
generateBadges
(
this
.
member
,
this
.
isCurrentUser
).
filter
(
badge
=>
badge
.
show
);
return
generateBadges
(
this
.
member
,
this
.
isCurrentUser
).
filter
(
(
badge
)
=>
badge
.
show
);
},
statusEmoji
()
{
return
this
.
user
?.
status
?.
emoji
;
...
...
app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue
View file @
0e6e345f
...
...
@@ -45,7 +45,7 @@ export default {
computed
:
{
...
mapState
([
'
sourceId
'
,
'
filteredSearchBar
'
,
'
canManageMembers
'
]),
tokens
()
{
return
this
.
$options
.
availableTokens
.
filter
(
token
=>
{
return
this
.
$options
.
availableTokens
.
filter
(
(
token
)
=>
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
token
,
'
requiredPermissions
'
)
&&
!
this
[
token
.
requiredPermissions
]
...
...
@@ -61,8 +61,8 @@ export default {
const
query
=
queryToObject
(
window
.
location
.
search
);
const
tokens
=
this
.
tokens
.
filter
(
token
=>
query
[
token
.
type
])
.
map
(
token
=>
({
.
filter
(
(
token
)
=>
query
[
token
.
type
])
.
map
(
(
token
)
=>
({
type
:
token
.
type
,
value
:
{
data
:
query
[
token
.
type
],
...
...
app/assets/javascripts/members/components/filter_sort/sort_dropdown.vue
View file @
0e6e345f
...
...
@@ -14,7 +14,7 @@ export default {
return
parseSortParam
(
this
.
tableSortableFields
);
},
activeOption
()
{
return
FIELDS
.
find
(
field
=>
field
.
key
===
this
.
sort
.
sortByKey
);
return
FIELDS
.
find
(
(
field
)
=>
field
.
key
===
this
.
sort
.
sortByKey
);
},
activeOptionLabel
()
{
return
this
.
activeOption
?.
label
;
...
...
@@ -23,8 +23,9 @@ export default {
return
!
this
.
sort
.
sortDesc
;
},
filteredOptions
()
{
return
FIELDS
.
filter
(
field
=>
this
.
tableSortableFields
.
includes
(
field
.
key
)
&&
field
.
sort
).
map
(
field
=>
({
return
FIELDS
.
filter
(
(
field
)
=>
this
.
tableSortableFields
.
includes
(
field
.
key
)
&&
field
.
sort
,
).
map
((
field
)
=>
({
key
:
field
.
key
,
label
:
field
.
label
,
href
:
buildSortHref
({
...
...
@@ -33,8 +34,7 @@ export default {
filteredSearchBarTokens
:
this
.
filteredSearchBar
.
tokens
,
filteredSearchBarSearchParam
:
this
.
filteredSearchBar
.
searchParam
,
}),
}),
);
}));
},
},
methods
:
{
...
...
app/assets/javascripts/members/store/index.js
View file @
0e6e345f
...
...
@@ -2,7 +2,7 @@ import createState from 'ee_else_ce/members/store/state';
import
mutations
from
'
ee_else_ce/members/store/mutations
'
;
import
*
as
actions
from
'
ee_else_ce/members/store/actions
'
;
export
default
initialState
=>
({
export
default
(
initialState
)
=>
({
state
:
createState
(
initialState
),
actions
,
mutations
,
...
...
app/assets/javascripts/members/utils.js
View file @
0e6e345f
...
...
@@ -21,7 +21,7 @@ export const generateBadges = (member, isCurrentUser) => [
},
];
export
const
isGroup
=
member
=>
{
export
const
isGroup
=
(
member
)
=>
{
return
Boolean
(
member
.
sharedWithGroup
);
};
...
...
@@ -37,7 +37,7 @@ export const canRemove = (member, sourceId) => {
return
isDirectMember
(
member
,
sourceId
)
&&
member
.
canRemove
;
};
export
const
canResend
=
member
=>
{
export
const
canResend
=
(
member
)
=>
{
return
Boolean
(
member
.
invite
?.
canResend
);
};
...
...
@@ -47,11 +47,11 @@ export const canUpdate = (member, currentUserId, sourceId) => {
);
};
export
const
parseSortParam
=
sortableFields
=>
{
export
const
parseSortParam
=
(
sortableFields
)
=>
{
const
sortParam
=
getParameterByName
(
'
sort
'
);
const
sortedField
=
FIELDS
.
filter
(
field
=>
sortableFields
.
includes
(
field
.
key
)).
find
(
field
=>
field
.
sort
?.
asc
===
sortParam
||
field
.
sort
?.
desc
===
sortParam
,
const
sortedField
=
FIELDS
.
filter
(
(
field
)
=>
sortableFields
.
includes
(
field
.
key
)).
find
(
(
field
)
=>
field
.
sort
?.
asc
===
sortParam
||
field
.
sort
?.
desc
===
sortParam
,
);
if
(
!
sortedField
)
{
...
...
@@ -70,7 +70,7 @@ export const buildSortHref = ({
filteredSearchBarTokens
,
filteredSearchBarSearchParam
,
})
=>
{
const
sortDefinition
=
FIELDS
.
find
(
field
=>
field
.
key
===
sortBy
)?.
sort
;
const
sortDefinition
=
FIELDS
.
find
(
(
field
)
=>
field
.
key
===
sortBy
)?.
sort
;
if
(
!
sortDefinition
)
{
return
''
;
...
...
app/assets/javascripts/merge_conflicts/components/diff_file_editor.js
View file @
0e6e345f
...
...
@@ -6,7 +6,7 @@ import axios from '~/lib/utils/axios_utils';
import
{
deprecatedCreateFlash
as
flash
}
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
(
global
=>
{
(
(
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
diffFileEditor
=
Vue
.
extend
({
...
...
app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js
View file @
0e6e345f
...
...
@@ -4,7 +4,7 @@ import Vue from 'vue';
import
actionsMixin
from
'
../mixins/line_conflict_actions
'
;
import
utilsMixin
from
'
../mixins/line_conflict_utils
'
;
(
global
=>
{
(
(
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
inlineConflictLines
=
Vue
.
extend
({
...
...
app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js
View file @
0e6e345f
...
...
@@ -4,7 +4,7 @@ import Vue from 'vue';
import
actionsMixin
from
'
../mixins/line_conflict_actions
'
;
import
utilsMixin
from
'
../mixins/line_conflict_utils
'
;
(
global
=>
{
(
(
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
global
.
mergeConflicts
.
parallelConflictLines
=
Vue
.
extend
({
...
...
app/assets/javascripts/merge_conflicts/merge_conflict_store.js
View file @
0e6e345f
...
...
@@ -5,7 +5,7 @@ import Vue from 'vue';
import
Cookies
from
'
js-cookie
'
;
import
{
s__
}
from
'
~/locale
'
;
(
global
=>
{
(
(
global
)
=>
{
global
.
mergeConflicts
=
global
.
mergeConflicts
||
{};
const
diffViewType
=
Cookies
.
get
(
'
diff_view
'
);
...
...
@@ -48,7 +48,7 @@ import { s__ } from '~/locale';
},
decorateFiles
(
files
)
{
files
.
forEach
(
file
=>
{
files
.
forEach
(
(
file
)
=>
{
file
.
content
=
''
;
file
.
resolutionData
=
{};
file
.
promptDiscardConfirmation
=
false
;
...
...
@@ -72,7 +72,7 @@ import { s__ } from '~/locale';
setInlineLine
(
file
)
{
file
.
inlineLines
=
[];
file
.
sections
.
forEach
(
section
=>
{
file
.
sections
.
forEach
(
(
section
)
=>
{
let
currentLineType
=
'
new
'
;
const
{
conflict
,
lines
,
id
}
=
section
;
...
...
@@ -80,7 +80,7 @@ import { s__ } from '~/locale';
file
.
inlineLines
.
push
(
this
.
getHeadHeaderLine
(
id
));
}
lines
.
forEach
(
line
=>
{
lines
.
forEach
(
(
line
)
=>
{
const
{
type
}
=
line
;
if
((
type
===
'
new
'
||
type
===
'
old
'
)
&&
currentLineType
!==
type
)
{
...
...
@@ -102,7 +102,7 @@ import { s__ } from '~/locale';
file
.
parallelLines
=
[];
const
linesObj
=
{
left
:
[],
right
:
[]
};
file
.
sections
.
forEach
(
section
=>
{
file
.
sections
.
forEach
(
(
section
)
=>
{
const
{
conflict
,
lines
,
id
}
=
section
;
if
(
conflict
)
{
...
...
@@ -110,7 +110,7 @@ import { s__ } from '~/locale';
linesObj
.
right
.
push
(
this
.
getHeadHeaderLine
(
id
));
}
lines
.
forEach
(
line
=>
{
lines
.
forEach
(
(
line
)
=>
{
const
{
type
}
=
line
;
if
(
conflict
)
{
...
...
@@ -156,9 +156,9 @@ import { s__ } from '~/locale';
const
{
files
}
=
this
.
state
.
conflictsData
;
let
count
=
0
;
files
.
forEach
(
file
=>
{
files
.
forEach
(
(
file
)
=>
{
if
(
file
.
type
===
CONFLICT_TYPES
.
TEXT
)
{
file
.
sections
.
forEach
(
section
=>
{
file
.
sections
.
forEach
(
(
section
)
=>
{
if
(
section
.
conflict
)
{
count
+=
1
;
}
...
...
@@ -287,14 +287,14 @@ import { s__ } from '~/locale';
},
restoreFileLinesState
(
file
)
{
file
.
inlineLines
.
forEach
(
line
=>
{
file
.
inlineLines
.
forEach
(
(
line
)
=>
{
if
(
line
.
hasConflict
||
line
.
isHeader
)
{
line
.
isSelected
=
false
;
line
.
isUnselected
=
false
;
}
});
file
.
parallelLines
.
forEach
(
lines
=>
{
file
.
parallelLines
.
forEach
(
(
lines
)
=>
{
const
left
=
lines
[
0
];
const
right
=
lines
[
1
];
const
isLeftMatch
=
left
.
hasConflict
||
left
.
isHeader
;
...
...
@@ -362,7 +362,7 @@ import { s__ } from '~/locale';
files
:
[],
};
this
.
state
.
conflictsData
.
files
.
forEach
(
file
=>
{
this
.
state
.
conflictsData
.
files
.
forEach
(
(
file
)
=>
{
const
addFile
=
{
old_path
:
file
.
old_path
,
new_path
:
file
.
new_path
,
...
...
@@ -388,13 +388,13 @@ import { s__ } from '~/locale';
handleSelected
(
file
,
sectionId
,
selection
)
{
Vue
.
set
(
file
.
resolutionData
,
sectionId
,
selection
);
file
.
inlineLines
.
forEach
(
line
=>
{
file
.
inlineLines
.
forEach
(
(
line
)
=>
{
if
(
line
.
id
===
sectionId
&&
(
line
.
hasConflict
||
line
.
isHeader
))
{
this
.
markLine
(
line
,
selection
);
}
});
file
.
parallelLines
.
forEach
(
lines
=>
{
file
.
parallelLines
.
forEach
(
(
lines
)
=>
{
const
left
=
lines
[
0
];
const
right
=
lines
[
1
];
const
hasSameId
=
right
.
id
===
sectionId
||
left
.
id
===
sectionId
;
...
...
@@ -426,7 +426,7 @@ import { s__ } from '~/locale';
},
fileTextTypePresent
()
{
return
this
.
state
.
conflictsData
.
files
.
some
(
f
=>
f
.
type
===
CONFLICT_TYPES
.
TEXT
);
return
this
.
state
.
conflictsData
.
files
.
some
(
(
f
)
=>
f
.
type
===
CONFLICT_TYPES
.
TEXT
);
},
};
})(
window
.
gl
||
(
window
.
gl
=
{}));
app/assets/javascripts/merge_request.js
View file @
0e6e345f
...
...
@@ -31,7 +31,7 @@ function MergeRequest(opts) {
fieldName
:
'
description
'
,
selector
:
'
.detail-page-description
'
,
lockVersion
:
this
.
$el
.
data
(
'
lockVersion
'
),
onSuccess
:
result
=>
{
onSuccess
:
(
result
)
=>
{
document
.
querySelector
(
'
#task_status
'
).
innerText
=
result
.
task_status
;
document
.
querySelector
(
'
#task_status_short
'
).
innerText
=
result
.
task_status_short
;
},
...
...
@@ -69,8 +69,8 @@ MergeRequest.prototype.initMRBtnListeners = function () {
const
draftToggles
=
document
.
querySelectorAll
(
'
.js-draft-toggle-button
'
);
if
(
draftToggles
.
length
)
{
draftToggles
.
forEach
(
draftToggle
=>
{
draftToggle
.
addEventListener
(
'
click
'
,
e
=>
{
draftToggles
.
forEach
(
(
draftToggle
)
=>
{
draftToggle
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
...
...
@@ -127,7 +127,7 @@ MergeRequest.prototype.submitNoteForm = function (form, $button) {
};
MergeRequest
.
prototype
.
initCommitMessageListeners
=
function
()
{
$
(
document
).
on
(
'
click
'
,
'
a.js-with-description-link
'
,
e
=>
{
$
(
document
).
on
(
'
click
'
,
'
a.js-with-description-link
'
,
(
e
)
=>
{
const
textarea
=
$
(
'
textarea.js-commit-message
'
);
e
.
preventDefault
();
...
...
@@ -136,7 +136,7 @@ MergeRequest.prototype.initCommitMessageListeners = function () {
$
(
'
.js-without-description-hint
'
).
show
();
});
$
(
document
).
on
(
'
click
'
,
'
a.js-without-description-link
'
,
e
=>
{
$
(
document
).
on
(
'
click
'
,
'
a.js-without-description-link
'
,
(
e
)
=>
{
const
textarea
=
$
(
'
textarea.js-commit-message
'
);
e
.
preventDefault
();
...
...
@@ -180,7 +180,7 @@ MergeRequest.toggleDraftStatus = function (title, isReady) {
const
draftToggles
=
document
.
querySelectorAll
(
'
.js-draft-toggle-button
'
);
if
(
draftToggles
.
length
)
{
draftToggles
.
forEach
(
el
=>
{
draftToggles
.
forEach
(
(
el
)
=>
{
const
draftToggle
=
el
;
const
url
=
setUrlParams
(
{
'
merge_request[wip_event]
'
:
isReady
?
'
wip
'
:
'
unwip
'
},
...
...
app/assets/javascripts/merge_request_tabs.js
View file @
0e6e345f
...
...
@@ -128,7 +128,7 @@ export default class MergeRequestTabs {
bindEvents
()
{
$
(
'
.merge-request-tabs a[data-toggle="tabvue"]
'
).
on
(
'
click
'
,
this
.
clickTab
);
window
.
addEventListener
(
'
popstate
'
,
event
=>
{
window
.
addEventListener
(
'
popstate
'
,
(
event
)
=>
{
if
(
event
.
state
&&
event
.
state
.
action
)
{
this
.
tabShown
(
event
.
state
.
action
,
event
.
target
.
location
);
this
.
currentAction
=
event
.
state
.
action
;
...
...
@@ -177,14 +177,14 @@ export default class MergeRequestTabs {
this
.
currentTab
=
action
;
if
(
this
.
mergeRequestTabPanesAll
)
{
this
.
mergeRequestTabPanesAll
.
forEach
(
el
=>
{
this
.
mergeRequestTabPanesAll
.
forEach
(
(
el
)
=>
{
const
tabPane
=
el
;
tabPane
.
style
.
display
=
'
none
'
;
});
}
if
(
this
.
mergeRequestTabsAll
)
{
this
.
mergeRequestTabsAll
.
forEach
(
el
=>
{
this
.
mergeRequestTabsAll
.
forEach
(
(
el
)
=>
{
el
.
classList
.
remove
(
'
active
'
);
});
}
...
...
app/assets/javascripts/milestone.js
View file @
0e6e345f
...
...
@@ -11,7 +11,7 @@ export default class Milestone {
}
bindTabsSwitching
()
{
return
$
(
'
a[data-toggle="tab"]
'
).
on
(
'
show.bs.tab
'
,
e
=>
{
return
$
(
'
a[data-toggle="tab"]
'
).
on
(
'
show.bs.tab
'
,
(
e
)
=>
{
const
$target
=
$
(
e
.
target
);
window
.
location
.
hash
=
$target
.
attr
(
'
href
'
);
...
...
app/assets/javascripts/milestone_select.js
View file @
0e6e345f
...
...
@@ -89,7 +89,7 @@ export default class MilestoneSelect {
return
getMilestones
(
contextId
,
reqParams
)
.
then
(({
data
})
=>
data
.
map
(
m
=>
({
.
map
(
(
m
)
=>
({
...
m
,
// Public API includes `title` instead of `name`.
name
:
m
.
title
,
...
...
@@ -105,7 +105,7 @@ export default class MilestoneSelect {
return
0
;
}),
)
.
then
(
data
=>
{
.
then
(
(
data
)
=>
{
const
extraOptions
=
[];
if
(
showAny
)
{
extraOptions
.
push
({
...
...
@@ -146,7 +146,7 @@ export default class MilestoneSelect {
$
(
`[data-milestone-id="
${
selectedMilestone
}
"] > a`
).
addClass
(
'
is-active
'
);
});
},
renderRow
:
milestone
=>
{
renderRow
:
(
milestone
)
=>
{
const
milestoneName
=
milestone
.
title
||
milestone
.
name
;
let
milestoneDisplayName
=
escape
(
milestoneName
);
...
...
@@ -178,8 +178,8 @@ export default class MilestoneSelect {
},
defaultLabel
,
fieldName
:
$dropdown
.
data
(
'
fieldName
'
),
text
:
milestone
=>
escape
(
milestone
.
title
),
id
:
milestone
=>
{
text
:
(
milestone
)
=>
escape
(
milestone
.
title
),
id
:
(
milestone
)
=>
{
if
(
milestone
!==
undefined
)
{
if
(
!
useId
&&
!
$dropdown
.
is
(
'
.js-issuable-form-dropdown
'
))
{
return
milestone
.
name
;
...
...
@@ -193,7 +193,7 @@ export default class MilestoneSelect {
// display:block overrides the hide-collapse rule
return
$value
.
css
(
'
display
'
,
''
);
},
opened
:
e
=>
{
opened
:
(
e
)
=>
{
const
$el
=
$
(
e
.
currentTarget
);
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
)
||
options
.
handleClick
)
{
selectedMilestone
=
$dropdown
[
0
].
dataset
.
selected
||
selectedMilestoneDefault
;
...
...
@@ -202,7 +202,7 @@ export default class MilestoneSelect {
$
(
`[data-milestone-id="
${
selectedMilestone
}
"] > a`
,
$el
).
addClass
(
'
is-active
'
);
},
vue
:
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
),
clicked
:
clickEvent
=>
{
clicked
:
(
clickEvent
)
=>
{
const
{
e
}
=
clickEvent
;
let
selected
=
clickEvent
.
selectedObj
;
...
...
app/assets/javascripts/milestones/components/milestone_combobox.vue
View file @
0e6e345f
...
...
@@ -112,7 +112,7 @@ export default {
value
:
{
immediate
:
true
,
handler
()
{
const
milestoneTitles
=
this
.
value
.
map
(
milestone
=>
const
milestoneTitles
=
this
.
value
.
map
(
(
milestone
)
=>
milestone
.
title
?
milestone
.
title
:
milestone
,
);
if
(
!
isEqual
(
milestoneTitles
,
this
.
selectedMilestones
))
{
...
...
app/assets/javascripts/milestones/stores/actions.js
View file @
0e6e345f
...
...
@@ -41,10 +41,10 @@ export const fetchProjectMilestones = ({ commit, state }) => {
commit
(
types
.
REQUEST_START
);
Api
.
projectMilestones
(
state
.
projectId
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
commit
(
types
.
RECEIVE_PROJECT_MILESTONES_SUCCESS
,
response
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
commit
(
types
.
RECEIVE_PROJECT_MILESTONES_ERROR
,
error
);
})
.
finally
(()
=>
{
...
...
@@ -56,10 +56,10 @@ export const fetchGroupMilestones = ({ commit, state }) => {
commit
(
types
.
REQUEST_START
);
Api
.
groupMilestones
(
state
.
groupId
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
commit
(
types
.
RECEIVE_GROUP_MILESTONES_SUCCESS
,
response
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
commit
(
types
.
RECEIVE_GROUP_MILESTONES_ERROR
,
error
);
})
.
finally
(()
=>
{
...
...
@@ -76,10 +76,10 @@ export const searchProjectMilestones = ({ commit, state }) => {
commit
(
types
.
REQUEST_START
);
Api
.
projectSearch
(
state
.
projectId
,
options
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
commit
(
types
.
RECEIVE_PROJECT_MILESTONES_SUCCESS
,
response
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
commit
(
types
.
RECEIVE_PROJECT_MILESTONES_ERROR
,
error
);
})
.
finally
(()
=>
{
...
...
@@ -95,10 +95,10 @@ export const searchGroupMilestones = ({ commit, state }) => {
commit
(
types
.
REQUEST_START
);
Api
.
groupMilestones
(
state
.
groupId
,
options
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
commit
(
types
.
RECEIVE_GROUP_MILESTONES_SUCCESS
,
response
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
commit
(
types
.
RECEIVE_GROUP_MILESTONES_ERROR
,
error
);
})
.
finally
(()
=>
{
...
...
app/assets/javascripts/milestones/stores/mutations.js
View file @
0e6e345f
...
...
@@ -22,7 +22,7 @@ export default {
},
[
types
.
REMOVE_SELECTED_MILESTONE
](
state
,
selectedMilestone
)
{
const
filteredMilestones
=
state
.
selectedMilestones
.
filter
(
milestone
=>
milestone
!==
selectedMilestone
,
(
milestone
)
=>
milestone
!==
selectedMilestone
,
);
Vue
.
set
(
state
,
'
selectedMilestones
'
,
filteredMilestones
);
},
...
...
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