<% content_for :title, 'Settings' %>

User Settings

<%= render 'settings/navigation' %>
<%= form_for :settings, url: settings_path, method: :patch, data: { turbo_method: :patch, turbo: false } do |f| %>

Immich Integration

<%= f.label :immich_url, class: 'label' do %> Immich URL <% end %> <%= f.url_field :immich_url, value: current_user.safe_settings.immich_url, class: "input input-bordered w-full pr-10", placeholder: 'http://192.168.0.1:2283' %> The base URL of your Immich instance
<%= f.label :immich_api_key, class: 'label' do %> Immich API Key <% end %>
<%= f.password_field :immich_api_key, value: current_user.safe_settings.immich_api_key, class: "input input-bordered w-full pr-10", placeholder: 'xxxxxxxxxxxxxx' %>
Found in your Immich admin panel under API settings
<%#
%>

Photoprism Integration

<%= f.label :photoprism_url, class: 'label' do %> Photoprism URL <% end %>
<%= f.url_field :photoprism_url, value: current_user.safe_settings.photoprism_url, class: "input input-bordered w-full pr-10", placeholder: 'http://192.168.0.1:2342' %>
The base URL of your Photoprism instance
<%= f.label :photoprism_api_key, class: 'label' do %> Photoprism API Key <% end %>
<%= f.password_field :photoprism_api_key, value: current_user.safe_settings.photoprism_api_key, class: "input input-bordered w-full pr-10", placeholder: 'xxxxxxxxxxxxxx' %>
Found in your Photoprism settings under Library
<%#
%>
<% unless DawarichSettings.self_hosted? %>

Connected Accounts

Patreon

<% if current_user.patreon_connected? %> Connected <% else %> Not connected <% end %>

<% if current_user.patreon_connected? %> <%= button_to "Disconnect", disconnect_patreon_settings_path, method: :delete, class: "btn btn-sm btn-outline btn-error", form: { data: { turbo_confirm: "Are you sure you want to disconnect your Patreon account?" } } %> <% else %> <%= link_to "Connect", user_patreon_omniauth_authorize_path, class: "btn btn-sm btn-primary", method: :post %> <% end %>

Connect your Patreon account to support the development of Dawarich and get access to exclusive features.

<% end %>
<%= f.submit "Save changes", class: "btn btn-primary" %>
<% end %>