mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Reorganize Settings sections + add LLM model/prompt configs (#116)
* Reshuffle/organize settings UI * Settings: AI prompt display/minor touch-ups * API key settings tests * Moved import/export together * Collapsible LLM prompt DIVs * Add export tests
This commit is contained in:
12
app/controllers/settings/ai_prompts_controller.rb
Normal file
12
app/controllers/settings/ai_prompts_controller.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class Settings::AiPromptsController < ApplicationController
|
||||
layout "settings"
|
||||
|
||||
def show
|
||||
@breadcrumbs = [
|
||||
[ "Home", root_path ],
|
||||
[ "AI Prompts", nil ]
|
||||
]
|
||||
@family = Current.family
|
||||
@assistant_config = Assistant.config_for(OpenStruct.new(user: Current.user))
|
||||
end
|
||||
end
|
||||
@@ -8,7 +8,7 @@ class Settings::ApiKeysController < ApplicationController
|
||||
def show
|
||||
@breadcrumbs = [
|
||||
[ "Home", root_path ],
|
||||
[ "API Keys", nil ]
|
||||
[ "API Key", nil ]
|
||||
]
|
||||
@current_api_key = @api_key
|
||||
end
|
||||
|
||||
18
app/controllers/settings/guides_controller.rb
Normal file
18
app/controllers/settings/guides_controller.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class Settings::GuidesController < ApplicationController
|
||||
layout "settings"
|
||||
|
||||
def show
|
||||
@breadcrumbs = [
|
||||
[ "Home", root_path ],
|
||||
[ "Guides", nil ]
|
||||
]
|
||||
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
|
||||
autolink: true,
|
||||
tables: true,
|
||||
fenced_code_blocks: true,
|
||||
strikethrough: true,
|
||||
superscript: true
|
||||
)
|
||||
@guide_content = markdown.render(File.read(Rails.root.join("docs/onboarding/guide.md")))
|
||||
end
|
||||
end
|
||||
@@ -5,6 +5,10 @@ class Settings::ProfilesController < ApplicationController
|
||||
@user = Current.user
|
||||
@users = Current.family.users.order(:created_at)
|
||||
@pending_invitations = Current.family.invitations.pending
|
||||
@breadcrumbs = [
|
||||
[ "Home", root_path ],
|
||||
[ "Profile Info", nil ]
|
||||
]
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in New Issue
Block a user