مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
chore(ui): display branch in footer if present
هذا الالتزام موجود في:
@@ -100,4 +100,11 @@ module ApplicationHelper
|
||||
end.html_safe
|
||||
end
|
||||
|
||||
def postal_version_string
|
||||
string = Postal.version
|
||||
string += " (#{Postal.branch})" if Postal.branch &&
|
||||
Postal.branch != "main"
|
||||
string
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
%footer.siteContent__footer
|
||||
%ul.footer__links
|
||||
%li.footer__name
|
||||
Powered by #{link_to "Postal", "https://postalserver.io", target: '_blank'} #{Postal.version}.
|
||||
Powered by
|
||||
#{link_to "Postal", "https://postalserver.io", target: '_blank'}
|
||||
#{postal_version_string}
|
||||
%li= link_to "Documentation", "https://docs.postalserver.io", target: '_blank'
|
||||
%li= link_to "Ask for help", "https://discussions.postalserver.io", target: '_blank'
|
||||
|
||||
@@ -153,6 +153,18 @@ module Postal
|
||||
ActiveRecord::Base.establish_connection(config.merge(pool: new_size))
|
||||
end
|
||||
|
||||
# Return the branch name which created this release
|
||||
#
|
||||
# @return [String, nil]
|
||||
def branch
|
||||
return @branch if instance_variable_defined?("@branch")
|
||||
|
||||
@branch = begin
|
||||
path = Rails.root.join("BRANCH")
|
||||
File.read(path).strip if File.exist?(path)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Config = initialize_config
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم