Merge branch 'develop' of https://gitlink.org.cn/Trustie/forgeplus into develop
This commit is contained in:
commit
204554b34c
|
@ -6,7 +6,7 @@ module Admins::ProjectsHelper
|
|||
if owner.is_a?(User)
|
||||
link_to(project.owner&.real_name, "/#{project&.owner&.login}", target: '_blank')
|
||||
elsif owner.is_a?(Organization)
|
||||
link_to(project.owner&.real_name, "/organize/#{project&.owner&.login}", target: '_blank')
|
||||
link_to(project.owner&.real_name, "/#{project&.owner&.login}", target: '_blank')
|
||||
else
|
||||
""
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module RepositoriesHelper
|
|||
end
|
||||
|
||||
def download_type(str)
|
||||
default_type = %w(ppt pptx pdf zip 7z rar exe pdb obj idb RData rdata doc docx mpp vsdx dot otf eot ttf woff woff2 mp4 mov wmv flv mpeg avi avchd webm mkv apk)
|
||||
default_type = %w(ppt pptx pdf zip 7z rar exe pdb obj idb RData rdata doc docx mpp vsdx dot otf eot ttf woff woff2 mp4 mov wmv flv mpeg avi avchd webm mkv apk xlsx xls)
|
||||
default_type.include?(str&.downcase) || str.blank?
|
||||
end
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<td><%= user.identity %></td>
|
||||
<td><%= display_text(user.created_on&.strftime('%Y-%m-%d %H:%M')) %></td>
|
||||
<td><%= display_text(user.last_login_on&.strftime('%Y-%m-%d %H:%M')) %></td>
|
||||
<td><%= link_to user.projects_count, "/users/#{user.login}/projects", target: "_blank" %></td>
|
||||
<td><%= link_to user.projects_count, "/#{user.login}/projects", target: "_blank" %></td>
|
||||
<td class="action-container">
|
||||
<%= link_to '编辑', edit_admins_user_path(user), class: 'action' %>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if @project.forge?
|
||||
file_name = entry['name']
|
||||
file_type = File.extname(file_name.to_s)[1..-1]
|
||||
direct_download = download_type(file_type)
|
||||
direct_download = file_name.to_s.downcase != "Makefile".downcase && download_type(file_type)
|
||||
image_type = image_type?(file_type)
|
||||
json.name file_name
|
||||
json.sha entry['sha']
|
||||
|
|
|
@ -5,6 +5,7 @@ OmniAuth.config.add_camelization 'qq', 'QQ' if config.dig("oauth", "qq")
|
|||
# OmniAuth.config.add_camelization 'gitee', 'Gitee' if config.dig("oauth", "gitee")
|
||||
# OmniAuth.config.add_camelization 'wechat', 'Wechat' if config.dig("oauth", "wechat")
|
||||
OmniAuth.config.logger = Rails.logger
|
||||
OmniAuth.config.allowed_request_methods = %i[get post]
|
||||
OmniAuth.config.before_request_phase = nil
|
||||
OmniAuth.config.before_callback_phase = nil
|
||||
OmniAuth.config.on_failure = Proc.new { |env|
|
||||
|
|
Loading…
Reference in New Issue