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
4e1591c0
Commit
4e1591c0
authored
Jun 16, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added section to profile/preferences
parent
1dafd670
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
0 deletions
+37
-0
app/assets/images/new_nav.png
app/assets/images/new_nav.png
+0
-0
app/assets/images/old_nav.png
app/assets/images/old_nav.png
+0
-0
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+4
-0
app/assets/javascripts/experimental_flags.js
app/assets/javascripts/experimental_flags.js
+11
-0
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+2
-0
app/views/layouts/header/_new.html.haml
app/views/layouts/header/_new.html.haml
+2
-0
app/views/profiles/preferences/show.html.haml
app/views/profiles/preferences/show.html.haml
+18
-0
No files found.
app/assets/images/new_nav.png
0 → 100644
View file @
4e1591c0
23.2 KB
app/assets/images/old_nav.png
0 → 100644
View file @
4e1591c0
25 KB
app/assets/javascripts/dispatcher.js
View file @
4e1591c0
...
...
@@ -55,6 +55,7 @@ import RefSelectDropdown from './ref_select_dropdown';
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
(
function
()
{
var
Dispatcher
;
...
...
@@ -120,6 +121,9 @@ import initSettingsPanels from './settings_panels';
}
switch
(
page
)
{
case
'
profiles:preferences:show
'
:
initExperimentalFlags
();
break
;
case
'
sessions:new
'
:
new
UsernameValidator
();
new
ActiveTabMemoizer
();
...
...
app/assets/javascripts/experimental_flags.js
0 → 100644
View file @
4e1591c0
import
Cookies
from
'
js-cookie
'
;
export
default
()
=>
{
$
(
'
.js-expirement-feature-toggle
'
).
on
(
'
change
'
,
(
e
)
=>
{
const
el
=
e
.
target
;
Cookies
.
set
(
el
.
name
,
el
.
value
,
{
expires
:
365
*
10
,
});
});
};
app/views/layouts/header/_default.html.haml
View file @
4e1591c0
...
...
@@ -74,6 +74,8 @@
=
link_to
"Profile"
,
current_user
,
class:
'profile-link'
,
data:
{
user:
current_user
.
username
}
%li
=
link_to
"Settings"
,
profile_path
%li
=
link_to
"Turn on new nav"
,
profile_preferences_path
(
anchor:
"new-navigation"
)
%li
.divider
%li
=
link_to
"Sign out"
,
destroy_user_session_path
,
method: :delete
,
class:
"sign-out-link"
...
...
app/views/layouts/header/_new.html.haml
View file @
4e1591c0
...
...
@@ -74,6 +74,8 @@
=
link_to
"Profile"
,
current_user
,
class:
'profile-link'
,
data:
{
user:
current_user
.
username
}
%li
=
link_to
"Settings"
,
profile_path
%li
=
link_to
"Turn off new nav"
,
profile_preferences_path
(
anchor:
"new-navigation"
)
%li
.divider
%li
=
link_to
"Sign out"
,
destroy_user_session_path
,
method: :delete
,
class:
"sign-out-link"
...
...
app/views/profiles/preferences/show.html.haml
View file @
4e1591c0
...
...
@@ -17,6 +17,24 @@
=
scheme
.
name
.col-sm-12
%hr
.col-lg-3.profile-settings-sidebar
#new-navigation
%h4
.prepend-top-0
New Navigation
%p
This setting allows you to turn on or off the new upcoming navigation concept.
=
succeed
'.'
do
=
link_to
'Learn more'
,
''
,
target:
'_blank'
.col-lg-9.syntax-theme
=
label_tag
do
.preview
=
image_tag
"old_nav.png"
%input
.js-expirement-feature-toggle
{
type:
"radio"
,
value:
"false"
,
name:
"new_nav"
,
checked:
!
show_new_nav?
}
Old
=
label_tag
do
.preview
=
image_tag
"new_nav.png"
%input
.js-expirement-feature-toggle
{
type:
"radio"
,
value:
"true"
,
name:
"new_nav"
,
checked:
show_new_nav?
}
New
.col-sm-12
%hr
.col-lg-3.profile-settings-sidebar
%h4
.prepend-top-0
Behavior
...
...
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