mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 05:42:41 +08:00
UX: Admin setting page consistency - Legal (#30572)
Followup c2282439b3
Make the Legal config page reached from the sidebar
use our consistent site setting page rules.
This commit is contained in:
parent
21470e4afd
commit
9a87baaab4
|
@ -0,0 +1,3 @@
|
|||
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||
|
||||
export default class AdminConfigLegalSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -0,0 +1,8 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class AdminConfigLegalRoute extends DiscourseRoute {
|
||||
titleToken() {
|
||||
return i18n("admin.community.sidebar_link.legal");
|
||||
}
|
||||
}
|
|
@ -231,6 +231,11 @@ export default function () {
|
|||
path: "/",
|
||||
});
|
||||
});
|
||||
this.route("legal", function () {
|
||||
this.route("settings", {
|
||||
path: "/",
|
||||
});
|
||||
});
|
||||
this.route("trustLevels", { path: "/trust-levels" }, function () {
|
||||
this.route("settings", {
|
||||
path: "/",
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<DPageHeader
|
||||
@titleLabel={{i18n "admin.config.legal.title"}}
|
||||
@descriptionLabel={{i18n "admin.config.legal.header_description"}}
|
||||
>
|
||||
<:breadcrumbs>
|
||||
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||
<DBreadcrumbsItem
|
||||
@path="/admin/config/legal"
|
||||
@label={{i18n "admin.config.legal.title"}}
|
||||
/>
|
||||
</:breadcrumbs>
|
||||
</DPageHeader>
|
||||
|
||||
<div class="admin-config-page__main-area">
|
||||
<AdminAreaSettings
|
||||
@area="legal"
|
||||
@path="/admin/config/legal"
|
||||
@filter={{this.filter}}
|
||||
@adminSettingsFilterChangedCallback={{this.adminSettingsFilterChangedCallback}}
|
||||
/>
|
||||
</div>
|
|
@ -79,9 +79,7 @@ export const ADMIN_NAV_MAP = [
|
|||
},
|
||||
{
|
||||
name: "admin_legal",
|
||||
route: "adminSiteSettingsCategory",
|
||||
routeModels: ["legal"],
|
||||
query: { filter: "" },
|
||||
route: "adminConfig.legal.settings",
|
||||
label: "admin.community.sidebar_link.legal",
|
||||
icon: "gavel",
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SiteSetting < ActiveRecord::Base
|
||||
VALID_AREAS = %w[about embedding emojis flags fonts notifications permalinks]
|
||||
VALID_AREAS = %w[about embedding emojis flags fonts legal notifications permalinks]
|
||||
|
||||
extend GlobalPath
|
||||
extend SiteSettingExtension
|
||||
|
|
|
@ -5146,6 +5146,9 @@ en:
|
|||
notifications:
|
||||
title: "Notifications"
|
||||
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
|
||||
legal:
|
||||
title: "Legal"
|
||||
header_description: "Configure legal settings, such as terms of service, privacy policy, contact details, and EU-specific considerations."
|
||||
trust_levels:
|
||||
title: "Trust levels"
|
||||
header_description: "Trust level settings allow you to fine-tune the requirements and notifications for your community’s progression system, which automatically promotes users to higher trust levels as they demonstrate consistent, positive engagement with your forum."
|
||||
|
|
|
@ -397,6 +397,7 @@ Discourse::Application.routes.draw do
|
|||
get "login-and-authentication" => "site_settings#index"
|
||||
get "logo" => "site_settings#index"
|
||||
get "notifications" => "site_settings#index"
|
||||
get "legal" => "site_settings#index"
|
||||
get "trust-levels" => "site_settings#index"
|
||||
|
||||
resources :flags, only: %i[index new create update destroy] do
|
||||
|
|
|
@ -53,10 +53,10 @@ required:
|
|||
contact_email:
|
||||
default: ""
|
||||
type: email
|
||||
area: "about|notifications"
|
||||
area: "about|notifications|legal"
|
||||
contact_url:
|
||||
default: ""
|
||||
area: "about"
|
||||
area: "about|legal"
|
||||
notification_email:
|
||||
default: "noreply@unconfigured.discourse.org"
|
||||
type: email
|
||||
|
@ -75,13 +75,13 @@ required:
|
|||
list_type: simple
|
||||
company_name:
|
||||
default: ""
|
||||
area: "about"
|
||||
area: "about|legal"
|
||||
governing_law:
|
||||
default: ""
|
||||
area: "about"
|
||||
area: "about|legal"
|
||||
city_for_disputes:
|
||||
default: ""
|
||||
area: "about"
|
||||
area: "about|legal"
|
||||
|
||||
branding:
|
||||
logo:
|
||||
|
@ -2564,17 +2564,22 @@ legal:
|
|||
tos_url:
|
||||
client: true
|
||||
default: ""
|
||||
area: "legal"
|
||||
privacy_policy_url:
|
||||
client: true
|
||||
default: ""
|
||||
area: "legal"
|
||||
faq_url:
|
||||
client: true
|
||||
default: ""
|
||||
area: "legal"
|
||||
log_anonymizer_details:
|
||||
default: true
|
||||
area: "legal"
|
||||
display_eu_visitor_stats:
|
||||
default: false
|
||||
client: true
|
||||
area: "legal"
|
||||
|
||||
backups:
|
||||
enable_backups:
|
||||
|
|
Loading…
Reference in New Issue
Block a user