1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Simplify self host settings controller (#1230)

This commit is contained in:
Zach Gollwitzer 2024-10-02 12:07:56 -04:00 committed by GitHub
parent cb75c537fe
commit 7fabca4679
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 252 additions and 399 deletions

View file

@ -24,8 +24,6 @@ module Maybe
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
config.action_mailer.default_options = { from: ENV["MAILER_SENDER"] }
config.active_job.queue_adapter = :good_job
config.app_mode = (ENV["SELF_HOSTING_ENABLED"] == "true" ? "self_hosted" : "managed").inquiry

View file

@ -40,18 +40,6 @@ Rails.application.configure do
config.action_mailer.raise_delivery_errors = false
config.action_mailer.delivery_method = :letter_opener
# Uncomment to send emails in development
# config.action_mailer.raise_delivery_errors = true
# config.action_mailer.delivery_method = :smtp
# config.action_mailer.smtp_settings = {
# address: ENV["SMTP_ADDRESS"],
# port: ENV["SMTP_PORT"],
# user_name: ENV["SMTP_USERNAME"],
# password: ENV["SMTP_PASSWORD"],
# tls: ENV.fetch("SMTP_TLS_ENABLED", "true") == "true"
# }
config.action_mailer.perform_caching = false
config.action_mailer.perform_deliveries = true

View file

@ -1,7 +0,0 @@
---
en:
notification_mailer:
test_email:
test_email_body: Congratulation ! Connection to the SMTP server is now correctly
configured.
test_email_subject: SMTP settings verified !

View file

@ -1,61 +1,6 @@
---
en:
settings:
hostings:
send_test_email:
error: 'Configuration error: Test email could not be sent'
missing_smtp_setting_error: Ensure that all smtp settings are filled in
success: Test email has been sent successfully
show:
domain: App Domain
domain_placeholder: mydomain.com
email_sender: Email Sender
email_sender_placeholder: user@mydomain.com
general_settings_title: General Settings
invite_settings:
generate_tokens: Generate new code
generated_tokens: Generated codes
invite_code_description: Every new user that joins your instance if Maybe
can only do so via an invite code
require_invite_for_signup: Require invite code for new sign ups
title: Invite Codes
page_title: Self-Hosting
provider_settings:
title: Provider Settings
render_deploy_hook_description: Input the deploy hook URL provided by Render
render_deploy_hook_label: Render Deploy Hook URL
render_deploy_hook_placeholder: https://api.render.com/deploy/srv-xyz...
smtp_settings:
description: Configure outgoing mail server settings for notifications and
alerts
host: SMTP Host
host_placeholder: smtp.gmail.com
password: Password
password_placeholder: "*******"
port: Port
port_placeholder: 587
send_test_email: Send test email
send_test_email_button: Send test email
send_test_email_description: Verify SMTP settings by sending a test email
title: SMTP Email Configuration
username: Username
username_placeholder: username@gmail.com
upgrades:
description: Choose how your application receives updates
latest_commit:
description: Automatically update to the latest commit (unstable)
title: Latest Commit
latest_release:
description: Automatically update to the most recent release (stable)
title: Latest Release
manual:
description: You control when to download and install updates
title: Manual
title: Auto upgrade
update:
render_deploy_hook_error: Render deploy hook must be provided to enable auto
upgrades
success: Settings updated successfully.
nav:
accounts_label: Accounts
categories_label: Categories

View file

@ -0,0 +1,39 @@
---
en:
settings:
hostings:
invite_code_settings:
description: Every new user that joins your instance if Maybe can only do
so via an invite code
generate_tokens: Generate new code
generated_tokens: Generated codes
title: Require invite code for new sign ups
provider_settings:
description: Configure settings for your hosting provider
render_deploy_hook_label: Render Deploy Hook URL
render_deploy_hook_placeholder: https://api.render.com/deploy/srv-xyz...
title: Provider Settings
show:
general: General Settings
invites: Invite Codes
title: Self-Hosting
synth_settings:
api_calls_used: "%{used} / %{limit} API calls used (%{percentage})"
description: Input the API key provided by Synth
label: API Key
placeholder: Enter your API key here
plan: "%{plan} plan"
title: Synth Settings
update:
failure: Invalid setting value
success: Settings updated
upgrade_settings:
description: Configure how your application receives updates
latest_commit_description: Automatically update to the latest commit (unstable)
latest_commit_title: Latest Commit
latest_release_description: Automatically update to the most recent release
(stable)
latest_release_title: Latest Release
manual_description: You control when to download and install updates
manual_title: Manual
title: Auto Upgrade

View file

@ -16,9 +16,7 @@ Rails.application.routes.draw do
namespace :settings do
resource :profile, only: %i[show update destroy]
resource :preferences, only: %i[show update]
resource :hosting, only: %i[show update] do
post :send_test_email, on: :collection
end
resource :hosting, only: %i[show update]
end
resources :tags, except: %i[show destroy] do