UX: Admin setting page consistency - User API (#30610)
Create a basic config page that only contains user API-related settings, to replace the "user_api" category view linked to from "User API" in the admin sidebar.
This commit is contained in:
parent
18a8ca38ff
commit
46e4290a2a
|
@ -0,0 +1,3 @@
|
|||
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||
|
||||
export default class AdminConfigUserApiSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -0,0 +1,8 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class AdminConfigUserApiRoute extends DiscourseRoute {
|
||||
titleToken() {
|
||||
return i18n("admin.advanced.sidebar_link.user_api");
|
||||
}
|
||||
}
|
|
@ -312,6 +312,9 @@ export default function () {
|
|||
this.route("spam", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
this.route("user-api", function () {
|
||||
this.route("settings", { path: "/" });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
import RouteTemplate from "ember-route-template";
|
||||
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
|
||||
import DPageHeader from "discourse/components/d-page-header";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import AdminAreaSettings from "admin/components/admin-area-settings";
|
||||
|
||||
export default RouteTemplate(<template>
|
||||
<DPageHeader
|
||||
@titleLabel={{i18n "admin.config.user_api.title"}}
|
||||
@descriptionLabel={{i18n "admin.config.user_api.header_description"}}
|
||||
>
|
||||
<:breadcrumbs>
|
||||
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||
<DBreadcrumbsItem
|
||||
@path="/admin/config/user-api"
|
||||
@label={{i18n "admin.config.user_api.title"}}
|
||||
/>
|
||||
</:breadcrumbs>
|
||||
</DPageHeader>
|
||||
|
||||
<div class="admin-config-page__main-area">
|
||||
<AdminAreaSettings
|
||||
@categories="user_api"
|
||||
@path="/admin/config/user-api"
|
||||
@filter={{@controller.filter}}
|
||||
@adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
|
||||
/>
|
||||
</div>
|
||||
</template>);
|
|
@ -244,9 +244,7 @@ export const ADMIN_NAV_MAP = [
|
|||
},
|
||||
{
|
||||
name: "admin_user_api",
|
||||
route: "adminSiteSettingsCategory",
|
||||
routeModels: ["user_api"],
|
||||
query: { filter: "" },
|
||||
route: "adminConfig.user-api.settings",
|
||||
label: "admin.advanced.sidebar_link.user_api",
|
||||
icon: "shuffle",
|
||||
},
|
||||
|
|
|
@ -5173,6 +5173,9 @@ en:
|
|||
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"
|
||||
user_api:
|
||||
title: "User API"
|
||||
header_description: "Configure which user groups can access the API, as well as which scopes are allowed"
|
||||
group_permissions:
|
||||
title: "Group permissions"
|
||||
header_description: "All group-based app permissions are managed here, which control access to various features within Discourse"
|
||||
|
|
|
@ -404,6 +404,7 @@ Discourse::Application.routes.draw do
|
|||
get "search" => "site_settings#index"
|
||||
get "security" => "site_settings#index"
|
||||
get "spam" => "site_settings#index"
|
||||
get "user-api" => "site_settings#index"
|
||||
get "experimental" => "site_settings#index"
|
||||
get "trust-levels" => "site_settings#index"
|
||||
get "group-permissions" => "site_settings#index"
|
||||
|
|
Loading…
Reference in New Issue