Add Blossom server URL to global settings

This commit is contained in:
2026-08-11 14:03:38 -06:00
parent 4c20e8d7e0
commit 12a1570c7d
4 changed files with 13 additions and 1 deletions
+1
View File
@@ -87,6 +87,7 @@
# NOSTR_PRIVATE_KEY='123456abcdef...' # NOSTR_PRIVATE_KEY='123456abcdef...'
# NOSTR_PUBLIC_KEY='123456abcdef...' # NOSTR_PUBLIC_KEY='123456abcdef...'
# NOSTR_RELAY_URL='wss://nostr.kosmos.org' # NOSTR_RELAY_URL='wss://nostr.kosmos.org'
# NOSTR_BLOSSOM_SERVER_URL='https://blossom.kosmos.org'
# RS_STORAGE_URL='https://storage.kosmos.org' # RS_STORAGE_URL='https://storage.kosmos.org'
# RS_REDIS_URL='redis://localhost:6379/2' # RS_REDIS_URL='redis://localhost:6379/2'
@@ -18,6 +18,9 @@ module Settings
field :nostr_relay_url, type: :string, field :nostr_relay_url, type: :string,
default: ENV["NOSTR_RELAY_URL"].presence default: ENV["NOSTR_RELAY_URL"].presence
field :nostr_blossom_server_url, type: :string,
default: ENV["NOSTR_BLOSSOM_SERVER_URL"].presence
field :nostr_zaps_relay_limit, type: :integer, field :nostr_zaps_relay_limit, type: :integer,
default: 12 default: 12
@@ -29,6 +29,11 @@
title: "Relay URL", title: "Relay URL",
description: "Websockets URL of a relay associated with #{Setting.primary_domain}" description: "Websockets URL of a relay associated with #{Setting.primary_domain}"
) %> ) %>
<%= render FormElements::FieldsetResettableSettingComponent.new(
key: :nostr_blossom_server_url,
title: "Blossom server URL",
description: "HTTP URL of the Blossom media server to add to users' server lists during onboarding"
) %>
</ul> </ul>
</section> </section>
+4 -1
View File
@@ -35,7 +35,10 @@
<li>Receive zaps in your Lightning account</li> <li>Receive zaps in your Lightning account</li>
<% end %> <% end %>
<% if Setting.nostr_relay_url.present? %> <% if Setting.nostr_relay_url.present? %>
<li>Publish notes on <%= link_to "our relay", Setting.nostr_relay_url_http, class: "ks-text-link", target: "_blank" %></li> <li>Publish notes and other stuff on our Nostr relay</li>
<% end %>
<% if Setting.nostr_blossom_server_url.present? %>
<li>Publish media files on our Nostr media server</li>
<% end %> <% end %>
</ul> </ul>
<% end %> <% end %>