diff --git a/environment.rb b/environment.rb index e19cff47..6d9911a9 100644 --- a/environment.rb +++ b/environment.rb @@ -61,6 +61,7 @@ end # :nocov: if ENV['RACK_ENV'] == 'development' # Run async jobs immediately in development. +=begin module Sidekiq module Worker module ClassMethods @@ -72,6 +73,7 @@ if ENV['RACK_ENV'] == 'development' end end end +=end end # :nocov: diff --git a/models/site.rb b/models/site.rb index 296aea24..a9e5aeb4 100644 --- a/models/site.rb +++ b/models/site.rb @@ -905,9 +905,17 @@ class Site < Sequel::Model is_root_index: file_path == "#{base_files_path}/index.html" } + site_file = site_files_dataset.where(path: file_path.gsub(base_files_path, '').sub(/^\//, '')).first + + if site_file + file[:size] = site_file.size unless file[:is_directory] + file[:updated_at] = site_file.updated_at + end + file[:is_html] = !(file[:ext].match HTML_REGEX).nil? file[:is_image] = !(file[:ext].match IMAGE_REGEX).nil? file[:is_editable] = !(file[:ext].match EDITABLE_FILE_EXT).nil? + file end diff --git a/sass/_project-sass/_project-Main.scss b/sass/_project-sass/_project-Main.scss index 1ff0346f..f65fdb9c 100644 --- a/sass/_project-sass/_project-Main.scss +++ b/sass/_project-sass/_project-Main.scss @@ -209,8 +209,8 @@ float: left; @media (max-device-width: 480px), screen and (max-width: 800px) { - margin-left: 22px; - margin-top: 18px; + margin-left: 0px; + margin-top: 16px; } } .welcome { @@ -241,6 +241,35 @@ width: 100%; position: relative; margin-top: 7px; + + .column, input[type='checkbox'] { + display: none; + } + + .btn-group { + float: left; + margin-right: 15px; + margin-left: -3px; + + >.btn+.btn { + margin-left: 0px; + border-left: 1px solid rgba(0, 0, 0, 0.1); + } + .btn { + padding: 7px 11px; + margin-top: 1px; + background: #77ABB8; + @include box-shadow(0 0 5px rgba(0, 0, 0, 0.2)); + + &:hover { + background: #83B3C0; + } + &:focus, &.active { + outline: 0; + background: #4F727B; + } + } + } } .files .header { background: #5E95A1; @@ -263,12 +292,22 @@ } .files .actions { float: right; + + @media (max-device-width:480px), screen and (max-width:800px) { + float: left; + margin-top: 7px; + + .fa { + display: none; + } + } } .files .btn-Action { margin-left: 8px; @media (max-device-width:480px), screen and (max-width:800px) { - margin: 4px 8px 4px 0; + margin: 4px 3px 4px 0; + padding: 8px 17px; } } .files .list { @@ -364,6 +403,7 @@ white-space: nowrap; overflow: hidden; display: block; + text-overflow: ellipsis; } .html-thumbnail { font-size: 11px; @@ -452,6 +492,102 @@ .html-thumbnail.misc.fileimagehover .overlay { margin: 1px 0 0 2px; } +.files .list.list-view { + padding: 0; + + .upload-Boundary { + padding: 0; + border: 0; + margin: 0; + } + .file { + padding: 10px 20px; + margin: 0; + width: 100%; + + &:nth-child(even) { + background: #EFE8DC; + } + .title { + margin: 0; + margin-left: 7px; + margin-top: 2px; + float: left; + font-size: 14px; + text-align: left; + width: 30%; + text-overflow: ellipsis; + + @media (max-device-width:480px), screen and (max-width:800px) { + width: 33%; + } + } + input[type='checkbox'] { + display: block; + float: left; + margin-top: 5px; + margin-right: 6px; + } + } + .html-thumbnail, .misc-icon { + margin: 0; + margin-left: 4px; + float: left; + width: 23px; + height: 23px; + background-size: 23px; + padding: 0; + font-size: 8px; + + img { + max-width: 23px; + max-height: 23px; + } + } + .misc-icon { + padding-top: 8px; + } + .folder-icon { + background-position: 0 4px; + background-size: 23px; + height: 23px; + } + .file > .overlay { + padding-top: 11px; + margin-left: 20px; + text-align: right; + background-color: transparent; + display: block; + width: 94%; + + a { + color: #e93250; + display: inline; + margin-right: 5px; + } + .link-overlay { + width: 30%; + } + + @media (max-device-width:480px), screen and (max-width:800px) { + width: 84%; + } + } + .html-thumbnail > .overlay { + display: none; + } + .column { + float: left; + width: 13%; + font-size: 13px; + display: block; + padding-top: 4px; + + @media (max-device-width:480px), screen and (max-width:800px) { + display: none; + } + } +} .site-actions { float: left; margin-top: 20px; diff --git a/views/dashboard.erb b/views/dashboard.erb index 2913e18d..51c15830 100644 --- a/views/dashboard.erb +++ b/views/dashboard.erb @@ -82,6 +82,10 @@