Change update check source to kmyblue origin
This commit is contained in:
parent
ee6186a197
commit
7696216cbd
7 changed files with 19 additions and 4 deletions
|
@ -46,6 +46,7 @@ class Form::AdminSettings
|
|||
receive_other_servers_emoji_reaction
|
||||
streaming_other_servers_emoji_reaction
|
||||
enable_emoji_reaction
|
||||
check_lts_version_only
|
||||
).freeze
|
||||
|
||||
INTEGER_KEYS = %i(
|
||||
|
@ -72,6 +73,7 @@ class Form::AdminSettings
|
|||
receive_other_servers_emoji_reaction
|
||||
streaming_other_servers_emoji_reaction
|
||||
enable_emoji_reaction
|
||||
check_lts_version_only
|
||||
).freeze
|
||||
|
||||
UPLOAD_KEYS = %i(
|
||||
|
|
|
@ -27,11 +27,18 @@ class SoftwareUpdateCheckService < BaseService
|
|||
end
|
||||
|
||||
def api_url
|
||||
ENV.fetch('UPDATE_CHECK_URL', 'https://api.joinmastodon.org/update-check')
|
||||
ENV.fetch('UPDATE_CHECK_URL', 'https://kmy.blue/update-check')
|
||||
end
|
||||
|
||||
def version
|
||||
@version ||= Mastodon::Version.to_s.split('+')[0]
|
||||
return @version if @version.present?
|
||||
|
||||
if ENV.fetch('UPDATE_CHECK_SOURCE', 'kmyblue') == 'kmyblue'
|
||||
@version = "#{Mastodon::Version.kmyblue_major}.#{Mastodon::Version.kmyblue_minor}"
|
||||
@version += '-lts' if Setting.check_lts_version_only
|
||||
else
|
||||
@version = Mastodon::Version.to_s.split('+')[0]
|
||||
end
|
||||
end
|
||||
|
||||
def process_update_notices!(update_notices)
|
||||
|
|
|
@ -55,6 +55,9 @@
|
|||
.fields-group
|
||||
= f.input :authorized_fetch, as: :boolean, wrapper: :with_label, label: t('admin.settings.security.authorized_fetch'), warning_hint: authorized_fetch_overridden? ? t('admin.settings.security.authorized_fetch_overridden_hint') : nil, hint: t('admin.settings.security.authorized_fetch_hint'), disabled: authorized_fetch_overridden?, recommended: authorized_fetch_overridden? ? :overridden : nil
|
||||
|
||||
.fields-group
|
||||
= f.input :check_lts_version_only, as: :boolean, wrapper: :with_label, kmyblue: true, hint: false
|
||||
|
||||
%h4= t('admin.settings.discovery.follow_recommendations')
|
||||
|
||||
.fields-group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue