diff --git a/app/helpers/file_type_helper.rb b/app/helpers/file_type_helper.rb index 64d67701a..503c7f25b 100644 --- a/app/helpers/file_type_helper.rb +++ b/app/helpers/file_type_helper.rb @@ -1,16 +1,29 @@ module FileTypeHelper + # NOTE: video, audio, image, etc are filetypes previewable in frontend def file_type(content_type) - return :image if [ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/tiff', - 'image/bmp' - ].include?(content_type) - - return :video if content_type.include?('video/') + return :image if image_file?(content_type) + return :video if video_file?(content_type) return :audio if content_type.include?('audio/') :file end + + def image_file?(content_type) + [ + 'image/jpeg', + 'image/png', + 'image/gif', + 'image/bmp', + 'image/webp' + ].include?(content_type) + end + + def video_file?(content_type) + [ + 'video/ogg', + 'video/mp4', + 'video/webm', + 'video/quicktime' + ].include?(content_type) + end end diff --git a/app/javascript/dashboard/assets/scss/_foundation-settings.scss b/app/javascript/dashboard/assets/scss/_foundation-settings.scss index 13b7dfafd..c6b7f6fd3 100644 --- a/app/javascript/dashboard/assets/scss/_foundation-settings.scss +++ b/app/javascript/dashboard/assets/scss/_foundation-settings.scss @@ -45,6 +45,9 @@ // 1. Global // --------- +// Disable contrast warnings in Foundation. +$contrast-warnings: false; + $global-font-size: 10px; $global-width: 100%; $global-lineheight: 1.5; diff --git a/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue b/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue index 5b47648d1..594aaa6aa 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/ReplyBottomPanel.vue @@ -15,7 +15,7 @@