Commit 5b1db58c authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'master' into rm_duplicate_cache_ci_docs

parents a6f53042 4171933c
{
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"space-before-colon": "",
"space-after-colon": " ",
"space-before-combinator": " ",
"space-after-combinator": " ",
"space-between-declarations": "\n",
"space-before-opening-brace": " ",
"space-after-opening-brace": "\n",
"space-before-closing-brace": "\n",
"unitless-zero": true
}
...@@ -122,6 +122,14 @@ rubocop: ...@@ -122,6 +122,14 @@ rubocop:
- ruby - ruby
- mysql - mysql
scss-lint:
stage: test
script:
- bundle exec rake scss_lint
tags:
- ruby
allow_failure: true
brakeman: brakeman:
stage: test stage: test
script: script:
...@@ -148,13 +156,14 @@ flay: ...@@ -148,13 +156,14 @@ flay:
bundler:audit: bundler:audit:
stage: test stage: test
only:
- master
script: script:
- "bundle exec bundle-audit update" - "bundle exec bundle-audit update"
- "bundle exec bundle-audit check" - "bundle exec bundle-audit check --ignore OSVDB-115941"
tags: tags:
- ruby - ruby
- mysql - mysql
allow_failure: true
# Ruby 2.2 jobs # Ruby 2.2 jobs
......
# Linter Documentation:
# https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md
scss_files: 'app/assets/stylesheets/**/*.scss'
exclude:
- 'app/assets/stylesheets/pages/emojis.scss'
linters:
BangFormat:
enabled: false
BorderZero:
enabled: false
ColorKeyword:
enabled: false
ColorVariable:
enabled: false
Comment:
enabled: false
DeclarationOrder:
enabled: false
# `scss-lint:disable` control comments should be preceded by a comment
# explaining why these linters are being disabled for this file.
# See https://github.com/brigade/scss-lint#disabling-linters-via-source for
# more information.
DisableLinterReason:
enabled: true
DuplicateProperty:
enabled: false
EmptyLineBetweenBlocks:
enabled: false
EmptyRule:
enabled: false
FinalNewline:
enabled: false
# HEX colors should use three-character values where possible.
HexLength:
enabled: true
# HEX color values should use lower-case colors to differentiate between
# letters and numbers, e.g. `#E3E3E3` vs. `#e3e3e3`.
HexNotation:
enabled: true
IdSelector:
enabled: false
ImportPath:
enabled: false
ImportantRule:
enabled: false
# Indentation should always be done in increments of 2 spaces.
Indentation:
enabled: true
width: 2
LeadingZero:
enabled: false
MergeableSelector:
enabled: false
NameFormat:
enabled: false
NestingDepth:
enabled: false
PlaceholderInExtend:
enabled: false
PropertySortOrder:
enabled: false
PropertySpelling:
enabled: false
PseudoElement:
enabled: false
QualifyingElement:
enabled: false
SelectorDepth:
enabled: false
# Selectors should always use hyphenated-lowercase, rather than camelCase or
# snake_case.
SelectorFormat:
enabled: true
convention: hyphenated_lowercase
# Prefer the shortest shorthand form possible for properties that support it.
Shorthand:
enabled: true
# Each property should have its own line, except in the special case of
# single line rulesets.
SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: true
SingleLinePerSelector:
enabled: false
SpaceAfterComma:
enabled: false
# Properties should be formatted with a single space separating the colon
# from the property's value.
SpaceAfterPropertyColon:
enabled: true
# Properties should be formatted with no space between the name and the
# colon.
SpaceAfterPropertyName:
enabled: true
SpaceAroundOperator:
enabled: false
SpaceBeforeBrace:
enabled: false
StringQuotes:
enabled: false
TrailingSemicolon:
enabled: false
TrailingWhitespace:
enabled: false
UnnecessaryMantissa:
enabled: false
UnnecessaryParentReference:
enabled: false
VendorPrefix:
enabled: false
# Omit length units on zero values, e.g. `0px` vs. `0`.
ZeroUnit:
enabled: true
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.6.0 (unreleased) v 8.6.0 (unreleased)
- Bump gitlab_git to 9.0.3 (Stan Hu)
- Support Golang subpackage fetching (Stan Hu) - Support Golang subpackage fetching (Stan Hu)
- Bump Capybara gem to 2.6.2 (Stan Hu)
- Contributions to forked projects are included in calendar - Contributions to forked projects are included in calendar
- Improve the formatting for the user page bio (Connor Shea) - Improve the formatting for the user page bio (Connor Shea)
- Removed the default password from the initial admin account created during - Removed the default password from the initial admin account created during
setup. A password can be provided during setup (see installation docs), or setup. A password can be provided during setup (see installation docs), or
GitLab will ask the user to create a new one upon first visit. GitLab will ask the user to create a new one upon first visit.
- Fix issue when pushing to projects ending in .wiki - Fix issue when pushing to projects ending in .wiki
- Fix avatar stretching by providing a cropping feature (Johann Pardanaud) - Add support for wiki with UTF-8 page names (Hiroyuki Sato)
- Fix wiki search results point to raw source (Hiroyuki Sato)
- Don't load all of GitLab in mail_room - Don't load all of GitLab in mail_room
- Update `omniauth-saml` to 1.5.0 to allow for custom response attributes to be set - Update `omniauth-saml` to 1.5.0 to allow for custom response attributes to be set
- Memoize @group in Admin::GroupsController (Yatish Mehta) - Memoize @group in Admin::GroupsController (Yatish Mehta)
- Indicate how much an MR diverged from the target branch (Pierre de La Morinerie) - Indicate how much an MR diverged from the target branch (Pierre de La Morinerie)
- Added omniauth-auth0 Gem (Daniel Carraro)
- Strip leading and trailing spaces in URL validator (evuez) - Strip leading and trailing spaces in URL validator (evuez)
- Add "last_sign_in_at" and "confirmed_at" to GET /users/* API endpoints for admins (evuez) - Add "last_sign_in_at" and "confirmed_at" to GET /users/* API endpoints for admins (evuez)
- Return empty array instead of 404 when commit has no statuses in commit status API - Return empty array instead of 404 when commit has no statuses in commit status API
- Decrease the font size and the padding of the `.anchor` icons used in the README (Roberto Dip) - Decrease the font size and the padding of the `.anchor` icons used in the README (Roberto Dip)
- Rewrite logo to simplify SVG code (Sean Lang) - Rewrite logo to simplify SVG code (Sean Lang)
- Allow to use YAML anchors when parsing the `.gitlab-ci.yml` (Pascal Bach)
- Ignore jobs that start with `.` (hidden jobs)
- Allow to pass name of created artifacts archive in `.gitlab-ci.yml`
- Refactor and greatly improve search performance - Refactor and greatly improve search performance
- Add support for cross-project label references - Add support for cross-project label references
- Ensure "new SSH key" email do not ends up as dead Sidekiq jobs
- Update documentation to reflect Guest role not being enforced on internal projects - Update documentation to reflect Guest role not being enforced on internal projects
- Allow search for logged out users - Allow search for logged out users
- Allow to define on which builds the current one depends on
- Allow user subscription to a label: get notified for issues/merge requests related to that label (Timothy Andrew)
- Fix bug where Bitbucket `closed` issues were imported as `opened` (Iuri de Silvio) - Fix bug where Bitbucket `closed` issues were imported as `opened` (Iuri de Silvio)
- Don't show Issues/MRs from archived projects in Groups view - Don't show Issues/MRs from archived projects in Groups view
- Fix wrong "iid of max iid" in Issuable sidebar for some merged MRs
- Increase the notes polling timeout over time (Roberto Dip) - Increase the notes polling timeout over time (Roberto Dip)
- Add shortcut to toggle markdown preview (Florent Baldino) - Add shortcut to toggle markdown preview (Florent Baldino)
- Show labels in dashboard and group milestone views - Show labels in dashboard and group milestone views
...@@ -31,6 +42,13 @@ v 8.6.0 (unreleased) ...@@ -31,6 +42,13 @@ v 8.6.0 (unreleased)
- Add ability to show archived projects on dashboard, explore and group pages - Add ability to show archived projects on dashboard, explore and group pages
- Move group activity to separate page - Move group activity to separate page
- Continue parameters are checked to ensure redirection goes to the same instance - Continue parameters are checked to ensure redirection goes to the same instance
- User deletion is now done in the background so the request can not time out
v 8.5.7
- Bump Git version requirement to 2.7.3
v 8.5.6
- Obtain a lease before querying LDAP
v 8.5.5 v 8.5.5
- Ensure removing a project removes associated Todo entries - Ensure removing a project removes associated Todo entries
......
...@@ -427,6 +427,7 @@ merge request: ...@@ -427,6 +427,7 @@ merge request:
1. [Rails](https://github.com/bbatsov/rails-style-guide) 1. [Rails](https://github.com/bbatsov/rails-style-guide)
1. [Testing](https://github.com/thoughtbot/guides/tree/master/style/testing) 1. [Testing](https://github.com/thoughtbot/guides/tree/master/style/testing)
1. [CoffeeScript](https://github.com/thoughtbot/guides/tree/master/style/coffeescript) 1. [CoffeeScript](https://github.com/thoughtbot/guides/tree/master/style/coffeescript)
1. [SCSS styleguide][scss-styleguide]
1. [Shell commands](doc/development/shell_commands.md) created by GitLab 1. [Shell commands](doc/development/shell_commands.md) created by GitLab
contributors to enhance security contributors to enhance security
1. [Database Migrations](doc/development/migration_style_guide.md) 1. [Database Migrations](doc/development/migration_style_guide.md)
...@@ -494,6 +495,7 @@ available at [http://contributor-covenant.org/version/1/1/0/](http://contributor ...@@ -494,6 +495,7 @@ available at [http://contributor-covenant.org/version/1/1/0/](http://contributor
[rss-source]: https://github.com/bbatsov/ruby-style-guide/blob/master/README.md#source-code-layout [rss-source]: https://github.com/bbatsov/ruby-style-guide/blob/master/README.md#source-code-layout
[rss-naming]: https://github.com/bbatsov/ruby-style-guide/blob/master/README.md#naming [rss-naming]: https://github.com/bbatsov/ruby-style-guide/blob/master/README.md#naming
[doc-styleguide]: doc/development/doc_styleguide.md "Documentation styleguide" [doc-styleguide]: doc/development/doc_styleguide.md "Documentation styleguide"
[scss-styleguide]: doc/development/scss_styleguide.md "SCSS styleguide"
[gitlab-design]: https://gitlab.com/gitlab-org/gitlab-design [gitlab-design]: https://gitlab.com/gitlab-org/gitlab-design
[free Antetype viewer (Mac OSX only)]: https://itunes.apple.com/us/app/antetype-viewer/id824152298?mt=12 [free Antetype viewer (Mac OSX only)]: https://itunes.apple.com/us/app/antetype-viewer/id824152298?mt=12
[`gitlab1.atype` file]: https://gitlab.com/gitlab-org/gitlab-design/tree/master/gitlab1.atype/ [`gitlab1.atype` file]: https://gitlab.com/gitlab-org/gitlab-design/tree/master/gitlab1.atype/
......
...@@ -22,6 +22,7 @@ gem 'devise', '~> 3.5.4' ...@@ -22,6 +22,7 @@ gem 'devise', '~> 3.5.4'
gem 'devise-async', '~> 0.9.0' gem 'devise-async', '~> 0.9.0'
gem 'doorkeeper', '~> 2.2.0' gem 'doorkeeper', '~> 2.2.0'
gem 'omniauth', '~> 1.3.1' gem 'omniauth', '~> 1.3.1'
gem 'omniauth-auth0', '~> 1.4.1'
gem 'omniauth-azure-oauth2', '~> 0.0.6' gem 'omniauth-azure-oauth2', '~> 0.0.6'
gem 'omniauth-bitbucket', '~> 0.0.2' gem 'omniauth-bitbucket', '~> 0.0.2'
gem 'omniauth-cas3', '~> 1.1.2' gem 'omniauth-cas3', '~> 1.1.2'
...@@ -58,7 +59,9 @@ gem "gitlab_git", '~> 9.0' ...@@ -58,7 +59,9 @@ gem "gitlab_git", '~> 9.0'
gem 'gitlab_omniauth-ldap', '~> 1.2.1', require: "omniauth-ldap" gem 'gitlab_omniauth-ldap', '~> 1.2.1', require: "omniauth-ldap"
# Git Wiki # Git Wiki
gem 'gollum-lib', '~> 4.1.0' # Required manually in config/initializers/gollum.rb to control load order
gem 'gollum-lib', '~> 4.1.0', require: false
gem 'gollum-rugged_adapter', '~> 0.4.2', require: false
# Language detection # Language detection
gem "github-linguist", "~> 4.7.0", require: "linguist" gem "github-linguist", "~> 4.7.0", require: "linguist"
...@@ -77,9 +80,6 @@ gem "haml-rails", '~> 0.9.0' ...@@ -77,9 +80,6 @@ gem "haml-rails", '~> 0.9.0'
# Files attachments # Files attachments
gem "carrierwave", '~> 0.10.0' gem "carrierwave", '~> 0.10.0'
# Image editing
gem "mini_magick", '~> 4.4.0'
# Drag and Drop UI # Drag and Drop UI
gem 'dropzonejs-rails', '~> 0.7.1' gem 'dropzonejs-rails', '~> 0.7.1'
...@@ -273,7 +273,7 @@ group :development, :test do ...@@ -273,7 +273,7 @@ group :development, :test do
# Generate Fake data # Generate Fake data
gem 'ffaker', '~> 2.0.0' gem 'ffaker', '~> 2.0.0'
gem 'capybara', '~> 2.4.0' gem 'capybara', '~> 2.6.2'
gem 'capybara-screenshot', '~> 1.0.0' gem 'capybara-screenshot', '~> 1.0.0'
gem 'poltergeist', '~> 1.9.0' gem 'poltergeist', '~> 1.9.0'
...@@ -286,6 +286,7 @@ group :development, :test do ...@@ -286,6 +286,7 @@ group :development, :test do
gem 'spring-commands-teaspoon', '~> 0.0.2' gem 'spring-commands-teaspoon', '~> 0.0.2'
gem 'rubocop', '~> 0.35.0', require: false gem 'rubocop', '~> 0.35.0', require: false
gem 'scss_lint', '~> 0.47.0', require: false
gem 'coveralls', '~> 0.8.2', require: false gem 'coveralls', '~> 0.8.2', require: false
gem 'simplecov', '~> 0.10.0', require: false gem 'simplecov', '~> 0.10.0', require: false
gem 'flog', require: false gem 'flog', require: false
......
...@@ -108,7 +108,8 @@ GEM ...@@ -108,7 +108,8 @@ GEM
thor (~> 0.18) thor (~> 0.18)
byebug (8.2.1) byebug (8.2.1)
cal-heatmap-rails (3.5.1) cal-heatmap-rails (3.5.1)
capybara (2.4.4) capybara (2.6.2)
addressable
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
...@@ -358,7 +359,7 @@ GEM ...@@ -358,7 +359,7 @@ GEM
posix-spawn (~> 0.3) posix-spawn (~> 0.3)
gitlab_emoji (0.3.1) gitlab_emoji (0.3.1)
gemojione (~> 2.2, >= 2.2.1) gemojione (~> 2.2, >= 2.2.1)
gitlab_git (9.0.1) gitlab_git (9.0.3)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.7.3) charlock_holmes (~> 0.7.3)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
...@@ -380,6 +381,9 @@ GEM ...@@ -380,6 +381,9 @@ GEM
rouge (~> 1.9) rouge (~> 1.9)
sanitize (~> 2.1.0) sanitize (~> 2.1.0)
stringex (~> 2.5.1) stringex (~> 2.5.1)
gollum-rugged_adapter (0.4.2)
mime-types (>= 1.15)
rugged (~> 0.24.0, >= 0.21.3)
gon (6.0.1) gon (6.0.1)
actionpack (>= 3.0) actionpack (>= 3.0)
json json
...@@ -468,7 +472,6 @@ GEM ...@@ -468,7 +472,6 @@ GEM
method_source (0.8.2) method_source (0.8.2)
mime-types (1.25.1) mime-types (1.25.1)
mimemagic (0.3.0) mimemagic (0.3.0)
mini_magick (4.4.0)
mini_portile2 (2.0.0) mini_portile2 (2.0.0)
minitest (5.7.0) minitest (5.7.0)
mousetrap-rails (1.4.6) mousetrap-rails (1.4.6)
...@@ -495,6 +498,8 @@ GEM ...@@ -495,6 +498,8 @@ GEM
omniauth (1.3.1) omniauth (1.3.1)
hashie (>= 1.2, < 4) hashie (>= 1.2, < 4)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
omniauth-auth0 (1.4.1)
omniauth-oauth2 (~> 1.1)
omniauth-azure-oauth2 (0.0.6) omniauth-azure-oauth2 (0.0.6)
jwt (~> 1.0) jwt (~> 1.0)
omniauth (~> 1.0) omniauth (~> 1.0)
...@@ -703,7 +708,7 @@ GEM ...@@ -703,7 +708,7 @@ GEM
rubyntlm (0.5.2) rubyntlm (0.5.2)
rubypants (0.2.0) rubypants (0.2.0)
rufus-scheduler (3.1.10) rufus-scheduler (3.1.10)
rugged (0.24.0b13) rugged (0.24.0)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sanitize (2.1.0) sanitize (2.1.0)
nokogiri (>= 1.4.4) nokogiri (>= 1.4.4)
...@@ -717,6 +722,9 @@ GEM ...@@ -717,6 +722,9 @@ GEM
sawyer (0.6.0) sawyer (0.6.0)
addressable (~> 2.3.5) addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10) faraday (~> 0.8, < 0.10)
scss_lint (0.47.1)
rake (>= 0.9, < 11)
sass (~> 3.4.15)
sdoc (0.3.20) sdoc (0.3.20)
json (>= 1.1.3) json (>= 1.1.3)
rdoc (~> 3.10) rdoc (~> 3.10)
...@@ -901,7 +909,7 @@ DEPENDENCIES ...@@ -901,7 +909,7 @@ DEPENDENCIES
bundler-audit bundler-audit
byebug byebug
cal-heatmap-rails (~> 3.5.0) cal-heatmap-rails (~> 3.5.0)
capybara (~> 2.4.0) capybara (~> 2.6.2)
capybara-screenshot (~> 1.0.0) capybara-screenshot (~> 1.0.0)
carrierwave (~> 0.10.0) carrierwave (~> 0.10.0)
charlock_holmes (~> 0.7.3) charlock_holmes (~> 0.7.3)
...@@ -938,6 +946,7 @@ DEPENDENCIES ...@@ -938,6 +946,7 @@ DEPENDENCIES
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (~> 1.2.1) gitlab_omniauth-ldap (~> 1.2.1)
gollum-lib (~> 4.1.0) gollum-lib (~> 4.1.0)
gollum-rugged_adapter (~> 0.4.2)
gon (~> 6.0.1) gon (~> 6.0.1)
grape (~> 0.13.0) grape (~> 0.13.0)
grape-entity (~> 0.4.2) grape-entity (~> 0.4.2)
...@@ -956,7 +965,6 @@ DEPENDENCIES ...@@ -956,7 +965,6 @@ DEPENDENCIES
loofah (~> 2.0.3) loofah (~> 2.0.3)
mail_room (~> 0.6.1) mail_room (~> 0.6.1)
method_source (~> 0.8) method_source (~> 0.8)
mini_magick (~> 4.4.0)
minitest (~> 5.7.0) minitest (~> 5.7.0)
mousetrap-rails (~> 1.4.6) mousetrap-rails (~> 1.4.6)
mysql2 (~> 0.3.16) mysql2 (~> 0.3.16)
...@@ -967,6 +975,7 @@ DEPENDENCIES ...@@ -967,6 +975,7 @@ DEPENDENCIES
oauth2 (~> 1.0.0) oauth2 (~> 1.0.0)
octokit (~> 3.8.0) octokit (~> 3.8.0)
omniauth (~> 1.3.1) omniauth (~> 1.3.1)
omniauth-auth0 (~> 1.4.1)
omniauth-azure-oauth2 (~> 0.0.6) omniauth-azure-oauth2 (~> 0.0.6)
omniauth-bitbucket (~> 0.0.2) omniauth-bitbucket (~> 0.0.2)
omniauth-cas3 (~> 1.1.2) omniauth-cas3 (~> 1.1.2)
...@@ -1008,6 +1017,7 @@ DEPENDENCIES ...@@ -1008,6 +1017,7 @@ DEPENDENCIES
ruby-fogbugz (~> 0.2.1) ruby-fogbugz (~> 0.2.1)
sanitize (~> 2.0) sanitize (~> 2.0)
sass-rails (~> 5.0.0) sass-rails (~> 5.0.0)
scss_lint (~> 0.47.0)
sdoc (~> 0.3.20) sdoc (~> 0.3.20)
seed-fu (~> 2.3.5) seed-fu (~> 2.3.5)
select2-rails (~> 3.5.9) select2-rails (~> 3.5.9)
......
...@@ -68,7 +68,7 @@ GitLab is a Ruby on Rails application that runs on the following software: ...@@ -68,7 +68,7 @@ GitLab is a Ruby on Rails application that runs on the following software:
- Ubuntu/Debian/CentOS/RHEL - Ubuntu/Debian/CentOS/RHEL
- Ruby (MRI) 2.1 - Ruby (MRI) 2.1
- Git 1.7.10+ - Git 2.7.3+
- Redis 2.8+ - Redis 2.8+
- MySQL or PostgreSQL - MySQL or PostgreSQL
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#= require jquery.nicescroll #= require jquery.nicescroll
#= require_tree . #= require_tree .
#= require fuzzaldrin-plus #= require fuzzaldrin-plus
#= require cropper.js
window.slugify = (text) -> window.slugify = (text) ->
text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase() text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase()
...@@ -108,6 +107,8 @@ window.onload = -> ...@@ -108,6 +107,8 @@ window.onload = ->
setTimeout shiftWindow, 100 setTimeout shiftWindow, 100
$ -> $ ->
bootstrapBreakpoint = bp.getBreakpointSize()
$(".nicescroll").niceScroll(cursoropacitymax: '0.4', cursorcolor: '#FFF', cursorborder: "1px solid #FFF") $(".nicescroll").niceScroll(cursoropacitymax: '0.4', cursorcolor: '#FFF', cursorborder: "1px solid #FFF")
# Click a .js-select-on-focus field, select the contents # Click a .js-select-on-focus field, select the contents
...@@ -256,35 +257,14 @@ $ -> ...@@ -256,35 +257,14 @@ $ ->
$('.right-sidebar') $('.right-sidebar')
.hasClass('right-sidebar-collapsed'), { path: '/' }) .hasClass('right-sidebar-collapsed'), { path: '/' })
bootstrapBreakpoint = undefined;
checkBootstrapBreakpoints = ->
if $('.device-xs').is(':visible')
bootstrapBreakpoint = "xs"
else if $('.device-sm').is(':visible')
bootstrapBreakpoint = "sm"
else if $('.device-md').is(':visible')
bootstrapBreakpoint = "md"
else if $('.device-lg').is(':visible')
bootstrapBreakpoint = "lg"
setBootstrapBreakpoints = ->
if $('.device-xs').length
return
$("body")
.append('<div class="device-xs visible-xs"></div>'+
'<div class="device-sm visible-sm"></div>'+
'<div class="device-md visible-md"></div>'+
'<div class="device-lg visible-lg"></div>')
checkBootstrapBreakpoints()
fitSidebarForSize = -> fitSidebarForSize = ->
oldBootstrapBreakpoint = bootstrapBreakpoint oldBootstrapBreakpoint = bootstrapBreakpoint
checkBootstrapBreakpoints() bootstrapBreakpoint = bp.getBreakpointSize()
if bootstrapBreakpoint != oldBootstrapBreakpoint if bootstrapBreakpoint != oldBootstrapBreakpoint
$(document).trigger('breakpoint:change', [bootstrapBreakpoint]) $(document).trigger('breakpoint:change', [bootstrapBreakpoint])
checkInitialSidebarSize = -> checkInitialSidebarSize = ->
bootstrapBreakpoint = bp.getBreakpointSize()
if bootstrapBreakpoint is "xs" or "sm" if bootstrapBreakpoint is "xs" or "sm"
$(document).trigger('breakpoint:change', [bootstrapBreakpoint]) $(document).trigger('breakpoint:change', [bootstrapBreakpoint])
...@@ -293,6 +273,5 @@ $ -> ...@@ -293,6 +273,5 @@ $ ->
.on "resize", (e) -> .on "resize", (e) ->
fitSidebarForSize() fitSidebarForSize()
setBootstrapBreakpoints()
checkInitialSidebarSize() checkInitialSidebarSize()
new Aside() new Aside()
class @Breakpoints
instance = null;
class BreakpointInstance
BREAKPOINTS = ["xs", "sm", "md", "lg"]
constructor: ->
@setup()
setup: ->
allDeviceSelector = BREAKPOINTS.map (breakpoint) ->
".device-#{breakpoint}"
return if $(allDeviceSelector.join(",")).length
# Create all the elements
els = $.map BREAKPOINTS, (breakpoint) ->
"<div class='device-#{breakpoint} visible-#{breakpoint}'></div>"
$("body").append els.join('')
visibleDevice: ->
allDeviceSelector = BREAKPOINTS.map (breakpoint) ->
".device-#{breakpoint}"
$(allDeviceSelector.join(",")).filter(":visible")
getBreakpointSize: ->
$visibleDevice = @visibleDevice
# the page refreshed via turbolinks
if not $visibleDevice().length
@setup()
$visibleDevice = @visibleDevice()
return $visibleDevice.attr("class").split("visible-")[1]
@get: ->
return instance ?= new BreakpointInstance
$ =>
@bp = Breakpoints.get()
...@@ -251,7 +251,7 @@ class GitLabDropdown ...@@ -251,7 +251,7 @@ class GitLabDropdown
# Toggle active class for the tick mark # Toggle active class for the tick mark
el.toggleClass "is-active" el.toggleClass "is-active"
if value if value?
if !field.length if !field.length
# Create hidden input for form # Create hidden input for form
input = "<input type='hidden' name='#{fieldName}' />" input = "<input type='hidden' name='#{fieldName}' />"
......
...@@ -17,52 +17,14 @@ class @Profile ...@@ -17,52 +17,14 @@ class @Profile
$('.update-notifications').on 'ajax:complete', -> $('.update-notifications').on 'ajax:complete', ->
$(this).find('.btn-save').enable() $(this).find('.btn-save').enable()
# Avatar management $('.js-choose-user-avatar-button').bind "click", ->
form = $(this).closest("form")
$avatarInput = $('.js-user-avatar-input') form.find(".js-user-avatar-input").click()
$filename = $('.js-avatar-filename')
$modalCrop = $('.modal-profile-crop')
$modalCropImg = $('.modal-profile-crop-image')
$('.js-choose-user-avatar-button').on "click", ->
$form = $(this).closest("form")
$form.find(".js-user-avatar-input").click()
$modalCrop.on 'shown.bs.modal', ->
setTimeout ( -> # The cropper must be asynchronously initialized
$modalCropImg.cropper
aspectRatio: 1
modal: false
scalable: false
rotatable: false
zoomable: false
crop: (event) ->
['x', 'y'].forEach (key) ->
$("#user_avatar_crop_#{key}").val(Math.floor(event[key]))
$("#user_avatar_crop_size").val(Math.floor(event.width))
), 0
$modalCrop.on 'hidden.bs.modal', ->
$modalCropImg.attr('src', '').cropper('destroy')
$avatarInput.val('')
$filename.text($filename.data('label'))
$('.js-upload-user-avatar').on 'click', ->
$('.edit-user').submit()
$avatarInput.on "change", -> $('.js-user-avatar-input').bind "change", ->
form = $(this).closest("form") form = $(this).closest("form")
filename = $(this).val().replace(/^.*[\\\/]/, '') filename = $(this).val().replace(/^.*[\\\/]/, '')
$filename.data('label', $filename.text()).text(filename) form.find(".js-avatar-filename").text(filename)
reader = new FileReader
reader.onload = (event) ->
$modalCrop.modal('show')
$modalCropImg.attr('src', event.target.result)
fileData = reader.readAsDataURL(this.files[0])
$ -> $ ->
# Extract the SSH Key title from its comment # Extract the SSH Key title from its comment
......
$(document).on("click", '.toggle-nav-collapse', (e) -> collapsed = 'page-sidebar-collapsed'
e.preventDefault() expanded = 'page-sidebar-expanded'
collapsed = 'page-sidebar-collapsed'
expanded = 'page-sidebar-expanded'
toggleSidebar = ->
$('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}") $('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
$('header').toggleClass("header-collapsed header-expanded") $('header').toggleClass("header-collapsed header-expanded")
$('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded") $('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded")
...@@ -14,4 +13,15 @@ $(document).on("click", '.toggle-nav-collapse', (e) -> ...@@ -14,4 +13,15 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
niceScrollBars.updateScrollBar(); niceScrollBars.updateScrollBar();
), 300 ), 300
$(document).on("click", '.toggle-nav-collapse', (e) ->
e.preventDefault()
toggleSidebar()
) )
$ ->
size = bp.getBreakpointSize()
if size is "xs" or size is "sm"
if $('.page-with-sidebar').hasClass(expanded)
toggleSidebar()
class @Subscription class @Subscription
constructor: (url) -> constructor: (container) ->
$(".subscribe-button").unbind("click").click (event)=> $container = $(container)
btn = $(event.currentTarget) @url = $container.attr('data-url')
action = btn.find("span").text() @subscribe_button = $container.find('.subscribe-button')
current_status = $(".subscription-status").attr("data-status") @subscription_status = $container.find('.subscription-status')
btn.prop("disabled", true) @subscribe_button.unbind('click').click(@toggleSubscription)
$.post url, =>
btn.prop("disabled", false)
status = if current_status == "subscribed" then "unsubscribed" else "subscribed"
$(".subscription-status").attr("data-status", status)
action = if status == "subscribed" then "Unsubscribe" else "Subscribe"
btn.find("span").text(action)
$(".subscription-status>div").toggleClass("hidden")
toggleSubscription: (event) =>
btn = $(event.currentTarget)
action = btn.find('span').text()
current_status = @subscription_status.attr('data-status')
btn.prop('disabled', true)
$.post @url, =>
btn.prop('disabled', false)
status = if current_status == 'subscribed' then 'unsubscribed' else 'subscribed'
@subscription_status.attr('data-status', status)
action = if status == 'subscribed' then 'Unsubscribe' else 'Subscribe'
btn.find('span').text(action)
@subscription_status.find('>div').toggleClass('hidden')
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
*= require_self *= require_self
*= require dropzone/basic *= require dropzone/basic
*= require cal-heatmap *= require cal-heatmap
*= require cropper.css
*/ */
/* /*
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
margin-bottom: -$gl-padding; margin-bottom: -$gl-padding;
background-color: $background-color; background-color: $background-color;
padding: $gl-padding; padding: $gl-padding;
margin-bottom: 0px; margin-bottom: 0;
border-top: 1px solid $border-color; border-top: 1px solid $border-color;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
color: $gl-gray; color: $gl-gray;
...@@ -120,6 +120,10 @@ ...@@ -120,6 +120,10 @@
.cover-desc { .cover-desc {
padding: 0 $gl-padding 3px; padding: 0 $gl-padding 3px;
color: $gl-text-color; color: $gl-text-color;
&.username:last-child {
padding-bottom: $gl-padding;
}
} }
.cover-controls { .cover-controls {
......
...@@ -37,23 +37,23 @@ ...@@ -37,23 +37,23 @@
} }
@mixin btn-green { @mixin btn-green {
@include btn-color($green-light, $border-green-light, $green-normal, $border-green-normal, $green-dark, $border-green-dark, #FFFFFF); @include btn-color($green-light, $border-green-light, $green-normal, $border-green-normal, $green-dark, $border-green-dark, #fff);
} }
@mixin btn-blue { @mixin btn-blue {
@include btn-color($blue-light, $border-blue-light, $blue-normal, $border-blue-normal, $blue-dark, $border-blue-dark, #FFFFFF); @include btn-color($blue-light, $border-blue-light, $blue-normal, $border-blue-normal, $blue-dark, $border-blue-dark, #fff);
} }
@mixin btn-blue-medium { @mixin btn-blue-medium {
@include btn-color($blue-medium-light, $border-blue-light, $blue-medium, $border-blue-normal, $blue-medium-dark, $border-blue-dark, #FFFFFF); @include btn-color($blue-medium-light, $border-blue-light, $blue-medium, $border-blue-normal, $blue-medium-dark, $border-blue-dark, #fff);
} }
@mixin btn-orange { @mixin btn-orange {
@include btn-color($orange-light, $border-orange-light, $orange-normal, $border-orange-normal, $orange-dark, $border-orange-dark, #FFFFFF); @include btn-color($orange-light, $border-orange-light, $orange-normal, $border-orange-normal, $orange-dark, $border-orange-dark, #fff);
} }
@mixin btn-red { @mixin btn-red {
@include btn-color($red-light, $border-red-light, $red-normal, $border-red-normal, $red-dark, $border-red-dark, #FFFFFF); @include btn-color($red-light, $border-red-light, $red-normal, $border-red-normal, $red-dark, $border-red-dark, #fff);
} }
@mixin btn-gray { @mixin btn-gray {
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
margin-right: 7px; margin-right: 7px;
float: left; float: left;
&:last-child { &:last-child {
margin-right: 0px; margin-right: 0;
} }
&.btn-xs { &.btn-xs {
margin-right: 3px; margin-right: 3px;
...@@ -139,7 +139,6 @@ ...@@ -139,7 +139,6 @@
.caret { .caret {
margin-left: 5px; margin-left: 5px;
color: $gray-darkest;
} }
} }
...@@ -170,7 +169,7 @@ ...@@ -170,7 +169,7 @@
margin-right: 7px; margin-right: 7px;
float: left; float: left;
&:last-child { &:last-child {
margin-right: 0px; margin-right: 0;
} }
} }
} }
......
...@@ -33,19 +33,19 @@ ...@@ -33,19 +33,19 @@
} }
.q2 { .q2 {
fill: #ACD5F2 !important; fill: #acd5f2 !important;
} }
.q3 { .q3 {
fill: #7FA8D1 !important; fill: #7fa8d1 !important;
} }
.q4 { .q4 {
fill: #49729B !important; fill: #49729b !important;
} }
.q5 { .q5 {
fill: #254E77 !important; fill: #254e77 !important;
} }
.domain-background { .domain-background {
......
...@@ -39,6 +39,6 @@ ...@@ -39,6 +39,6 @@
} }
.bs-callout-success { .bs-callout-success {
background-color: #dff0d8; background-color: #dff0d8;
border-color: #5cA64d; border-color: #5ca64d;
color: #3c763d; color: #3c763d;
} }
/** COLORS **/ /** COLORS **/
.cgray { color: $gl-gray; } .cgray { color: $gl-gray; }
.clgray { color: #BBB } .clgray { color: #bbb }
.cred { color: $gl-text-red; } .cred { color: $gl-text-red; }
.cgreen { color: $gl-text-green; } .cgreen { color: $gl-text-green; }
.cdark { color: #444 } .cdark { color: #444 }
...@@ -51,7 +51,7 @@ pre { ...@@ -51,7 +51,7 @@ pre {
} }
&.well-pre { &.well-pre {
border: 1px solid #EEE; border: 1px solid #eee;
background: #f9f9f9; background: #f9f9f9;
border-radius: 0; border-radius: 0;
color: #555; color: #555;
...@@ -103,7 +103,7 @@ span.update-author { ...@@ -103,7 +103,7 @@ span.update-author {
} }
.user-mention { .user-mention {
color: #2FA0BB; color: #2fa0bb;
font-weight: bold; font-weight: bold;
} }
...@@ -187,9 +187,9 @@ li.note { ...@@ -187,9 +187,9 @@ li.note {
.error-message { .error-message {
padding: 10px; padding: 10px;
background: #C67; background: #c67;
margin: 0; margin: 0;
color: #FFF; color: #fff;
a { a {
color: #fff; color: #fff;
...@@ -200,7 +200,7 @@ li.note { ...@@ -200,7 +200,7 @@ li.note {
.browser-alert { .browser-alert {
padding: 10px; padding: 10px;
text-align: center; text-align: center;
background: #C67; background: #c67;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
a { a {
...@@ -271,7 +271,7 @@ img.emoji { ...@@ -271,7 +271,7 @@ img.emoji {
table { table {
td.permission-x { td.permission-x {
background: #D9EDF7 !important; background: #d9edf7 !important;
text-align: center; text-align: center;
} }
} }
...@@ -280,7 +280,7 @@ table { ...@@ -280,7 +280,7 @@ table {
float: left; float: left;
text-align: center; text-align: center;
font-size: 32px; font-size: 32px;
color: #AAA; color: #aaa;
width: 60px; width: 60px;
} }
...@@ -347,7 +347,7 @@ table { ...@@ -347,7 +347,7 @@ table {
.profiler-button, .profiler-button,
.profiler-controls { .profiler-controls {
border-color: #EEE !important; border-color: #eee !important;
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
height: 0; height: 0;
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: $caret-width-base dashed $dropdown-caret-color; border-top: $caret-width-base dashed;
border-right: $caret-width-base solid transparent; border-right: $caret-width-base solid transparent;
border-left: $caret-width-base solid transparent; border-left: $caret-width-base solid transparent;
} }
...@@ -161,9 +161,8 @@ ...@@ -161,9 +161,8 @@
.dropdown-menu-user-full-name { .dropdown-menu-user-full-name {
display: block; display: block;
margin-bottom: 2px;
font-weight: 600; font-weight: 600;
line-height: 1; line-height: 16px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -171,7 +170,7 @@ ...@@ -171,7 +170,7 @@
.dropdown-menu-user-username { .dropdown-menu-user-username {
display: block; display: block;
line-height: 1; line-height: 16px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -261,7 +260,7 @@ ...@@ -261,7 +260,7 @@
position: absolute; position: absolute;
top: 10px; top: 10px;
right: 10px; right: 10px;
color: #C7C7C7; color: #c7c7c7;
font-size: 12px; font-size: 12px;
pointer-events: none; pointer-events: none;
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
right: 15px; right: 15px;
.btn { .btn {
padding: 0px 10px; padding: 0 10px;
font-size: 13px; font-size: 13px;
line-height: 28px; line-height: 28px;
} }
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
&.blob-no-preview { &.blob-no-preview {
background: #eee; background: #eee;
text-shadow: 0 1px 2px #FFF; text-shadow: 0 1px 2px #fff;
padding: 100px 0; padding: 100px 0;
} }
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
} }
td.line-numbers { td.line-numbers {
float: none; float: none;
border-left: 1px solid #DDD; border-left: 1px solid #ddd;
} }
td.lines { td.lines {
padding: 0; padding: 0;
......
...@@ -41,8 +41,8 @@ input[type='search'].search-input { ...@@ -41,8 +41,8 @@ input[type='search'].search-input {
} }
input[type='text'].danger { input[type='text'].danger {
background: #F2DEDE!important; background: #f2dede!important;
border-color: #D66; border-color: #d66;
text-shadow: 0 1px 1px #fff text-shadow: 0 1px 1px #fff
} }
......
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
&:hover { &:hover {
background-color: $color-darker; background-color: $color-darker;
a { a {
color: #FFF; color: #fff;
} }
} }
} }
.collapse-nav a { .collapse-nav a {
color: #FFF; color: #fff;
background: $color; background: $color;
} }
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
&:hover { &:hover {
background-color: $color-dark; background-color: $color-dark;
color: #FFF; color: #fff;
text-decoration: none; text-decoration: none;
} }
} }
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
} }
&.active a { &.active a {
color: #FFF; color: #fff;
background: $color-dark; background: $color-dark;
&.no-highlight { &.no-highlight {
...@@ -79,42 +79,42 @@ ...@@ -79,42 +79,42 @@
} }
i { i {
color: #FFF color: #fff
} }
} }
} }
} }
} }
$theme-blue: #2980B9; $theme-blue: #2980b9;
$theme-charcoal: #333c47; $theme-charcoal: #333c47;
$theme-graphite: #888888; $theme-graphite: #888;
$theme-gray: #373737; $theme-gray: #373737;
$theme-green: #019875; $theme-green: #019875;
$theme-violet: #554488; $theme-violet: #548;
body { body {
&.ui_blue { &.ui_blue {
@include gitlab-theme(#BECDE9, $theme-blue, #1970A9, #096099); @include gitlab-theme(#becde9, $theme-blue, #1970a9, #096099);
} }
&.ui_charcoal { &.ui_charcoal {
@include gitlab-theme(#c5d0de, $theme-charcoal, #2b333d, #24272D); @include gitlab-theme(#c5d0de, $theme-charcoal, #2b333d, #24272d);
} }
&.ui_graphite { &.ui_graphite {
@include gitlab-theme(#CCCCCC, $theme-graphite, #777777, #666666); @include gitlab-theme(#ccc, $theme-graphite, #777, #666);
} }
&.ui_gray { &.ui_gray {
@include gitlab-theme(#979797, $theme-gray, #272727, #222222); @include gitlab-theme(#979797, $theme-gray, #272727, #222);
} }
&.ui_green { &.ui_green {
@include gitlab-theme(#AADDCC, $theme-green, #018865, #017855); @include gitlab-theme(#adc, $theme-green, #018865, #017855);
} }
&.ui_violet { &.ui_violet {
@include gitlab-theme(#9988CC, $theme-violet, #443366, #332255); @include gitlab-theme(#98c, $theme-violet, #436, #325);
} }
} }
\ No newline at end of file
...@@ -7,8 +7,8 @@ header { ...@@ -7,8 +7,8 @@ header {
&.navbar-empty { &.navbar-empty {
height: 58px; height: 58px;
background: #FFF; background: #fff;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #eee;
.center-logo { .center-logo {
margin: 11px 0; margin: 11px 0;
...@@ -28,7 +28,7 @@ header { ...@@ -28,7 +28,7 @@ header {
min-height: $header-height; min-height: $header-height;
background-color: #fff; background-color: #fff;
border: none; border: none;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #eee;
.container-fluid { .container-fluid {
width: 100% !important; width: 100% !important;
...@@ -47,7 +47,7 @@ header { ...@@ -47,7 +47,7 @@ header {
text-align: center; text-align: center;
&:hover, &:focus, &:active { &:hover, &:focus, &:active {
background-color: #FFF; background-color: #fff;
} }
} }
...@@ -59,7 +59,7 @@ header { ...@@ -59,7 +59,7 @@ header {
right: 2px; right: 2px;
&:hover { &:hover {
background-color: #EEE; background-color: #eee;
} }
&.active { &.active {
color: #7f8fa4; color: #7f8fa4;
...@@ -141,22 +141,18 @@ header { ...@@ -141,22 +141,18 @@ header {
margin-left: $sidebar_collapsed_width; margin-left: $sidebar_collapsed_width;
} }
@media (max-width: $screen-md-max) { .header-collapsed {
.header-collapsed {
margin-left: $sidebar_collapsed_width; margin-left: $sidebar_collapsed_width;
}
.header-expanded { @media (min-width: $screen-md-min) {
margin-left: $sidebar_width; @include collapsed-header;
} }
} }
@media(min-width: $screen-md-max) { .header-expanded {
.header-collapsed { margin-left: $sidebar_collapsed_width;
@include collapsed-header;
}
.header-expanded { @media (min-width: $screen-md-min) {
margin-left: $sidebar_width; margin-left: $sidebar_width;
} }
} }
...@@ -166,7 +162,7 @@ header { ...@@ -166,7 +162,7 @@ header {
font-size: 18px; font-size: 18px;
.navbar-nav { .navbar-nav {
margin: 0px; margin: 0;
float: none !important; float: none !important;
.visible-xs, .visable-sm { .visible-xs, .visable-sm {
......
.file-content.code { .file-content.code {
border: none; border: none;
box-shadow: none; box-shadow: none;
margin: 0px; margin: 0;
padding: 0px; padding: 0;
table-layout: fixed; table-layout: fixed;
pre { pre {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
display: block; display: block;
float: left; float: left;
margin-right: 10px; margin-right: 10px;
color: #FFF; color: #fff;
font-size: $gl-font-size; font-size: $gl-font-size;
line-height: 25px; line-height: 25px;
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
font-size: $font-size-base; font-size: $font-size-base;
&.ui-datepicker-inline { &.ui-datepicker-inline {
border: 1px solid #DDD; border: 1px solid #ddd;
padding: 10px; padding: 10px;
width: 270px; width: 270px;
.ui-datepicker-header { .ui-datepicker-header {
background: #FFF; background: #fff;
border-color: #DDD; border-color: #ddd;
} }
.ui-datepicker-calendar td a { .ui-datepicker-calendar td a {
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} }
&.ui-autocomplete { &.ui-autocomplete {
border-color: #DDD; border-color: #ddd;
padding: 0; padding: 0;
margin-top: 2px; margin-top: 2px;
z-index: 1001; z-index: 1001;
...@@ -30,20 +30,20 @@ ...@@ -30,20 +30,20 @@
} }
.ui-state-default { .ui-state-default {
border: 1px solid #FFF; border: 1px solid #fff;
background: #FFF; background: #fff;
color: #777; color: #777;
} }
.ui-state-highlight { .ui-state-highlight {
border: 1px solid #EEE; border: 1px solid #eee;
background: #EEE; background: #eee;
} }
.ui-state-active { .ui-state-active {
border: 1px solid $gl-primary; border: 1px solid $gl-primary;
background: $gl-primary; background: $gl-primary;
color: #FFF; color: #fff;
} }
.ui-state-hover, .ui-state-hover,
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
} }
.md-preview-holder { .md-preview-holder {
background: #FFF; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
min-height: 169px; min-height: 169px;
padding: 5px; padding: 5px;
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
.markdown-area { .markdown-area {
@include border-radius(0); @include border-radius(0);
background: #FFF; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
min-height: 140px; min-height: 140px;
max-height: 500px; max-height: 500px;
......
...@@ -41,12 +41,6 @@ ...@@ -41,12 +41,6 @@
transition: $transition; transition: $transition;
} }
@mixin transform($transform) {
-webkit-transform: $transform;
-ms-transform: $transform;
transform: $transform;
}
/** /**
* Prefilled mixins * Prefilled mixins
* Mixins with fixed values * Mixins with fixed values
...@@ -73,17 +67,17 @@ ...@@ -73,17 +67,17 @@
* Base mixin for lists in GitLab * Base mixin for lists in GitLab
*/ */
@mixin basic-list { @mixin basic-list {
margin: 5px 0px; margin: 5px 0;
padding: 0px; padding: 0;
list-style: none; list-style: none;
> li { > li {
@include clearfix; @include clearfix;
padding: 10px 0; padding: 10px 0;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #eee;
display: block; display: block;
margin: 0px; margin: 0;
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
......
...@@ -128,12 +128,12 @@ ...@@ -128,12 +128,12 @@
.show-aside { .show-aside {
display: none; display: none;
position: fixed; position: fixed;
right: 0px; right: 0;
top: 30%; top: 30%;
padding: 5px 15px; padding: 5px 15px;
background: #EEE; background: #eee;
font-size: 20px; font-size: 20px;
color: #777; color: #777;
z-index: 100; z-index: 100;
@include box-shadow(0 1px 2px #DDD); @include box-shadow(0 1px 2px #ddd);
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
} }
&.active a { &.active a {
color: #000000; color: #000;
border-bottom: 2px solid #4688f1; border-bottom: 2px solid #4688f1;
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
.top-area { .top-area {
@include clearfix; @include clearfix;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #eee;
.nav-text { .nav-text {
padding-top: 16px; padding-top: 16px;
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
.nav-links { .nav-links {
display: inline-block; display: inline-block;
width: 50%; width: 50%;
margin-bottom: 0px; margin-bottom: 0;
border-bottom: none; border-bottom: none;
/* Small devices (phones, tablets, 768px and lower) */ /* Small devices (phones, tablets, 768px and lower) */
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
float: right; float: right;
text-align: right; text-align: right;
padding: 11px 0; padding: 11px 0;
margin-bottom: 0px; margin-bottom: 0;
> .dropdown { > .dropdown {
margin-right: $gl-padding-top; margin-right: $gl-padding-top;
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
padding: 2px 25px 2px 5px; padding: 2px 25px 2px 5px;
background: #fff image-url('select2.png'); background: #fff image-url('select2.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right 0px bottom 6px; background-position: right 0 bottom 6px;
border: 1px solid $input-border; border: 1px solid $input-border;
@include border-radius($border-radius-default); @include border-radius($border-radius-default);
@include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s); @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
.namespace-result { .namespace-result {
.namespace-kind { .namespace-kind {
color: #AAA; color: #aaa;
font-weight: normal; font-weight: normal;
} }
.namespace-path { .namespace-path {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
.gitlab-text-container-link { .gitlab-text-container-link {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
left: 0px; left: 0;
} }
#logo { #logo {
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
} }
.sidebar-wrapper { .sidebar-wrapper {
z-index: 99; z-index: 999;
background: $background-color; background: $background-color;
} }
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
width: 100%; width: 100%;
.container-fluid { .container-fluid {
background: #FFF; background: #fff;
padding: 0 $gl-padding; padding: 0 $gl-padding;
&.container-blank { &.container-blank {
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
} }
&:hover { &:hover {
background-color: #EEE; background-color: #eee;
} }
} }
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
overflow: hidden; overflow: hidden;
&.navbar-collapse { &.navbar-collapse {
padding: 0px !important; padding: 0 !important;
} }
li { li {
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
.count { .count {
float: right; float: right;
background: #eee; background: #eee;
padding: 0px 8px; padding: 0 8px;
@include border-radius(6px); @include border-radius(6px);
} }
...@@ -194,8 +194,8 @@ ...@@ -194,8 +194,8 @@
} }
.sidebar-subnav { .sidebar-subnav {
margin-left: 0px; margin-left: 0;
padding-left: 0px; padding-left: 0;
li { li {
list-style: none; list-style: none;
...@@ -203,7 +203,11 @@ ...@@ -203,7 +203,11 @@
} }
@mixin expanded-sidebar { @mixin expanded-sidebar {
padding-left: $sidebar_collapsed_width;
@media (min-width: $screen-md-min) {
padding-left: $sidebar_width; padding-left: $sidebar_width;
}
&.right-sidebar-collapsed { &.right-sidebar-collapsed {
/* Extra small devices (phones, less than 768px) */ /* Extra small devices (phones, less than 768px) */
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
} }
&.label-inverse { &.label-inverse {
background-color: #333333; background-color: #333;
} }
} }
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
} }
.btn-clipboard { .btn-clipboard {
min-width: 0px; min-width: 0;
} }
} }
......
...@@ -57,7 +57,7 @@ $component-active-bg: $brand-info; ...@@ -57,7 +57,7 @@ $component-active-bg: $brand-info;
$input-color: $text-color; $input-color: $text-color;
$input-border: #e7e9ed; $input-border: #e7e9ed;
$input-border-focus: #7F8FA4; $input-border-focus: #7f8fa4;
$legend-color: $text-color; $legend-color: $text-color;
...@@ -125,8 +125,8 @@ $panel-inner-border: $border-color; ...@@ -125,8 +125,8 @@ $panel-inner-border: $border-color;
// //
//## //##
$well-bg: #F9F9F9; $well-bg: #f9f9f9;
$well-border: #EEE; $well-border: #eee;
//== Code //== Code
// //
......
...@@ -27,13 +27,13 @@ ...@@ -27,13 +27,13 @@
line-height: 10px; line-height: 10px;
color: #555; color: #555;
vertical-align: middle; vertical-align: middle;
background-color: #FCFCFC; background-color: #fcfcfc;
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-color: #CCC #CCC #BBB; border-color: #ccc #ccc #bbb;
border-image: none; border-image: none;
border-radius: 3px; border-radius: 3px;
box-shadow: 0px -1px 0px #BBB inset; box-shadow: 0 -1px 0 #bbb inset;
} }
h1 { h1 {
...@@ -187,7 +187,7 @@ body { ...@@ -187,7 +187,7 @@ body {
} }
.page-title-empty { .page-title-empty {
margin-top: 0px; margin-top: 0;
line-height: 1.3; line-height: 1.3;
font-size: 1.25em; font-size: 1.25em;
font-weight: 600; font-weight: 600;
......
$row-hover: #f4f8fe; $row-hover: #f4f8fe;
$gl-text-color: #54565B; $gl-text-color: #54565b;
$gl-text-green: #4A2; $gl-text-green: #4a2;
$gl-text-red: #D12F19; $gl-text-red: #d12f19;
$gl-text-orange: #D90; $gl-text-orange: #d90;
$gl-header-color: #323232; $gl-header-color: #323232;
$gl-link-color: #333c48; $gl-link-color: #333c48;
$md-text-color: #444; $md-text-color: #444;
...@@ -30,24 +30,24 @@ $gl-vert-padding: 6px; ...@@ -30,24 +30,24 @@ $gl-vert-padding: 6px;
$gl-padding-top:10px; $gl-padding-top:10px;
$gl-avatar-size: 40px; $gl-avatar-size: 40px;
$secondary-text: #7f8fa4; $secondary-text: #7f8fa4;
$error-exclamation-point: #E62958; $error-exclamation-point: #e62958;
$border-radius-default: 3px; $border-radius-default: 3px;
$list-title-color: #333333; $list-title-color: #333;
$list-text-color: #555555; $list-text-color: #555;
$btn-transparent-color: #8F8F8F; $btn-transparent-color: #8f8f8f;
$ssh-key-icon-color: #8F8F8F; $ssh-key-icon-color: #8f8f8f;
$ssh-key-icon-size: 18px; $ssh-key-icon-size: 18px;
$provider-btn-group-border: #E5E5E5; $provider-btn-group-border: #e5e5e5;
$provider-btn-not-active-color: #4688F1; $provider-btn-not-active-color: #4688f1;
/* /*
* Color schema * Color schema
*/ */
$white-light: #FFFFFF; $white-light: #fff;
$white-normal: #ededed; $white-normal: #ededed;
$white-dark: #ededed; $white-dark: #ededed;
...@@ -57,51 +57,55 @@ $gray-dark: #ededed; ...@@ -57,51 +57,55 @@ $gray-dark: #ededed;
$gray-darkest: #c9c9c9; $gray-darkest: #c9c9c9;
$green-light: #38ae67; $green-light: #38ae67;
$green-normal: #2FAA60; $green-normal: #2faa60;
$green-dark: #2CA05B; $green-dark: #2ca05b;
$blue-light: #2EA8E5; $blue-light: #2ea8e5;
$blue-normal: #2D9FD8; $blue-normal: #2d9fd8;
$blue-dark: #2897CE; $blue-dark: #2897ce;
$blue-medium-light: #3498CB; $blue-medium-light: #3498cb;
$blue-medium: #2F8EBF; $blue-medium: #2f8ebf;
$blue-medium-dark: #2D86B4; $blue-medium-dark: #2d86b4;
$orange-light: rgba(252, 109, 38, 0.80); $orange-light: rgba(252, 109, 38, 0.80);
$orange-normal: #E75E40; $orange-normal: #e75e40;
$orange-dark: #CE5237; $orange-dark: #ce5237;
$red-light: #F06559; $red-light: #f06559;
$red-normal: #E52C5A; $red-normal: #e52c5a;
$red-dark: #D22852; $red-dark: #d22852;
$border-white-light: #F1F2F4; $border-white-light: #f1f2f4;
$border-white-normal: #D6DAE2; $border-white-normal: #d6dae2;
$border-white-dark: #C6CACF; $border-white-dark: #c6cacf;
$border-gray-light: rgba(0, 0, 0, 0.06); $border-gray-light: rgba(0, 0, 0, 0.06);
$border-gray-normal: rgba(0, 0, 0, 0.10);; $border-gray-normal: rgba(0, 0, 0, 0.10);;
$border-gray-dark: #C6CACF; $border-gray-dark: #c6cacf;
$border-green-light: #2FAA60; $border-green-light: #2faa60;
$border-green-normal: #2CA05B; $border-green-normal: #2ca05b;
$border-green-dark: #279654; $border-green-dark: #279654;
$border-blue-light: #2D9FD8; $border-blue-light: #2d9fd8;
$border-blue-normal: #2897CE; $border-blue-normal: #2897ce;
$border-blue-dark: #258DC1; $border-blue-dark: #258dc1;
$border-orange-light: #fc6d26; $border-orange-light: #fc6d26;
$border-orange-normal: #CE5237; $border-orange-normal: #ce5237;
$border-orange-dark: #C14E35; $border-orange-dark: #c14e35;
$border-red-light: #F24F41; $border-red-light: #f24f41;
$border-red-normal: #D22852; $border-red-normal: #d22852;
$border-red-dark: #CA264F; $border-red-dark: #ca264f;
$help-well-bg: #FAFAFA; $help-well-bg: #fafafa;
$help-well-border: #E5E5E5; $help-well-border: #e5e5e5;
$warning-message-bg: #fbf2d9;
$warning-message-color: #9e8e60;
$warning-message-border: #f0e2bb;
/* header */ /* header */
$light-grey-header: #faf9f9; $light-grey-header: #faf9f9;
...@@ -139,23 +143,22 @@ $dropdown-border-color: rgba(#000, .1); ...@@ -139,23 +143,22 @@ $dropdown-border-color: rgba(#000, .1);
$dropdown-shadow-color: rgba(#000, .1); $dropdown-shadow-color: rgba(#000, .1);
$dropdown-divider-color: rgba(#000, .1); $dropdown-divider-color: rgba(#000, .1);
$dropdown-header-color: #959494; $dropdown-header-color: #959494;
$dropdown-caret-color: #54565B; $dropdown-title-btn-color: #bfbfbf;
$dropdown-title-btn-color: #BFBFBF; $dropdown-input-color: #c7c7c7;
$dropdown-input-color: #C7C7C7;
$dropdown-input-focus-border: rgb(58, 171, 240); $dropdown-input-focus-border: rgb(58, 171, 240);
$dropdown-input-focus-shadow: rgba(#000, .2); $dropdown-input-focus-shadow: rgba(#000, .2);
$dropdown-loading-bg: rgba(#fff, .6); $dropdown-loading-bg: rgba(#fff, .6);
$dropdown-toggle-bg: #fff; $dropdown-toggle-bg: #fff;
$dropdown-toggle-color: #626262; $dropdown-toggle-color: #626262;
$dropdown-toggle-border-color: #EAEAEA; $dropdown-toggle-border-color: #eaeaea;
$dropdown-toggle-hover-border-color: darken($dropdown-toggle-border-color, 15%); $dropdown-toggle-hover-border-color: darken($dropdown-toggle-border-color, 15%);
$dropdown-toggle-icon-color: #C4C4C4; $dropdown-toggle-icon-color: #c4c4c4;
$dropdown-toggle-hover-icon-color: $dropdown-toggle-hover-border-color; $dropdown-toggle-hover-icon-color: $dropdown-toggle-hover-border-color;
/* /*
* Award emoji * Award emoji
*/ */
$award-emoji-menu-bg: #FFF; $award-emoji-menu-bg: #fff;
$award-emoji-menu-border: #F1F2F4; $award-emoji-menu-border: #f1f2f4;
$award-emoji-new-btn-icon-color: #DCDCDC; $award-emoji-new-btn-icon-color: #dcdcdc;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
a.js-zen-enter { a.js-zen-enter {
color: $gl-gray; color: $gl-gray;
position: absolute; position: absolute;
top: 0px; top: 0;
right: 4px; right: 4px;
line-height: 56px; line-height: 56px;
} }
......
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
// Search result highlight // Search result highlight
span.highlight_word { span.highlight_word {
background-color: #ffe792 !important; background-color: #ffe792 !important;
color: #000000 !important; color: #000 !important;
} }
.hll { background-color: #373b41 } .hll { background-color: #373b41 }
.c { color: #969896 } /* Comment */ .c { color: #969896 } /* Comment */
.err { color: #cc6666 } /* Error */ .err { color: #c66 } /* Error */
.k { color: #b294bb } /* Keyword */ .k { color: #b294bb } /* Keyword */
.l { color: #de935f } /* Literal */ .l { color: #de935f } /* Literal */
.n { color: #c5c8c6 } /* Name */ .n { color: #c5c8c6 } /* Name */
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
.cp { color: #969896 } /* Comment.Preproc */ .cp { color: #969896 } /* Comment.Preproc */
.c1 { color: #969896 } /* Comment.Single */ .c1 { color: #969896 } /* Comment.Single */
.cs { color: #969896 } /* Comment.Special */ .cs { color: #969896 } /* Comment.Special */
.gd { color: #cc6666 } /* Generic.Deleted */ .gd { color: #c66 } /* Generic.Deleted */
.ge { font-style: italic } /* Generic.Emph */ .ge { font-style: italic } /* Generic.Emph */
.gh { color: #c5c8c6; font-weight: bold } /* Generic.Heading */ .gh { color: #c5c8c6; font-weight: bold } /* Generic.Heading */
.gi { color: #b5bd68 } /* Generic.Inserted */ .gi { color: #b5bd68 } /* Generic.Inserted */
...@@ -77,17 +77,17 @@ ...@@ -77,17 +77,17 @@
.na { color: #81a2be } /* Name.Attribute */ .na { color: #81a2be } /* Name.Attribute */
.nb { color: #c5c8c6 } /* Name.Builtin */ .nb { color: #c5c8c6 } /* Name.Builtin */
.nc { color: #f0c674 } /* Name.Class */ .nc { color: #f0c674 } /* Name.Class */
.no { color: #cc6666 } /* Name.Constant */ .no { color: #c66 } /* Name.Constant */
.nd { color: #8abeb7 } /* Name.Decorator */ .nd { color: #8abeb7 } /* Name.Decorator */
.ni { color: #c5c8c6 } /* Name.Entity */ .ni { color: #c5c8c6 } /* Name.Entity */
.ne { color: #cc6666 } /* Name.Exception */ .ne { color: #c66 } /* Name.Exception */
.nf { color: #81a2be } /* Name.Function */ .nf { color: #81a2be } /* Name.Function */
.nl { color: #c5c8c6 } /* Name.Label */ .nl { color: #c5c8c6 } /* Name.Label */
.nn { color: #f0c674 } /* Name.Namespace */ .nn { color: #f0c674 } /* Name.Namespace */
.nx { color: #81a2be } /* Name.Other */ .nx { color: #81a2be } /* Name.Other */
.py { color: #c5c8c6 } /* Name.Property */ .py { color: #c5c8c6 } /* Name.Property */
.nt { color: #8abeb7 } /* Name.Tag */ .nt { color: #8abeb7 } /* Name.Tag */
.nv { color: #cc6666 } /* Name.Variable */ .nv { color: #c66 } /* Name.Variable */
.ow { color: #8abeb7 } /* Operator.Word */ .ow { color: #8abeb7 } /* Operator.Word */
.w { color: #c5c8c6 } /* Text.Whitespace */ .w { color: #c5c8c6 } /* Text.Whitespace */
.mf { color: #de935f } /* Literal.Number.Float */ .mf { color: #de935f } /* Literal.Number.Float */
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
.s1 { color: #b5bd68 } /* Literal.String.Single */ .s1 { color: #b5bd68 } /* Literal.String.Single */
.ss { color: #b5bd68 } /* Literal.String.Symbol */ .ss { color: #b5bd68 } /* Literal.String.Symbol */
.bp { color: #c5c8c6 } /* Name.Builtin.Pseudo */ .bp { color: #c5c8c6 } /* Name.Builtin.Pseudo */
.vc { color: #cc6666 } /* Name.Variable.Class */ .vc { color: #c66 } /* Name.Variable.Class */
.vg { color: #cc6666 } /* Name.Variable.Global */ .vg { color: #c66 } /* Name.Variable.Global */
.vi { color: #cc6666 } /* Name.Variable.Instance */ .vi { color: #c66 } /* Name.Variable.Instance */
.il { color: #de935f } /* Literal.Number.Integer.Long */ .il { color: #de935f } /* Literal.Number.Integer.Long */
} }
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
// Search result highlight // Search result highlight
span.highlight_word { span.highlight_word {
background-color: #ffe792 !important; background-color: #ffe792 !important;
color: #000000 !important; color: #000 !important;
} }
.hll { background-color: #49483e } .hll { background-color: #49483e }
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
.m { color: #2aa198 } /* Literal.Number */ .m { color: #2aa198 } /* Literal.Number */
.s { color: #2aa198 } /* Literal.String */ .s { color: #2aa198 } /* Literal.String */
.na { color: #93a1a1 } /* Name.Attribute */ .na { color: #93a1a1 } /* Name.Attribute */
.nb { color: #B58900 } /* Name.Builtin */ .nb { color: #b58900 } /* Name.Builtin */
.nc { color: #268bd2 } /* Name.Class */ .nc { color: #268bd2 } /* Name.Class */
.no { color: #cb4b16 } /* Name.Constant */ .no { color: #cb4b16 } /* Name.Constant */
.nd { color: #268bd2 } /* Name.Decorator */ .nd { color: #268bd2 } /* Name.Decorator */
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
.m { color: #2aa198 } /* Literal.Number */ .m { color: #2aa198 } /* Literal.Number */
.s { color: #2aa198 } /* Literal.String */ .s { color: #2aa198 } /* Literal.String */
.na { color: #586e75 } /* Name.Attribute */ .na { color: #586e75 } /* Name.Attribute */
.nb { color: #B58900 } /* Name.Builtin */ .nb { color: #b58900 } /* Name.Builtin */
.nc { color: #268bd2 } /* Name.Class */ .nc { color: #268bd2 } /* Name.Class */
.no { color: #cb4b16 } /* Name.Constant */ .no { color: #cb4b16 } /* Name.Constant */
.nd { color: #268bd2 } /* Name.Decorator */ .nd { color: #268bd2 } /* Name.Decorator */
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.line_holder { .line_holder {
.diff-line-num { .diff-line-num {
&.old { &.old {
background: #ffdddd; background: #fdd;
border-color: #f1c0c0; border-color: #f1c0c0;
} }
...@@ -68,66 +68,66 @@ ...@@ -68,66 +68,66 @@
} }
.hll { background-color: #f8f8f8 } .hll { background-color: #f8f8f8 }
.c { color: #999988; font-style: italic; } .c { color: #998; font-style: italic; }
.err { color: #a61717; background-color: #e3d2d2; } .err { color: #a61717; background-color: #e3d2d2; }
.k { font-weight: bold; } .k { font-weight: bold; }
.o { font-weight: bold; } .o { font-weight: bold; }
.cm { color: #999988; font-style: italic; } .cm { color: #998; font-style: italic; }
.cp { color: #999999; font-weight: bold; } .cp { color: #999; font-weight: bold; }
.c1 { color: #999988; font-style: italic; } .c1 { color: #998; font-style: italic; }
.cs { color: #999999; font-weight: bold; font-style: italic; } .cs { color: #999; font-weight: bold; font-style: italic; }
.gd { color: #000000; background-color: #ffdddd; } .gd { color: #000; background-color: #fdd; }
.gd .x { color: #000000; background-color: #ffaaaa; } .gd .x { color: #000; background-color: #faa; }
.ge { font-style: italic; } .ge { font-style: italic; }
.gr { color: #aa0000; } .gr { color: #a00; }
.gh { color: #999999; } .gh { color: #999; }
.gi { color: #000000; background-color: #ddffdd; } .gi { color: #000; background-color: #dfd; }
.gi .x { color: #000000; background-color: #aaffaa; } .gi .x { color: #000; background-color: #afa; }
.go { color: #888888; } .go { color: #888; }
.gp { color: #555555; } .gp { color: #555; }
.gs { font-weight: bold; } .gs { font-weight: bold; }
.gu { color: #800080; font-weight: bold; } .gu { color: #800080; font-weight: bold; }
.gt { color: #aa0000; } .gt { color: #a00; }
.kc { font-weight: bold; } .kc { font-weight: bold; }
.kd { font-weight: bold; } .kd { font-weight: bold; }
.kn { font-weight: bold; } .kn { font-weight: bold; }
.kp { font-weight: bold; } .kp { font-weight: bold; }
.kr { font-weight: bold; } .kr { font-weight: bold; }
.kt { color: #445588; font-weight: bold; } .kt { color: #458; font-weight: bold; }
.m { color: #009999; } .m { color: #099; }
.s { color: #dd1144; } .s { color: #d14; }
.n { color: #333333; } .n { color: #333; }
.na { color: teal; } .na { color: teal; }
.nb { color: #0086b3; } .nb { color: #0086b3; }
.nc { color: #445588; font-weight: bold; } .nc { color: #458; font-weight: bold; }
.no { color: teal; } .no { color: teal; }
.ni { color: purple; } .ni { color: purple; }
.ne { color: #990000; font-weight: bold; } .ne { color: #900; font-weight: bold; }
.nf { color: #990000; font-weight: bold; } .nf { color: #900; font-weight: bold; }
.nn { color: #555555; } .nn { color: #555; }
.nt { color: navy; } .nt { color: navy; }
.nv { color: teal; } .nv { color: teal; }
.ow { font-weight: bold; } .ow { font-weight: bold; }
.w { color: #bbbbbb; } .w { color: #bbb; }
.mf { color: #009999; } .mf { color: #099; }
.mh { color: #009999; } .mh { color: #099; }
.mi { color: #009999; } .mi { color: #099; }
.mo { color: #009999; } .mo { color: #099; }
.sb { color: #dd1144; } .sb { color: #d14; }
.sc { color: #dd1144; } .sc { color: #d14; }
.sd { color: #dd1144; } .sd { color: #d14; }
.s2 { color: #dd1144; } .s2 { color: #d14; }
.se { color: #dd1144; } .se { color: #d14; }
.sh { color: #dd1144; } .sh { color: #d14; }
.si { color: #dd1144; } .si { color: #d14; }
.sx { color: #dd1144; } .sx { color: #d14; }
.sr { color: #009926; } .sr { color: #009926; }
.s1 { color: #dd1144; } .s1 { color: #d14; }
.ss { color: #990073; } .ss { color: #990073; }
.bp { color: #999999; } .bp { color: #999; }
.vc { color: teal; } .vc { color: teal; }
.vg { color: teal; } .vg { color: teal; }
.vi { color: teal; } .vi { color: teal; }
.il { color: #009999; } .il { color: #099; }
.gc { color: #999; background-color: #EAF2F5; } .gc { color: #999; background-color: #eaf2f5; }
} }
.build-page { .build-page {
pre.trace { pre.trace {
background: #111111; background: #111;
color: #fff; color: #fff;
font-family: $monospace_font; font-family: $monospace_font;
white-space: pre; white-space: pre;
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
padding: 10px 0; padding: 10px 0;
li { li {
padding: 3px 0px; padding: 3px 0;
line-height: 20px; line-height: 20px;
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.lists-separator { .lists-separator {
margin: 10px 0; margin: 10px 0;
border-color: #DDD; border-color: #ddd;
} }
.commits-row { .commits-row {
...@@ -76,7 +76,7 @@ li.commit { ...@@ -76,7 +76,7 @@ li.commit {
.commit-row-description { .commit-row-description {
font-size: 14px; font-size: 14px;
border-left: 1px solid #EEE; border-left: 1px solid #eee;
padding: 10px 15px; padding: 10px 15px;
margin: 5px 0 10px 5px; margin: 5px 0 10px 5px;
background: #f9f9f9; background: #f9f9f9;
...@@ -152,7 +152,7 @@ li.commit { ...@@ -152,7 +152,7 @@ li.commit {
.count { .count {
padding-top: 6px; padding-top: 6px;
padding-bottom: 0px; padding-bottom: 0;
font-size: 12px; font-size: 12px;
color: #333; color: #333;
display: block; display: block;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
.diff-content { .diff-content {
overflow: auto; overflow: auto;
overflow-y: hidden; overflow-y: hidden;
background: #FFF; background: #fff;
color: #333; color: #333;
.unfold { .unfold {
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
font-family: $monospace_font; font-family: $monospace_font;
border: none; border: none;
border-collapse: separate; border-collapse: separate;
margin: 0px; margin: 0;
padding: 0px; padding: 0;
.line_holder td { .line_holder td {
line-height: $code_line_height; line-height: $code_line_height;
font-size: $code_font_size; font-size: $code_font_size;
...@@ -76,10 +76,10 @@ ...@@ -76,10 +76,10 @@
} }
.old_line, .new_line { .old_line, .new_line {
margin: 0px; margin: 0;
padding: 0px; padding: 0;
border: none; border: none;
padding: 0px 5px; padding: 0 5px;
border-right: 1px solid; border-right: 1px solid;
text-align: right; text-align: right;
min-width: 35px; min-width: 35px;
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
} }
.line_content { .line_content {
display: block; display: block;
margin: 0px; margin: 0;
padding: 0px 0.5em; padding: 0 0.5em;
border: none; border: none;
&.parallel { &.parallel {
display: table-cell; display: table-cell;
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
background-color: #fff; background-color: #fff;
line-height: 0; line-height: 0;
img { img {
border: 1px solid #FFF; border: 1px solid #fff;
background: image-url('trans_bg.gif'); background: image-url('trans_bg.gif');
max-width: 100%; max-width: 100%;
} }
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
height: 14px; height: 14px;
width: 15px; width: 15px;
position: absolute; position: absolute;
top: 0px; top: 0;
background: image-url('swipemode_sprites.gif') 0 3px no-repeat; background: image-url('swipemode_sprites.gif') 0 3px no-repeat;
} }
.bottom-handle { .bottom-handle {
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
height: 14px; height: 14px;
width: 15px; width: 15px;
position: absolute; position: absolute;
bottom: 0px; bottom: 0;
background: image-url('swipemode_sprites.gif') 0 -11px no-repeat; background: image-url('swipemode_sprites.gif') 0 -11px no-repeat;
} }
} }
...@@ -206,8 +206,8 @@ ...@@ -206,8 +206,8 @@
.frame.added, .frame.deleted { .frame.added, .frame.deleted {
position: absolute; position: absolute;
display: block; display: block;
top: 0px; top: 0;
left: 0px; left: 0;
} }
.controls { .controls {
display: block; display: block;
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
width: 300px; width: 300px;
z-index: 100; z-index: 100;
position: absolute; position: absolute;
bottom: 0px; bottom: 0;
left: 50%; left: 50%;
margin-left: -150px; margin-left: -150px;
...@@ -231,11 +231,11 @@ ...@@ -231,11 +231,11 @@
.dragger { .dragger {
display: block; display: block;
position: absolute; position: absolute;
left: 0px; left: 0;
top: 0px; top: 0;
height: 14px; height: 14px;
width: 14px; width: 14px;
background: image-url('onion_skin_sprites.gif') 0px -34px repeat-x; background: image-url('onion_skin_sprites.gif') 0 -34px repeat-x;
cursor: pointer; cursor: pointer;
} }
...@@ -243,17 +243,17 @@ ...@@ -243,17 +243,17 @@
display: block; display: block;
position: absolute; position: absolute;
top: 2px; top: 2px;
right: 0px; right: 0;
height: 10px; height: 10px;
width: 10px; width: 10px;
background: image-url('onion_skin_sprites.gif') -2px 0px no-repeat; background: image-url('onion_skin_sprites.gif') -2px 0 no-repeat;
} }
.opaque { .opaque {
display: block; display: block;
position: absolute; position: absolute;
top: 2px; top: 2px;
left: 0px; left: 0;
height: 10px; height: 10px;
width: 10px; width: 10px;
background: image-url('onion_skin_sprites.gif') -2px -10px no-repeat; background: image-url('onion_skin_sprites.gif') -2px -10px no-repeat;
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
.view-modes { .view-modes {
padding: 10px; padding: 10px;
text-align: center; text-align: center;
background: #EEE; background: #eee;
ul, li { ul, li {
list-style: none; list-style: none;
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
} }
.cancel-btn { .cancel-btn {
color: #B94A48; color: #b94a48;
&:hover { &:hover {
color: #B94A48; color: #b94a48;
} }
} }
......
This diff is collapsed.
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
.note-image-attach { .note-image-attach {
margin-top: 4px; margin-top: 4px;
margin-left: 0px; margin-left: 0;
max-width: 200px; max-width: 200px;
float: none; float: none;
} }
...@@ -83,10 +83,10 @@ ...@@ -83,10 +83,10 @@
.event_icon { .event_icon {
position: relative; position: relative;
float: right; float: right;
border: 1px solid #EEE; border: 1px solid #eee;
padding: 5px; padding: 5px;
@include border-radius(5px); @include border-radius(5px);
background: #F9F9F9; background: #f9f9f9;
margin-left: 10px; margin-left: 10px;
top: -6px; top: -6px;
img { img {
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
.event-body { .event-body {
margin: 0; margin: 0;
border-left: 2px solid #DDD; border-left: 2px solid #ddd;
padding-left: 10px; padding-left: 10px;
} }
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
font-size: 14px; font-size: 14px;
padding: 5px; padding: 5px;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
background: #EEE; background: #eee;
} }
.network-graph { .network-graph {
background: #FFF; background: #fff;
height: 500px; height: 500px;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
......
i.icon-gitorious { i.icon-gitorious {
display: inline-block; display: inline-block;
background-position: 0px 0px; background-position: 0 0;
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
padding-bottom: 10px; padding-bottom: 10px;
color: #999999; color: #999;
span { span {
display: block; display: block;
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
} }
i { i {
color: #999999; color: #999;
} }
} }
} }
......
...@@ -68,18 +68,18 @@ form.edit-issue { ...@@ -68,18 +68,18 @@ form.edit-issue {
.merge-request, .merge-request,
.issue { .issue {
&.today { &.today {
background: #EFE; background: #efe;
border-color: #CEC; border-color: #cec;
} }
&.closed { &.closed {
background: #F9F9F9; background: #f9f9f9;
border-color: #E5E5E5; border-color: #e5e5e5;
} }
&.merged { &.merged {
background: #F9F9F9; background: #f9f9f9;
border-color: #E5E5E5; border-color: #e5e5e5;
} }
} }
......
...@@ -41,3 +41,7 @@ ...@@ -41,3 +41,7 @@
.color-label { .color-label {
padding: 3px 4px; padding: 3px 4px;
} }
.label-subscription {
display: inline-block;
}
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.login-box{ .login-box{
background: #fafafa; background: #fafafa;
border-radius: 10px; border-radius: 10px;
box-shadow: 0 0px 2px #CCC; box-shadow: 0 0 2px #ccc;
padding: 15px; padding: 15px;
.login-heading h3 { .login-heading h3 {
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
&.top { &.top {
@include border-radius(5px 5px 0 0); @include border-radius(5px 5px 0 0);
margin-bottom: 0px; margin-bottom: 0;
} }
&.bottom { &.bottom {
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
&.middle { &.middle {
border-top: 0; border-top: 0;
margin-bottom:0px; margin-bottom:0;
@include border-radius(0); @include border-radius(0);
} }
&:active, &:focus { &:active, &:focus {
background-color: #FFF; background-color: #fff;
} }
} }
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
} }
.mr-widget-footer { .mr-widget-footer {
border-top: 1px solid #EEE; border-top: 1px solid #eee;
} }
.ci-coverage { .ci-coverage {
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
margin-bottom: 20px; margin-bottom: 20px;
span { span {
color: #B2B2B2; color: #b2b2b2;
a { a {
color: $md-link-color; color: $md-link-color;
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
.comment-hints { .comment-hints {
color: #999; color: #999;
background: #FFF; background: #fff;
padding: 7px; padding: 7px;
margin-top: -7px; margin-top: -7px;
border: 1px solid $border-color; border: 1px solid $border-color;
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
ul.notes { ul.notes {
display: block; display: block;
list-style: none; list-style: none;
margin: 0px; margin: 0;
padding: 0px; padding: 0;
.timeline-icon { .timeline-icon {
float: left; float: left;
...@@ -30,7 +30,7 @@ ul.notes { ...@@ -30,7 +30,7 @@ ul.notes {
font-size: 14px; font-size: 14px;
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
background: #FDFDFD; background: #fdfdfd;
.timeline-icon { .timeline-icon {
.avatar { .avatar {
...@@ -129,7 +129,7 @@ ul.notes { ...@@ -129,7 +129,7 @@ ul.notes {
hr { hr {
// Darken 'whitesmoke' a bit to make it more visible in note bodies // Darken 'whitesmoke' a bit to make it more visible in note bodies
border-color: darken(#F5F5F5, 8%); border-color: darken(#f5f5f5, 8%);
margin: 10px 0; margin: 10px 0;
} }
} }
...@@ -166,7 +166,7 @@ ul.notes { ...@@ -166,7 +166,7 @@ ul.notes {
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
padding: 10px 0; padding: 10px 0;
background: #FFF; background: #fff;
color: $text-color; color: $text-color;
} }
&.notes_line2 { &.notes_line2 {
...@@ -232,7 +232,7 @@ ul.notes { ...@@ -232,7 +232,7 @@ ul.notes {
.add-diff-note { .add-diff-note {
margin-top: -4px; margin-top: -4px;
@include border-radius(40px); @include border-radius(40px);
background: #FFF; background: #fff;
padding: 4px; padding: 4px;
font-size: 16px; font-size: 16px;
color: $gl-link-color; color: $gl-link-color;
...@@ -249,7 +249,7 @@ ul.notes { ...@@ -249,7 +249,7 @@ ul.notes {
&:hover { &:hover {
background: $gl-info; background: $gl-info;
color: #FFF; color: #fff;
@include show-add-diff-note; @include show-add-diff-note;
} }
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.btn { .btn {
line-height: 40px; line-height: 40px;
height: 42px; height: 42px;
padding: 0px 12px; padding: 0 12px;
img { img {
width: 32px; width: 32px;
...@@ -109,42 +109,6 @@ ...@@ -109,42 +109,6 @@
} }
} }
.modal-profile-crop {
.modal-dialog {
width: 500px;
}
.modal-body {
p {
display: table;
margin: auto;
overflow: hidden;
}
img {
display: block;
max-width: 400px;
max-height: 400px;
}
.cropper-bg {
background: none;
}
.cropper-crop-box {
box-sizing: content-box;
border: 999px solid transparentize(#ccc, 0.5);
@include transform(translate(-999px, -999px));
}
}
}
@media (max-width: 520px) {
.modal-profile-crop .modal-dialog {
width: auto;
}
}
.key-list-item { .key-list-item {
.key-list-item-info { .key-list-item-info {
@media (min-width: $screen-sm-min) { @media (min-width: $screen-sm-min) {
...@@ -215,3 +179,21 @@ ...@@ -215,3 +179,21 @@
color: $provider-btn-not-active-color; color: $provider-btn-not-active-color;
} }
} }
.profile-settings-message {
line-height: 32px;
color: $warning-message-color;
background-color: $warning-message-bg;
border: 1px solid $warning-message-border;
border-radius: $border-radius-base;
}
.oauth-applications {
form {
display: inline-block;
}
.last-heading {
width: 105px;
}
}
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
.project-repo-buttons { .project-repo-buttons {
margin-top: 20px; margin-top: 20px;
margin-bottom: 0px; margin-bottom: 0;
.count-buttons { .count-buttons {
display: block; display: block;
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
left: 1px; left: 1px;
margin-top: -9px; margin-top: -9px;
border-width: 10px 7px 10px 0; border-width: 10px 7px 10px 0;
border-right-color: #FFF; border-right-color: #fff;
} }
} }
.count { .count {
...@@ -162,10 +162,10 @@ ...@@ -162,10 +162,10 @@
cursor: pointer; cursor: pointer;
background-image: none; background-image: none;
white-space: nowrap; white-space: nowrap;
margin: 0 11px 0px 4px; margin: 0 11px 0 4px;
&:hover { &:hover {
background: #FFF; background: #fff;
} }
} }
} }
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
} }
.project_member_row form { .project_member_row form {
margin: 0px; margin: 0;
} }
.transfer-project .select2-container { .transfer-project .select2-container {
...@@ -462,7 +462,7 @@ pre.light-well { ...@@ -462,7 +462,7 @@ pre.light-well {
.form-control { .form-control {
@extend .monospace; @extend .monospace;
background: #FFF; background: #fff;
font-size: 14px; font-size: 14px;
margin-left: -1px; margin-left: -1px;
cursor: auto; cursor: auto;
...@@ -472,16 +472,16 @@ pre.light-well { ...@@ -472,16 +472,16 @@ pre.light-well {
.cannot-be-merged, .cannot-be-merged,
.cannot-be-merged:hover { .cannot-be-merged:hover {
color: #E62958; color: #e62958;
margin-top: 2px; margin-top: 2px;
} }
.private-forks-notice .private-fork-icon { .private-forks-notice .private-fork-icon {
i:nth-child(1) { i:nth-child(1) {
color: #2AA056; color: #2aa056;
} }
i:nth-child(2) { i:nth-child(2) {
color: #FFFFFF; color: #fff;
} }
} }
.runner-state { .runner-state {
padding: 6px 12px; padding: 6px 12px;
margin-right: 10px; margin-right: 10px;
color: #FFF; color: #fff;
&.runner-state-shared { &.runner-state-shared {
background: #32b186; background: #32b186;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
margin-bottom: 20px; margin-bottom: 20px;
input { input {
border-color: #BBB; border-color: #bbb;
font-weight: bold; font-weight: bold;
} }
} }
......
...@@ -13,13 +13,13 @@ table .sherlock-code { ...@@ -13,13 +13,13 @@ table .sherlock-code {
} }
.sherlock-line-samples-table { .sherlock-line-samples-table {
margin-bottom: 0px !important; margin-bottom: 0 !important;
thead tr th, thead tr th,
tbody tr td { tbody tr td {
font-size: 13px !important; font-size: 13px !important;
text-align: right; text-align: right;
padding: 0px 10px !important; padding: 0 10px !important;
} }
} }
......
.ci-status { .ci-status {
padding: 2px 7px; padding: 2px 7px;
margin-right: 5px; margin-right: 5px;
border: 1px solid #EEE; border: 1px solid #eee;
white-space: nowrap; white-space: nowrap;
@include border-radius(4px); @include border-radius(4px);
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
.note-image-attach { .note-image-attach {
margin-top: 4px; margin-top: 4px;
margin-left: 0px; margin-left: 0;
max-width: 200px; max-width: 200px;
float: none; float: none;
} }
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
.todo-body { .todo-body {
margin: 0; margin: 0;
border-left: 2px solid #DDD; border-left: 2px solid #ddd;
padding-left: 10px; padding-left: 10px;
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.example { .example {
&:before { &:before {
content: "Example"; content: "Example";
color: #BBB; color: #bbb;
} }
padding: 15px; padding: 15px;
......
...@@ -2,23 +2,23 @@ ...@@ -2,23 +2,23 @@
// color codes are based on http://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg // color codes are based on http://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg
// see also: https://gist.github.com/jasonm23/2868981 // see also: https://gist.github.com/jasonm23/2868981
$black: #000000; $black: #000;
$red: #cd0000; $red: #cd0000;
$green: #00cd00; $green: #00cd00;
$yellow: #cdcd00; $yellow: #cdcd00;
$blue: #0000ee; // according to wikipedia, this is the xterm standard $blue: #00e; // according to wikipedia, this is the xterm standard
//$blue: #1e90ff; // this is used by all the terminals I tried (when configured with the xterm color profile) //$blue: #1e90ff; // this is used by all the terminals I tried (when configured with the xterm color profile)
$magenta: #cd00cd; $magenta: #cd00cd;
$cyan: #00cdcd; $cyan: #00cdcd;
$white: #e5e5e5; $white: #e5e5e5;
$l-black: #7f7f7f; $l-black: #7f7f7f;
$l-red: #ff0000; $l-red: #f00;
$l-green: #00ff00; $l-green: #0f0;
$l-yellow: #ffff00; $l-yellow: #ff0;
$l-blue: #5c5cff; $l-blue: #5c5cff;
$l-magenta: #ff00ff; $l-magenta: #f0f;
$l-cyan: #00ffff; $l-cyan: #0ff;
$l-white: #ffffff; $l-white: #fff;
.term-bold { .term-bold {
font-weight: bold; font-weight: bold;
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
.xterm-fg-0 { .xterm-fg-0 {
color: #000000; color: #000;
} }
.xterm-fg-1 { .xterm-fg-1 {
color: #800000; color: #800000;
...@@ -163,28 +163,28 @@ ...@@ -163,28 +163,28 @@
color: #808080; color: #808080;
} }
.xterm-fg-9 { .xterm-fg-9 {
color: #ff0000; color: #f00;
} }
.xterm-fg-10 { .xterm-fg-10 {
color: #00ff00; color: #0f0;
} }
.xterm-fg-11 { .xterm-fg-11 {
color: #ffff00; color: #ff0;
} }
.xterm-fg-12 { .xterm-fg-12 {
color: #0000ff; color: #00f;
} }
.xterm-fg-13 { .xterm-fg-13 {
color: #ff00ff; color: #f0f;
} }
.xterm-fg-14 { .xterm-fg-14 {
color: #00ffff; color: #0ff;
} }
.xterm-fg-15 { .xterm-fg-15 {
color: #ffffff; color: #fff;
} }
.xterm-fg-16 { .xterm-fg-16 {
color: #000000; color: #000;
} }
.xterm-fg-17 { .xterm-fg-17 {
color: #00005f; color: #00005f;
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
color: #0000d7; color: #0000d7;
} }
.xterm-fg-21 { .xterm-fg-21 {
color: #0000ff; color: #00f;
} }
.xterm-fg-22 { .xterm-fg-22 {
color: #005f00; color: #005f00;
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
color: #00d7ff; color: #00d7ff;
} }
.xterm-fg-46 { .xterm-fg-46 {
color: #00ff00; color: #0f0;
} }
.xterm-fg-47 { .xterm-fg-47 {
color: #00ff5f; color: #00ff5f;
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
color: #00ffd7; color: #00ffd7;
} }
.xterm-fg-51 { .xterm-fg-51 {
color: #00ffff; color: #0ff;
} }
.xterm-fg-52 { .xterm-fg-52 {
color: #5f0000; color: #5f0000;
...@@ -724,7 +724,7 @@ ...@@ -724,7 +724,7 @@
color: #d7ffff; color: #d7ffff;
} }
.xterm-fg-196 { .xterm-fg-196 {
color: #ff0000; color: #f00;
} }
.xterm-fg-197 { .xterm-fg-197 {
color: #ff005f; color: #ff005f;
...@@ -739,7 +739,7 @@ ...@@ -739,7 +739,7 @@
color: #ff00d7; color: #ff00d7;
} }
.xterm-fg-201 { .xterm-fg-201 {
color: #ff00ff; color: #f0f;
} }
.xterm-fg-202 { .xterm-fg-202 {
color: #ff5f00; color: #ff5f00;
...@@ -814,7 +814,7 @@ ...@@ -814,7 +814,7 @@
color: #ffd7ff; color: #ffd7ff;
} }
.xterm-fg-226 { .xterm-fg-226 {
color: #ffff00; color: #ff0;
} }
.xterm-fg-227 { .xterm-fg-227 {
color: #ffff5f; color: #ffff5f;
...@@ -829,7 +829,7 @@ ...@@ -829,7 +829,7 @@
color: #ffffd7; color: #ffffd7;
} }
.xterm-fg-231 { .xterm-fg-231 {
color: #ffffff; color: #fff;
} }
.xterm-fg-232 { .xterm-fg-232 {
color: #080808; color: #080808;
...@@ -850,7 +850,7 @@ ...@@ -850,7 +850,7 @@
color: #3a3a3a; color: #3a3a3a;
} }
.xterm-fg-238 { .xterm-fg-238 {
color: #444444; color: #444;
} }
.xterm-fg-239 { .xterm-fg-239 {
color: #4e4e4e; color: #4e4e4e;
...@@ -901,6 +901,6 @@ ...@@ -901,6 +901,6 @@
color: #e4e4e4; color: #e4e4e4;
} }
.xterm-fg-255 { .xterm-fg-255 {
color: #eeeeee; color: #eee;
} }
} }
...@@ -6,7 +6,7 @@ class Admin::AbuseReportsController < Admin::ApplicationController ...@@ -6,7 +6,7 @@ class Admin::AbuseReportsController < Admin::ApplicationController
def destroy def destroy
abuse_report = AbuseReport.find(params[:id]) abuse_report = AbuseReport.find(params[:id])
abuse_report.remove_user if params[:remove_user] abuse_report.remove_user(deleted_by: current_user) if params[:remove_user]
abuse_report.destroy abuse_report.destroy
render nothing: true render nothing: true
......
...@@ -119,10 +119,10 @@ class Admin::UsersController < Admin::ApplicationController ...@@ -119,10 +119,10 @@ class Admin::UsersController < Admin::ApplicationController
end end
def destroy def destroy
DeleteUserService.new(current_user).execute(user) DeleteUserWorker.perform_async(current_user.id, user.id)
respond_to do |format| respond_to do |format|
format.html { redirect_to admin_users_path } format.html { redirect_to admin_users_path, notice: "The user is being deleted." }
format.json { head :ok } format.json { head :ok }
end end
end end
......
module ToggleSubscriptionAction
extend ActiveSupport::Concern
def toggle_subscription
return unless current_user
subscribable_resource.toggle_subscription(current_user)
render nothing: true
end
private
def subscribable_resource
raise NotImplementedError
end
end
...@@ -8,7 +8,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController ...@@ -8,7 +8,7 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
layout 'profile' layout 'profile'
def index def index
head :forbidden and return set_index_vars
end end
def create def create
...@@ -20,18 +20,11 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController ...@@ -20,18 +20,11 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create]) flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create])
redirect_to oauth_application_url(@application) redirect_to oauth_application_url(@application)
else else
render :new set_index_vars
render :index
end end
end end
def destroy
if @application.destroy
flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :destroy])
end
redirect_to applications_profile_url
end
private private
def verify_user_oauth_applications_enabled def verify_user_oauth_applications_enabled
...@@ -40,6 +33,17 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController ...@@ -40,6 +33,17 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
redirect_to applications_profile_url redirect_to applications_profile_url
end end
def set_index_vars
@applications = current_user.oauth_applications
@authorized_tokens = current_user.oauth_authorized_tokens
@authorized_anonymous_tokens = @authorized_tokens.reject(&:application)
@authorized_apps = @authorized_tokens.map(&:application).uniq.reject(&:nil?)
# Don't overwrite a value possibly set by `create`
@application ||= Doorkeeper::Application.new
end
# Override Doorkeeper to scope to the current user
def set_application def set_application
@application = current_user.oauth_applications.find(params[:id]) @application = current_user.oauth_applications.find(params[:id])
end end
......
...@@ -8,13 +8,6 @@ class ProfilesController < Profiles::ApplicationController ...@@ -8,13 +8,6 @@ class ProfilesController < Profiles::ApplicationController
def show def show
end end
def applications
@applications = current_user.oauth_applications
@authorized_tokens = current_user.oauth_authorized_tokens
@authorized_anonymous_tokens = @authorized_tokens.reject(&:application)
@authorized_apps = @authorized_tokens.map(&:application).uniq - [nil]
end
def update def update
user_params.except!(:email) if @user.ldap_user? user_params.except!(:email) if @user.ldap_user?
...@@ -65,9 +58,6 @@ class ProfilesController < Profiles::ApplicationController ...@@ -65,9 +58,6 @@ class ProfilesController < Profiles::ApplicationController
def user_params def user_params
params.require(:user).permit( params.require(:user).permit(
:avatar_crop_x,
:avatar_crop_y,
:avatar_crop_size,
:avatar, :avatar,
:bio, :bio,
:email, :email,
......
class Projects::IssuesController < Projects::ApplicationController class Projects::IssuesController < Projects::ApplicationController
include ToggleSubscriptionAction
before_action :module_enabled before_action :module_enabled
before_action :issue, only: [:edit, :update, :show, :toggle_subscription] before_action :issue, only: [:edit, :update, :show]
# Allow read any issue # Allow read any issue
before_action :authorize_read_issue! before_action :authorize_read_issue!
...@@ -110,12 +112,6 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -110,12 +112,6 @@ class Projects::IssuesController < Projects::ApplicationController
redirect_back_or_default(default: { action: 'index' }, options: { notice: "#{result[:count]} issues updated" }) redirect_back_or_default(default: { action: 'index' }, options: { notice: "#{result[:count]} issues updated" })
end end
def toggle_subscription
@issue.toggle_subscription(current_user)
render nothing: true
end
def closed_by_merge_requests def closed_by_merge_requests
@closed_by_merge_requests ||= @issue.closed_by_merge_requests(current_user) @closed_by_merge_requests ||= @issue.closed_by_merge_requests(current_user)
end end
...@@ -129,6 +125,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -129,6 +125,7 @@ class Projects::IssuesController < Projects::ApplicationController
redirect_old redirect_old
end end
end end
alias_method :subscribable_resource, :issue
def authorize_update_issue! def authorize_update_issue!
return render_404 unless can?(current_user, :update_issue, @issue) return render_404 unless can?(current_user, :update_issue, @issue)
......
class Projects::LabelsController < Projects::ApplicationController class Projects::LabelsController < Projects::ApplicationController
include ToggleSubscriptionAction
before_action :module_enabled before_action :module_enabled
before_action :label, only: [:edit, :update, :destroy] before_action :label, only: [:edit, :update, :destroy]
before_action :authorize_read_label! before_action :authorize_read_label!
before_action :authorize_admin_labels!, except: [:index] before_action :authorize_admin_labels!, only: [
:new, :create, :edit, :update, :generate, :destroy
]
respond_to :js, :html respond_to :js, :html
...@@ -73,8 +77,9 @@ class Projects::LabelsController < Projects::ApplicationController ...@@ -73,8 +77,9 @@ class Projects::LabelsController < Projects::ApplicationController
end end
def label def label
@label = @project.labels.find(params[:id]) @label ||= @project.labels.find(params[:id])
end end
alias_method :subscribable_resource, :label
def authorize_admin_labels! def authorize_admin_labels!
return render_404 unless can?(current_user, :admin_label, @project) return render_404 unless can?(current_user, :admin_label, @project)
......
class Projects::MergeRequestsController < Projects::ApplicationController class Projects::MergeRequestsController < Projects::ApplicationController
include ToggleSubscriptionAction
include DiffHelper include DiffHelper
before_action :module_enabled before_action :module_enabled
before_action :merge_request, only: [ before_action :merge_request, only: [
:edit, :update, :show, :diffs, :commits, :builds, :merge, :merge_check, :edit, :update, :show, :diffs, :commits, :builds, :merge, :merge_check,
:ci_status, :toggle_subscription, :cancel_merge_when_build_succeeds :ci_status, :cancel_merge_when_build_succeeds
] ]
before_action :closes_issues, only: [:edit, :update, :show, :diffs, :commits, :builds] before_action :closes_issues, only: [:edit, :update, :show, :diffs, :commits, :builds]
before_action :validates_merge_request, only: [:show, :diffs, :commits, :builds] before_action :validates_merge_request, only: [:show, :diffs, :commits, :builds]
...@@ -233,12 +234,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -233,12 +234,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
render json: response render json: response
end end
def toggle_subscription
@merge_request.toggle_subscription(current_user)
render nothing: true
end
protected protected
def selected_target_project def selected_target_project
...@@ -252,6 +247,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -252,6 +247,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def merge_request def merge_request
@merge_request ||= @project.merge_requests.find_by!(iid: params[:id]) @merge_request ||= @project.merge_requests.find_by!(iid: params[:id])
end end
alias_method :subscribable_resource, :merge_request
def closes_issues def closes_issues
@closes_issues ||= @merge_request.closes_issues @closes_issues ||= @merge_request.closes_issues
......
...@@ -172,10 +172,15 @@ class ProjectsController < ApplicationController ...@@ -172,10 +172,15 @@ class ProjectsController < ApplicationController
def housekeeping def housekeeping
::Projects::HousekeepingService.new(@project).execute ::Projects::HousekeepingService.new(@project).execute
respond_to do |format| redirect_to(
flash[:notice] = "Housekeeping successfully started." project_path(@project),
format.html { redirect_to project_path(@project) } notice: "Housekeeping successfully started"
end )
rescue ::Projects::HousekeepingService::LeaseTaken => ex
redirect_to(
edit_project_path(@project),
alert: ex.to_s
)
end end
def toggle_star def toggle_star
......
...@@ -12,9 +12,13 @@ module CiStatusHelper ...@@ -12,9 +12,13 @@ module CiStatusHelper
ci_label_for_status(ci_commit.status) ci_label_for_status(ci_commit.status)
end end
def ci_status_with_icon(status) def ci_status_with_icon(status, target = nil)
content_tag :span, class: "ci-status ci-#{status}" do content = ci_icon_for_status(status) + '&nbsp;'.html_safe + ci_label_for_status(status)
ci_icon_for_status(status) + '&nbsp;'.html_safe + ci_label_for_status(status) klass = "ci-status ci-#{status}"
if target
link_to content, target, class: klass
else
content_tag :span, content, class: klass
end end
end end
......
...@@ -3,7 +3,7 @@ module EventsHelper ...@@ -3,7 +3,7 @@ module EventsHelper
author = event.author author = event.author
if author if author
link_to author.name, user_path(author.username) link_to author.name, user_path(author.username), title: h(author.name)
else else
event.author_name event.author_name
end end
...@@ -159,7 +159,7 @@ module EventsHelper ...@@ -159,7 +159,7 @@ module EventsHelper
link_to( link_to(
namespace_project_commit_path(event.project.namespace, event.project, namespace_project_commit_path(event.project.namespace, event.project,
event.note_commit_id, event.note_commit_id,
anchor: dom_id(event.target)), anchor: dom_id(event.target), title: h(event.target_title)),
class: "commit_short_id" class: "commit_short_id"
) do ) do
"#{event.note_target_type} #{event.note_short_commit_id}" "#{event.note_target_type} #{event.note_short_commit_id}"
...@@ -167,7 +167,7 @@ module EventsHelper ...@@ -167,7 +167,7 @@ module EventsHelper
elsif event.note_project_snippet? elsif event.note_project_snippet?
link_to(namespace_project_snippet_path(event.project.namespace, link_to(namespace_project_snippet_path(event.project.namespace,
event.project, event.project,
event.note_target)) do event.note_target), title: h(event.project.name)) do
"#{event.note_target_type} #{truncate event.note_target.to_reference}" "#{event.note_target_type} #{truncate event.note_target.to_reference}"
end end
else else
......
...@@ -31,7 +31,11 @@ module IssuablesHelper ...@@ -31,7 +31,11 @@ module IssuablesHelper
end end
def issuable_state_scope(issuable) def issuable_state_scope(issuable)
if issuable.respond_to?(:merged?) && issuable.merged?
:merged
else
issuable.open? ? :opened : :closed issuable.open? ? :opened : :closed
end end
end
end end
...@@ -124,6 +124,14 @@ module LabelsHelper ...@@ -124,6 +124,14 @@ module LabelsHelper
options_from_collection_for_select(grouped_labels, 'name', 'title', params[:label_name]) options_from_collection_for_select(grouped_labels, 'name', 'title', params[:label_name])
end end
def label_subscription_status(label)
label.subscribed?(current_user) ? 'subscribed' : 'unsubscribed'
end
def label_subscription_toggle_button_text(label)
label.subscribed?(current_user) ? 'Unsubscribe' : 'Subscribe'
end
# Required for Banzai::Filter::LabelReferenceFilter # Required for Banzai::Filter::LabelReferenceFilter
module_function :render_colored_label, :render_colored_cross_project_label, module_function :render_colored_label, :render_colored_cross_project_label,
:text_color_for_bg, :escape_once :text_color_for_bg, :escape_once
......
...@@ -8,7 +8,7 @@ module ProjectsHelper ...@@ -8,7 +8,7 @@ module ProjectsHelper
end end
def link_to_project(project) def link_to_project(project)
link_to [project.namespace.becomes(Namespace), project] do link_to [project.namespace.becomes(Namespace), project], title: h(project.name) do
title = content_tag(:span, project.name, class: 'project-name') title = content_tag(:span, project.name, class: 'project-name')
if project.namespace if project.namespace
......
...@@ -16,7 +16,7 @@ module TodosHelper ...@@ -16,7 +16,7 @@ module TodosHelper
def todo_target_link(todo) def todo_target_link(todo)
target = todo.target_type.titleize.downcase target = todo.target_type.titleize.downcase
link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo) link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo), { title: h(todo.target.title) }
end end
def todo_target_path(todo) def todo_target_path(todo)
......
...@@ -16,7 +16,15 @@ module Emails ...@@ -16,7 +16,15 @@ module Emails
def closed_issue_email(recipient_id, issue_id, updated_by_user_id) def closed_issue_email(recipient_id, issue_id, updated_by_user_id)
setup_issue_mail(issue_id, recipient_id) setup_issue_mail(issue_id, recipient_id)
@updated_by = User.find updated_by_user_id @updated_by = User.find(updated_by_user_id)
mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end
def relabeled_issue_email(recipient_id, issue_id, label_names, updated_by_user_id)
setup_issue_mail(issue_id, recipient_id)
@label_names = label_names
@labels_url = namespace_project_labels_url(@project.namespace, @project)
mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id)) mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end end
...@@ -24,20 +32,12 @@ module Emails ...@@ -24,20 +32,12 @@ module Emails
setup_issue_mail(issue_id, recipient_id) setup_issue_mail(issue_id, recipient_id)
@issue_status = status @issue_status = status
@updated_by = User.find updated_by_user_id @updated_by = User.find(updated_by_user_id)
mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id)) mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end end
private private
def issue_thread_options(sender_id, recipient_id)
{
from: sender(sender_id),
to: recipient(recipient_id),
subject: subject("#{@issue.title} (##{@issue.iid})")
}
end
def setup_issue_mail(issue_id, recipient_id) def setup_issue_mail(issue_id, recipient_id)
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@project = @issue.project @project = @issue.project
...@@ -45,5 +45,13 @@ module Emails ...@@ -45,5 +45,13 @@ module Emails
@sent_notification = SentNotification.record(@issue, recipient_id, reply_key) @sent_notification = SentNotification.record(@issue, recipient_id, reply_key)
end end
def issue_thread_options(sender_id, recipient_id)
{
from: sender(sender_id),
to: recipient(recipient_id),
subject: subject("#{@issue.title} (##{@issue.iid})")
}
end
end end
end end
...@@ -3,50 +3,43 @@ module Emails ...@@ -3,50 +3,43 @@ module Emails
def new_merge_request_email(recipient_id, merge_request_id) def new_merge_request_email(recipient_id, merge_request_id)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
mail_new_thread(@merge_request, mail_new_thread(@merge_request, merge_request_thread_options(@merge_request.author_id, recipient_id))
from: sender(@merge_request.author_id),
to: recipient(recipient_id),
subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end end
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id, updated_by_user_id) def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id, updated_by_user_id)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
@previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
from: sender(updated_by_user_id), end
to: recipient(recipient_id),
subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) def relabeled_merge_request_email(recipient_id, merge_request_id, label_names, updated_by_user_id)
setup_merge_request_mail(merge_request_id, recipient_id)
@label_names = label_names
@labels_url = namespace_project_labels_url(@project.namespace, @project)
mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
end end
def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
@updated_by = User.find updated_by_user_id @updated_by = User.find(updated_by_user_id)
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
from: sender(updated_by_user_id),
to: recipient(recipient_id),
subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end end
def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
from: sender(updated_by_user_id),
to: recipient(recipient_id),
subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end end
def merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id) def merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
@mr_status = status @mr_status = status
@updated_by = User.find updated_by_user_id @updated_by = User.find(updated_by_user_id)
mail_answer_thread(@merge_request, mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
from: sender(updated_by_user_id),
to: recipient(recipient_id),
subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end end
private private
...@@ -54,11 +47,17 @@ module Emails ...@@ -54,11 +47,17 @@ module Emails
def setup_merge_request_mail(merge_request_id, recipient_id) def setup_merge_request_mail(merge_request_id, recipient_id)
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project @project = @merge_request.project
@target_url = namespace_project_merge_request_url(@project.namespace, @target_url = namespace_project_merge_request_url(@project.namespace, @project, @merge_request)
@project,
@merge_request)
@sent_notification = SentNotification.record(@merge_request, recipient_id, reply_key) @sent_notification = SentNotification.record(@merge_request, recipient_id, reply_key)
end end
def merge_request_thread_options(sender_id, recipient_id)
{
from: sender(sender_id),
to: recipient(recipient_id),
subject: subject("#{@merge_request.title} (##{@merge_request.iid})")
}
end
end end
end end
...@@ -14,7 +14,10 @@ module Emails ...@@ -14,7 +14,10 @@ module Emails
end end
def new_ssh_key_email(key_id) def new_ssh_key_email(key_id)
@key = Key.find(key_id) @key = Key.find_by_id(key_id)
return unless @key
@current_user = @user = @key.user @current_user = @user = @key.user
@target_url = user_url(@user) @target_url = user_url(@user)
mail(to: @user.notification_email, subject: subject("SSH key was added to your account")) mail(to: @user.notification_email, subject: subject("SSH key was added to your account"))
......
...@@ -19,9 +19,9 @@ class AbuseReport < ActiveRecord::Base ...@@ -19,9 +19,9 @@ class AbuseReport < ActiveRecord::Base
validates :message, presence: true validates :message, presence: true
validates :user_id, uniqueness: { message: 'has already been reported' } validates :user_id, uniqueness: { message: 'has already been reported' }
def remove_user def remove_user(deleted_by:)
user.block user.block
user.destroy DeleteUserWorker.perform_async(deleted_by.id, user.id, delete_solo_owned_groups: true)
end end
def notify def notify
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
module Ci module Ci
class Build < CommitStatus class Build < CommitStatus
include Gitlab::Application.routes.url_helpers
LAZY_ATTRIBUTES = ['trace'] LAZY_ATTRIBUTES = ['trace']
belongs_to :runner, class_name: 'Ci::Runner' belongs_to :runner, class_name: 'Ci::Runner'
...@@ -128,7 +126,7 @@ module Ci ...@@ -128,7 +126,7 @@ module Ci
end end
def retried? def retried?
!self.commit.latest_builds_for_ref(self.ref).include?(self) !self.commit.latest_statuses_for_ref(self.ref).include?(self)
end end
def depends_on_builds def depends_on_builds
...@@ -309,22 +307,6 @@ module Ci ...@@ -309,22 +307,6 @@ module Ci
project.valid_runners_token? token project.valid_runners_token? token
end end
def target_url
namespace_project_build_url(project.namespace, project, self)
end
def cancel_url
if active?
cancel_namespace_project_build_path(project.namespace, project, self)
end
end
def retry_url
if retryable?
retry_namespace_project_build_path(project.namespace, project, self)
end
end
def can_be_served?(runner) def can_be_served?(runner)
(tag_list - runner.tag_list).empty? (tag_list - runner.tag_list).empty?
end end
...@@ -333,7 +315,7 @@ module Ci ...@@ -333,7 +315,7 @@ module Ci
project.any_runners? { |runner| runner.active? && runner.online? && can_be_served?(runner) } project.any_runners? { |runner| runner.active? && runner.online? && can_be_served?(runner) }
end end
def show_warning? def stuck?
pending? && !any_runners_online? pending? && !any_runners_online?
end end
...@@ -348,18 +330,6 @@ module Ci ...@@ -348,18 +330,6 @@ module Ci
artifacts_file.exists? artifacts_file.exists?
end end
def artifacts_download_url
if artifacts?
download_namespace_project_build_artifacts_path(project.namespace, project, self)
end
end
def artifacts_browse_url
if artifacts_metadata?
browse_namespace_project_build_artifacts_path(project.namespace, project, self)
end
end
def artifacts_metadata? def artifacts_metadata?
artifacts? && artifacts_metadata.exists? artifacts? && artifacts_metadata.exists?
end end
......
...@@ -25,8 +25,6 @@ module Ci ...@@ -25,8 +25,6 @@ module Ci
has_many :builds, class_name: 'Ci::Build' has_many :builds, class_name: 'Ci::Build'
has_many :trigger_requests, dependent: :destroy, class_name: 'Ci::TriggerRequest' has_many :trigger_requests, dependent: :destroy, class_name: 'Ci::TriggerRequest'
scope :ordered, -> { order('CASE WHEN ci_commits.committed_at IS NULL THEN 0 ELSE 1 END', :committed_at, :id) }
validates_presence_of :sha validates_presence_of :sha
validate :valid_commit_sha validate :valid_commit_sha
...@@ -42,16 +40,6 @@ module Ci ...@@ -42,16 +40,6 @@ module Ci
project.id project.id
end end
def last_build
builds.order(:id).last
end
def retry
latest_builds.each do |build|
Ci::Build.retry(build)
end
end
def valid_commit_sha def valid_commit_sha
if self.sha == Gitlab::Git::BLANK_SHA if self.sha == Gitlab::Git::BLANK_SHA
self.errors.add(:sha, " cant be 00000000 (branch removal)") self.errors.add(:sha, " cant be 00000000 (branch removal)")
...@@ -121,12 +109,14 @@ module Ci ...@@ -121,12 +109,14 @@ module Ci
@latest_statuses ||= statuses.latest.to_a @latest_statuses ||= statuses.latest.to_a
end end
def latest_builds def latest_statuses_for_ref(ref)
@latest_builds ||= builds.latest.to_a latest_statuses.select { |status| status.ref == ref }
end end
def latest_builds_for_ref(ref) def matrix_builds(build = nil)
latest_builds.select { |build| build.ref == ref } matrix_builds = builds.latest.ordered
matrix_builds = matrix_builds.similar(build) if build
matrix_builds.to_a
end end
def retried def retried
...@@ -170,7 +160,7 @@ module Ci ...@@ -170,7 +160,7 @@ module Ci
end end
def duration def duration
duration_array = latest_statuses.map(&:duration).compact duration_array = statuses.map(&:duration).compact
duration_array.reduce(:+).to_i duration_array.reduce(:+).to_i
end end
...@@ -183,16 +173,12 @@ module Ci ...@@ -183,16 +173,12 @@ module Ci
end end
def coverage def coverage
coverage_array = latest_builds.map(&:coverage).compact coverage_array = latest_statuses.map(&:coverage).compact
if coverage_array.size >= 1 if coverage_array.size >= 1
'%.2f' % (coverage_array.reduce(:+) / coverage_array.size) '%.2f' % (coverage_array.reduce(:+) / coverage_array.size)
end end
end end
def matrix_for_ref?(ref)
latest_builds_for_ref(ref).size > 1
end
def config_processor def config_processor
return nil unless ci_yaml_file return nil unless ci_yaml_file
@config_processor ||= Ci::GitlabCiYamlProcessor.new(ci_yaml_file, project.path_with_namespace) @config_processor ||= Ci::GitlabCiYamlProcessor.new(ci_yaml_file, project.path_with_namespace)
...@@ -218,10 +204,6 @@ module Ci ...@@ -218,10 +204,6 @@ module Ci
git_commit_message =~ /(\[ci skip\])/ if git_commit_message git_commit_message =~ /(\[ci skip\])/ if git_commit_message
end end
def update_committed!
update!(committed_at: DateTime.now)
end
private private
def save_yaml_error(error) def save_yaml_error(error)
......
...@@ -125,23 +125,7 @@ class CommitStatus < ActiveRecord::Base ...@@ -125,23 +125,7 @@ class CommitStatus < ActiveRecord::Base
end end
end end
def cancel_url def stuck?
nil
end
def retry_url
nil
end
def show_warning?
false false
end end
def artifacts_download_url
nil
end
def artifacts_browse_url
nil
end
end end
...@@ -8,6 +8,7 @@ module Issuable ...@@ -8,6 +8,7 @@ module Issuable
extend ActiveSupport::Concern extend ActiveSupport::Concern
include Participable include Participable
include Mentionable include Mentionable
include Subscribable
include StripAttribute include StripAttribute
included do included do
...@@ -18,7 +19,6 @@ module Issuable ...@@ -18,7 +19,6 @@ module Issuable
has_many :notes, as: :noteable, dependent: :destroy has_many :notes, as: :noteable, dependent: :destroy
has_many :label_links, as: :target, dependent: :destroy has_many :label_links, as: :target, dependent: :destroy
has_many :labels, through: :label_links has_many :labels, through: :label_links
has_many :subscriptions, dependent: :destroy, as: :subscribable
validates :author, presence: true validates :author, presence: true
validates :title, presence: true, length: { within: 0..255 } validates :title, presence: true, length: { within: 0..255 }
...@@ -149,28 +149,10 @@ module Issuable ...@@ -149,28 +149,10 @@ module Issuable
notes.awards.where(note: "thumbsup").count notes.awards.where(note: "thumbsup").count
end end
def subscribed?(user) def subscribed_without_subscriptions?(user)
subscription = subscriptions.find_by_user_id(user.id)
if subscription
return subscription.subscribed
end
participants(user).include?(user) participants(user).include?(user)
end end
def toggle_subscription(user)
subscriptions.
find_or_initialize_by(user_id: user.id).
update(subscribed: !subscribed?(user))
end
def unsubscribe(user)
subscriptions.
find_or_initialize_by(user_id: user.id).
update(subscribed: false)
end
def to_hook_data(user) def to_hook_data(user)
hook_data = { hook_data = {
object_kind: self.class.name.underscore, object_kind: self.class.name.underscore,
......
# == Subscribable concern
#
# Users can subscribe to these models.
#
# Used by Issue, MergeRequest, Label
#
module Subscribable
extend ActiveSupport::Concern
included do
has_many :subscriptions, dependent: :destroy, as: :subscribable
end
def subscribed?(user)
if subscription = subscriptions.find_by_user_id(user.id)
subscription.subscribed
else
subscribed_without_subscriptions?(user)
end
end
# Override this method to define custom logic to consider a subscribable as
# subscribed without an explicit subscription record.
def subscribed_without_subscriptions?(user)
false
end
def subscribers
subscriptions.where(subscribed: true).map(&:user)
end
def toggle_subscription(user)
subscriptions.
find_or_initialize_by(user_id: user.id).
update(subscribed: !subscribed?(user))
end
def unsubscribe(user)
subscriptions.
find_or_initialize_by(user_id: user.id).
update(subscribed: false)
end
end
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
require 'digest/md5' require 'digest/md5'
class Key < ActiveRecord::Base class Key < ActiveRecord::Base
include AfterCommitQueue
include Sortable include Sortable
belongs_to :user belongs_to :user
...@@ -62,7 +63,7 @@ class Key < ActiveRecord::Base ...@@ -62,7 +63,7 @@ class Key < ActiveRecord::Base
end end
def notify_user def notify_user
NotificationService.new.new_key(self) run_after_commit { NotificationService.new.new_key(self) }
end end
def post_create_hook def post_create_hook
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
class Label < ActiveRecord::Base class Label < ActiveRecord::Base
include Referable include Referable
include Subscribable
# Represents a "No Label" state used for filtering Issues and Merge # Represents a "No Label" state used for filtering Issues and Merge
# Requests that have no label assigned. # Requests that have no label assigned.
LabelStruct = Struct.new(:title, :name) LabelStruct = Struct.new(:title, :name)
......
...@@ -286,7 +286,14 @@ class Project < ActiveRecord::Base ...@@ -286,7 +286,14 @@ class Project < ActiveRecord::Base
or(ptable[:description].matches(pattern)) or(ptable[:description].matches(pattern))
) )
# We explicitly remove any eager loading clauses as they're:
#
# 1. Not needed by this query
# 2. Combined with .joins(:namespace) lead to all columns from the
# projects & namespaces tables being selected, leading to a SQL error
# due to the columns of all UNION'd queries no longer being the same.
namespaces = select(:id). namespaces = select(:id).
except(:includes).
joins(:namespace). joins(:namespace).
where(ntable[:name].matches(pattern)) where(ntable[:name].matches(pattern))
...@@ -508,6 +515,7 @@ class Project < ActiveRecord::Base ...@@ -508,6 +515,7 @@ class Project < ActiveRecord::Base
end end
def external_issue_tracker def external_issue_tracker
return @external_issue_tracker if defined?(@external_issue_tracker)
@external_issue_tracker ||= @external_issue_tracker ||=
services.issue_trackers.active.without_defaults.first services.issue_trackers.active.without_defaults.first
end end
......
...@@ -2,7 +2,7 @@ class ProjectWiki ...@@ -2,7 +2,7 @@ class ProjectWiki
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
MARKUPS = { MARKUPS = {
'Markdown' => :md, 'Markdown' => :markdown,
'RDoc' => :rdoc, 'RDoc' => :rdoc,
'AsciiDoc' => :asciidoc 'AsciiDoc' => :asciidoc
} unless defined?(MARKUPS) } unless defined?(MARKUPS)
...@@ -47,7 +47,7 @@ class ProjectWiki ...@@ -47,7 +47,7 @@ class ProjectWiki
def wiki def wiki
@wiki ||= begin @wiki ||= begin
Gollum::Wiki.new(path_to_repo) Gollum::Wiki.new(path_to_repo)
rescue Gollum::NoSuchPathError rescue Rugged::OSError
create_repo! create_repo!
end end
end end
...@@ -90,7 +90,7 @@ class ProjectWiki ...@@ -90,7 +90,7 @@ class ProjectWiki
def create_page(title, content, format = :markdown, message = nil) def create_page(title, content, format = :markdown, message = nil)
commit = commit_details(:created, message, title) commit = commit_details(:created, message, title)
wiki.write_page(title, format, content, commit) wiki.write_page(title, format.to_sym, content, commit)
update_project_activity update_project_activity
rescue Gollum::DuplicatePageError => e rescue Gollum::DuplicatePageError => e
...@@ -101,7 +101,7 @@ class ProjectWiki ...@@ -101,7 +101,7 @@ class ProjectWiki
def update_page(page, content, format = :markdown, message = nil) def update_page(page, content, format = :markdown, message = nil)
commit = commit_details(:updated, message, page.title) commit = commit_details(:updated, message, page.title)
wiki.update_page(page, page.name, format, content, commit) wiki.update_page(page, page.name, format.to_sym, content, commit)
update_project_activity update_project_activity
end end
......
...@@ -758,12 +758,15 @@ class Repository ...@@ -758,12 +758,15 @@ class Repository
def parse_search_result(result) def parse_search_result(result)
ref = nil ref = nil
filename = nil filename = nil
basename = nil
startline = 0 startline = 0
result.each_line.each_with_index do |line, index| result.each_line.each_with_index do |line, index|
if line =~ /^.*:.*:\d+:/ if line =~ /^.*:.*:\d+:/
ref, filename, startline = line.split(':') ref, filename, startline = line.split(':')
startline = startline.to_i - index startline = startline.to_i - index
extname = File.extname(filename)
basename = filename.sub(/#{extname}$/, '')
break break
end end
end end
...@@ -776,6 +779,7 @@ class Repository ...@@ -776,6 +779,7 @@ class Repository
OpenStruct.new( OpenStruct.new(
filename: filename, filename: filename,
basename: basename,
ref: ref, ref: ref,
startline: startline, startline: startline,
data: data data: data
......
...@@ -98,9 +98,6 @@ class User < ActiveRecord::Base ...@@ -98,9 +98,6 @@ class User < ActiveRecord::Base
# Virtual attribute for authenticating by either username or email # Virtual attribute for authenticating by either username or email
attr_accessor :login attr_accessor :login
# Virtual attributes to define avatar cropping
attr_accessor :avatar_crop_x, :avatar_crop_y, :avatar_crop_size
# #
# Relations # Relations
# #
...@@ -166,11 +163,6 @@ class User < ActiveRecord::Base ...@@ -166,11 +163,6 @@ class User < ActiveRecord::Base
validate :owns_public_email, if: ->(user) { user.public_email_changed? } validate :owns_public_email, if: ->(user) { user.public_email_changed? }
validates :avatar, file_size: { maximum: 200.kilobytes.to_i } validates :avatar, file_size: { maximum: 200.kilobytes.to_i }
validates :avatar_crop_x, :avatar_crop_y, :avatar_crop_size,
numericality: { only_integer: true },
presence: true,
if: ->(user) { user.avatar? && user.avatar_changed? }
before_validation :generate_password, on: :create before_validation :generate_password, on: :create
before_validation :restricted_signup_domains, on: :create before_validation :restricted_signup_domains, on: :create
before_validation :sanitize_attrs before_validation :sanitize_attrs
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment