mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
UX: move users link to the top of the admin sidebar (#27339)
Before, users link was in the community section.
This commit is contained in:
parent
9ff0805a1d
commit
c1ecbb8d28
|
@ -82,13 +82,6 @@ export const ADMIN_NAV_MAP = [
|
|||
label: "admin.community.sidebar_link.trust_levels",
|
||||
icon: "user-shield",
|
||||
},
|
||||
{
|
||||
name: "admin_users",
|
||||
route: "adminUsers",
|
||||
label: "admin.community.sidebar_link.users",
|
||||
icon: "users",
|
||||
moderator: true,
|
||||
},
|
||||
{
|
||||
name: "admin_user_fields",
|
||||
route: "adminUserFields",
|
||||
|
|
|
@ -158,6 +158,13 @@ export function useAdminNavConfig(navMap) {
|
|||
icon: "home",
|
||||
moderator: true,
|
||||
},
|
||||
{
|
||||
name: "admin_users",
|
||||
route: "adminUsers",
|
||||
label: "admin.community.sidebar_link.users",
|
||||
icon: "users",
|
||||
moderator: true,
|
||||
},
|
||||
{
|
||||
name: "admin_all_site_settings",
|
||||
route: "adminSiteSettings",
|
||||
|
|
|
@ -34,8 +34,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||
it "collapses sections by default" do
|
||||
visit("/admin")
|
||||
links = page.all(".sidebar-section-link-content-text")
|
||||
expect(links.count).to eq(2)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
||||
expect(links.count).to eq(3)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||
end
|
||||
|
||||
it "respects the user homepage preference for the Back to Forum link" do
|
||||
|
@ -116,8 +116,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||
it "temporarily expands section when filter" do
|
||||
visit("/admin")
|
||||
links = page.all(".sidebar-section-link-content-text")
|
||||
expect(links.count).to eq(2)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
||||
expect(links.count).to eq(3)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||
|
||||
filter.filter("ie")
|
||||
links = page.all(".sidebar-section-link-content-text")
|
||||
|
@ -126,8 +126,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||
|
||||
filter.filter("")
|
||||
links = page.all(".sidebar-section-link-content-text")
|
||||
expect(links.count).to eq(2)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
||||
expect(links.count).to eq(3)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||
end
|
||||
|
||||
it "allows further filtering of site settings or users if links do not show results" do
|
||||
|
@ -167,8 +167,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||
sidebar.toggle_all_sections
|
||||
|
||||
links = page.all(".sidebar-section-link-content-text")
|
||||
expect(links.count).to eq(2)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
||||
expect(links.count).to eq(3)
|
||||
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||
|
||||
sidebar.toggle_all_sections
|
||||
links = page.all(".sidebar-section-link-content-text")
|
||||
|
@ -224,9 +224,9 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||
expect(links.map(&:text)).to eq(
|
||||
[
|
||||
"Dashboard",
|
||||
"Users",
|
||||
"What's New",
|
||||
"All",
|
||||
"Users",
|
||||
"Watched Words",
|
||||
"Screened Emails",
|
||||
"Screened IPs",
|
||||
|
|
Loading…
Reference in New Issue
Block a user