Merge branch 'standalone_develop' into pre_trustie_server
This commit is contained in:
commit
792810f4a9
|
@ -40,6 +40,13 @@ body {
|
|||
}
|
||||
}
|
||||
}
|
||||
.editormd .CodeMirror{
|
||||
margin-top: 35px!important;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter .CodeMirror-linenumbers {
|
||||
width: 28px!important;
|
||||
}
|
||||
|
||||
input.form-control {
|
||||
font-size: 14px;
|
||||
|
|
|
@ -395,7 +395,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def mirror_params
|
||||
params.permit(:user_id, :name, :description, :repository_name, :is_mirror, :auth_username, :auth_token,
|
||||
params.permit(:user_id, :name, :description, :repository_name, :is_mirror, :auth_username, :auth_token, :service,
|
||||
:auth_password, :project_category_id, :project_language_id, :clone_addr, :private)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Projects::MigrateForm < BaseForm
|
||||
attr_accessor :user_id, :name, :repository_name, :project_category_id, :description, :auth_token,
|
||||
attr_accessor :user_id, :name, :repository_name, :project_category_id, :description, :auth_token, :service,
|
||||
:project_language_id, :clone_addr, :private, :is_mirror, :auth_username, :auth_password, :owner
|
||||
|
||||
validates :user_id, :name, :repository_name, :clone_addr, presence: true
|
||||
|
|
|
@ -45,6 +45,7 @@ class Gitea::Accelerator::MigrateService < Gitea::Accelerator::BaseService
|
|||
repo_name: params[:repository_name],
|
||||
auth_username: params[:auth_username],
|
||||
auth_password: Base64.decode64(params[:auth_password]),
|
||||
auth_token: params[:auth_token],
|
||||
mirror: ActiveModel::Type::Boolean.new.cast(params[:is_mirror])
|
||||
}
|
||||
end
|
||||
|
|
|
@ -55,6 +55,7 @@ class Projects::MigrateService < ApplicationService
|
|||
login: params[:auth_username],
|
||||
password: params[:auth_password],
|
||||
auth_token: params[:auth_token],
|
||||
service: params[:service],
|
||||
is_mirror: params[:is_mirror],
|
||||
source_clone_url: params[:source_clone_url]
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class Repositories::MigrateService < ApplicationService
|
|||
|
||||
private
|
||||
def repository_params
|
||||
params.merge(project_id: project.id)
|
||||
params.except(:service).merge(project_id: project.id)
|
||||
end
|
||||
|
||||
def gitea_repository_params
|
||||
|
@ -33,7 +33,8 @@ class Repositories::MigrateService < ApplicationService
|
|||
mirror: wrapper_mirror || false,
|
||||
auth_username: params[:login],
|
||||
auth_password: Base64.decode64(params[:password] || ""),
|
||||
auth_token: params[:auth_token]
|
||||
auth_token: params[:auth_token],
|
||||
service: params[:service] || 'git',
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 800px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">发送邮件给<%= @feedback&.user&.mail%></h5>
|
||||
<h5 class="modal-title">
|
||||
发送邮件给<%= @feedback&.user&.mail%>
|
||||
<% if @feedback&.user&.mail.end_with?('@example.org') || @feedback&.user&.mail.end_with?('@gitlink.org.cn')%>
|
||||
<span style="color: red">(该邮箱不可用)</span>
|
||||
<% end %>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
Loading…
Reference in New Issue