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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
00ee7a9f
Commit
00ee7a9f
authored
Oct 01, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FE review changes app code
parent
fe96bd41
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
24 deletions
+41
-24
app/assets/javascripts/diff.js
app/assets/javascripts/diff.js
+1
-1
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+2
-2
app/assets/javascripts/notes/components/issue_discussion_locked_widget.vue
...ripts/notes/components/issue_discussion_locked_widget.vue
+2
-2
app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
...pts/sidebar/components/confidential/edit_form_buttons.vue
+2
-2
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
...avascripts/sidebar/components/lock/lock_issue_sidebar.vue
+17
-5
app/assets/javascripts/sidebar/sidebar_bundle.js
app/assets/javascripts/sidebar/sidebar_bundle.js
+11
-11
app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
...javascripts/vue_shared/components/issue/issue_warning.vue
+2
-0
app/assets/javascripts/vue_shared/mixins/issuable.js
app/assets/javascripts/vue_shared/mixins/issuable.js
+3
-1
db/schema.rb
db/schema.rb
+1
-0
No files found.
app/assets/javascripts/diff.js
View file @
00ee7a9f
...
...
@@ -18,7 +18,7 @@ class Diff {
});
const
tab
=
document
.
getElementById
(
'
diffs
'
);
if
(
!
tab
||
(
tab
&&
!
Object
.
hasOwnProperty
.
call
(
tab
.
dataset
,
'
isLocked
'
)
))
FilesCommentButton
.
init
(
$diffFile
);
if
(
!
tab
||
(
tab
&&
tab
.
dataset
&&
tab
.
dataset
.
isLocked
!==
''
))
FilesCommentButton
.
init
(
$diffFile
);
$diffFile
.
each
((
index
,
file
)
=>
new
gl
.
ImageFile
(
file
));
...
...
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
00ee7a9f
...
...
@@ -58,7 +58,7 @@
isIssueOpen
()
{
return
this
.
issueState
===
constants
.
OPENED
||
this
.
issueState
===
constants
.
REOPENED
;
},
canCreate
()
{
canCreate
Note
()
{
return
this
.
getIssueData
.
current_user
.
can_create_note
;
},
issueActionButtonTitle
()
{
...
...
@@ -241,7 +241,7 @@
<
template
>
<div>
<issue-note-signed-out-widget
v-if=
"!isLoggedIn"
/>
<issue-discussion-locked-widget
v-else-if=
"!canCreate"
/>
<issue-discussion-locked-widget
v-else-if=
"!canCreate
Note
"
/>
<ul
v-else
class=
"notes notes-form timeline"
>
...
...
app/assets/javascripts/notes/components/issue_discussion_locked_widget.vue
View file @
00ee7a9f
<
script
>
export
default
{
computed
:
{
i
con
()
{
lockI
con
()
{
return
gl
.
utils
.
spriteIcon
(
'
lock
'
);
},
},
...
...
@@ -12,7 +12,7 @@
<
template
>
<div
class=
"disabled-comment text-center"
>
<span
class=
"issuable-note-warning"
>
<span
class=
"icon"
v-html=
"
i
con"
></span>
<span
class=
"icon"
v-html=
"
lockI
con"
></span>
<span>
This issue is locked. Only
<b>
project members
</b>
can comment.
</span>
</span>
</div>
...
...
app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
View file @
00ee7a9f
...
...
@@ -15,7 +15,7 @@ export default {
},
},
computed
:
{
b
uttonText
()
{
toggleB
uttonText
()
{
return
this
.
isConfidential
?
'
Turn Off
'
:
'
Turn On
'
;
},
updateConfidentialBool
()
{
...
...
@@ -39,7 +39,7 @@ export default {
class=
"btn btn-close"
@
click.prevent=
"updateConfidentialAttribute(updateConfidentialBool)"
>
{{
b
uttonText
}}
{{
toggleB
uttonText
}}
</button>
</div>
</
template
>
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
View file @
00ee7a9f
...
...
@@ -86,7 +86,7 @@ export default {
<
/div
>
<
div
class
=
"
value sidebar-item-value hide-collapsed
"
>
<
edit
F
orm
<
edit
-
f
orm
v
-
if
=
"
isLockDialogOpen
"
:
toggle
-
form
=
"
toggleForm
"
:
is
-
locked
=
"
isLocked
"
...
...
@@ -94,13 +94,25 @@ export default {
:
issuable
-
type
=
"
issuableType
"
/>
<
div
v
-
if
=
"
isLocked
"
class
=
"
value sidebar-item-value
"
>
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-lock sidebar-item-icon is-active
"
><
/i
>
<
div
v
-
if
=
"
isLocked
"
class
=
"
value sidebar-item-value
"
>
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-lock sidebar-item-icon is-active
"
><
/i
>
{{
__
(
'
Locked
'
)
}}
<
/div
>
<
div
v
-
else
class
=
"
no-value sidebar-item-value hide-collapsed
"
>
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-unlock sidebar-item-icon
"
><
/i
>
<
div
v
-
else
class
=
"
no-value sidebar-item-value hide-collapsed
"
>
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-unlock sidebar-item-icon
"
><
/i
>
{{
__
(
'
Unlocked
'
)
}}
<
/div
>
<
/div
>
...
...
app/assets/javascripts/sidebar/sidebar_bundle.js
View file @
00ee7a9f
import
Vue
from
'
vue
'
;
import
s
idebarTimeTracking
from
'
./components/time_tracking/sidebar_time_tracking
'
;
import
s
idebarAssignees
from
'
./components/assignees/sidebar_assignees
'
;
import
confidential
from
'
./components/confidential/confidential_issue_sidebar.vue
'
;
import
S
idebarTimeTracking
from
'
./components/time_tracking/sidebar_time_tracking
'
;
import
S
idebarAssignees
from
'
./components/assignees/sidebar_assignees
'
;
import
ConfidentialIssueSidebar
from
'
./components/confidential/confidential_issue_sidebar.vue
'
;
import
SidebarMoveIssue
from
'
./lib/sidebar_move_issue
'
;
import
lockBlock
from
'
./components/lock/lock_issue_sidebar.vue
'
;
import
LockIssueSidebar
from
'
./components/lock/lock_issue_sidebar.vue
'
;
import
Translate
from
'
../vue_shared/translate
'
;
import
Mediator
from
'
./sidebar_mediator
'
;
...
...
@@ -11,14 +11,14 @@ import Mediator from './sidebar_mediator';
Vue
.
use
(
Translate
);
function
mountConfidentialComponent
(
mediator
)
{
const
el
=
document
.
querySelector
(
'
#
js-confidential-entry-point
'
);
const
el
=
document
.
getElementById
(
'
js-confidential-entry-point
'
);
if
(
!
el
)
return
;
const
dataNode
=
document
.
getElementById
(
'
js-confidential-issue-data
'
);
const
initialData
=
JSON
.
parse
(
dataNode
.
innerHTML
);
const
ConfidentialComp
=
Vue
.
extend
(
confidential
);
const
ConfidentialComp
=
Vue
.
extend
(
ConfidentialIssueSidebar
);
new
ConfidentialComp
({
propsData
:
{
...
...
@@ -30,14 +30,14 @@ function mountConfidentialComponent(mediator) {
}
function
mountLockComponent
(
mediator
)
{
const
el
=
document
.
querySelector
(
'
#
js-lock-entry-point
'
);
const
el
=
document
.
getElementById
(
'
js-lock-entry-point
'
);
if
(
!
el
)
return
;
const
dataNode
=
document
.
getElementById
(
'
js-lock-issue-data
'
);
const
initialData
=
JSON
.
parse
(
dataNode
.
innerHTML
);
const
LockComp
=
Vue
.
extend
(
lockBlock
);
const
LockComp
=
Vue
.
extend
(
LockIssueSidebar
);
new
LockComp
({
propsData
:
{
...
...
@@ -54,11 +54,11 @@ function domContentLoaded() {
const
mediator
=
new
Mediator
(
sidebarOptions
);
mediator
.
fetch
();
const
sidebarAssigneesEl
=
document
.
querySelector
(
'
#
js-vue-sidebar-assignees
'
);
const
sidebarAssigneesEl
=
document
.
getElementById
(
'
js-vue-sidebar-assignees
'
);
// Only create the sidebarAssignees vue app if it is found in the DOM
// We currently do not use sidebarAssignees for the MR page
if
(
sidebarAssigneesEl
)
{
new
Vue
(
s
idebarAssignees
).
$mount
(
sidebarAssigneesEl
);
new
Vue
(
S
idebarAssignees
).
$mount
(
sidebarAssigneesEl
);
}
mountConfidentialComponent
(
mediator
);
...
...
@@ -70,7 +70,7 @@ function domContentLoaded() {
$
(
'
.js-move-issue-confirmation-button
'
),
).
init
();
new
Vue
(
s
idebarTimeTracking
).
$mount
(
'
#issuable-time-tracker
'
);
new
Vue
(
S
idebarTimeTracking
).
$mount
(
'
#issuable-time-tracker
'
);
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
domContentLoaded
);
...
...
app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
View file @
00ee7a9f
...
...
@@ -4,11 +4,13 @@
isLocked
:
{
type
:
Boolean
,
default
:
false
,
required
:
false
,
},
isConfidential
:
{
type
:
Boolean
,
default
:
false
,
required
:
false
,
},
},
...
...
app/assets/javascripts/vue_shared/mixins/issuable.js
View file @
00ee7a9f
export
default
{
methods
:
{
issuableDisplayName
(
issuableType
)
{
return
issuableType
.
replace
(
/_/
,
'
'
);
const
displayName
=
issuableType
.
replace
(
/_/
,
'
'
);
return
this
.
__
?
this
.
__
(
displayName
)
:
displayName
;
},
},
};
db/schema.rb
View file @
00ee7a9f
...
...
@@ -1218,6 +1218,7 @@ ActiveRecord::Schema.define(version: 20170921115009) do
t
.
datetime
"last_repository_updated_at"
t
.
integer
"storage_version"
,
limit:
2
t
.
boolean
"resolve_outdated_diff_discussions"
t
.
boolean
"merge_requests_ff_only_enabled"
,
default:
false
,
null:
false
end
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
...
...
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