Basic RemoteStorage settings
This commit is contained in:
parent
4b17afa93d
commit
20c014607c
@ -18,6 +18,7 @@ DISCOURSE_PUBLIC_URL='https://community.kosmos.org'
|
|||||||
GITEA_PUBLIC_URL='https://gitea.kosmos.org'
|
GITEA_PUBLIC_URL='https://gitea.kosmos.org'
|
||||||
MASTODON_PUBLIC_URL='https://kosmos.social'
|
MASTODON_PUBLIC_URL='https://kosmos.social'
|
||||||
MEDIAWIKI_PUBLIC_URL='https://wiki.kosmos.org'
|
MEDIAWIKI_PUBLIC_URL='https://wiki.kosmos.org'
|
||||||
|
RS_STORAGE_URL='https://storage.kosmos.org'
|
||||||
|
|
||||||
EJABBERD_ADMIN_URL='https://xmpp.kosmos.org/admin'
|
EJABBERD_ADMIN_URL='https://xmpp.kosmos.org/admin'
|
||||||
EJABBERD_API_URL='https://xmpp.kosmos.org/api'
|
EJABBERD_API_URL='https://xmpp.kosmos.org/api'
|
||||||
|
@ -90,4 +90,14 @@ class Setting < RailsSettings::Base
|
|||||||
#
|
#
|
||||||
|
|
||||||
field :nostr_enabled, type: :boolean, default: true
|
field :nostr_enabled, type: :boolean, default: true
|
||||||
|
|
||||||
|
#
|
||||||
|
# RemoteStorage
|
||||||
|
#
|
||||||
|
|
||||||
|
field :remotestorage_enabled, type: :boolean,
|
||||||
|
default: (ENV["RS_STORAGE_URL"].present?.to_s || false)
|
||||||
|
|
||||||
|
field :rs_storage_url, type: :string,
|
||||||
|
default: ENV["RS_STORAGE_URL"].presence
|
||||||
end
|
end
|
||||||
|
17
app/views/admin/settings/services/_remotestorage.html.erb
Normal file
17
app/views/admin/settings/services/_remotestorage.html.erb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<h3>RemoteStorage</h3>
|
||||||
|
<ul role="list">
|
||||||
|
<%= render FormElements::FieldsetToggleComponent.new(
|
||||||
|
form: f,
|
||||||
|
attribute: :remotestorage_enabled,
|
||||||
|
enabled: Setting.remotestorage_enabled?,
|
||||||
|
title: "Enable RemoteStorage integration",
|
||||||
|
description: "RemoteStorage configuration present and features enabled"
|
||||||
|
) %>
|
||||||
|
<% if Setting.remotestorage_enabled? %>
|
||||||
|
<%= render FormElements::FieldsetComponent.new(title: "Storage URL") do %>
|
||||||
|
<%= f.text_field :rs_storage_url,
|
||||||
|
value: Setting.rs_storage_url,
|
||||||
|
class: "w-full", disabled: true %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
@ -47,3 +47,10 @@
|
|||||||
icon: Setting.nostr_enabled? ? "check" : "x",
|
icon: Setting.nostr_enabled? ? "check" : "x",
|
||||||
active: current_page?(admin_settings_services_path(params: { s: "nostr" })),
|
active: current_page?(admin_settings_services_path(params: { s: "nostr" })),
|
||||||
) %>
|
) %>
|
||||||
|
<%= render SidenavLinkComponent.new(
|
||||||
|
level: 2,
|
||||||
|
name: "RemoteStorage",
|
||||||
|
path: admin_settings_services_path(params: { s: "remotestorage" }),
|
||||||
|
icon: Setting.remotestorage_enabled? ? "check" : "x",
|
||||||
|
active: current_page?(admin_settings_services_path(params: { s: "remotestorage" })),
|
||||||
|
) %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user