mirror of
https://github.com/discourse/discourse.git
synced 2025-04-26 21:54:32 +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",
|
label: "admin.community.sidebar_link.trust_levels",
|
||||||
icon: "user-shield",
|
icon: "user-shield",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "admin_users",
|
|
||||||
route: "adminUsers",
|
|
||||||
label: "admin.community.sidebar_link.users",
|
|
||||||
icon: "users",
|
|
||||||
moderator: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "admin_user_fields",
|
name: "admin_user_fields",
|
||||||
route: "adminUserFields",
|
route: "adminUserFields",
|
||||||
|
@ -158,6 +158,13 @@ export function useAdminNavConfig(navMap) {
|
|||||||
icon: "home",
|
icon: "home",
|
||||||
moderator: true,
|
moderator: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "admin_users",
|
||||||
|
route: "adminUsers",
|
||||||
|
label: "admin.community.sidebar_link.users",
|
||||||
|
icon: "users",
|
||||||
|
moderator: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "admin_all_site_settings",
|
name: "admin_all_site_settings",
|
||||||
route: "adminSiteSettings",
|
route: "adminSiteSettings",
|
||||||
|
@ -34,8 +34,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||||||
it "collapses sections by default" do
|
it "collapses sections by default" do
|
||||||
visit("/admin")
|
visit("/admin")
|
||||||
links = page.all(".sidebar-section-link-content-text")
|
links = page.all(".sidebar-section-link-content-text")
|
||||||
expect(links.count).to eq(2)
|
expect(links.count).to eq(3)
|
||||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "respects the user homepage preference for the Back to Forum link" do
|
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
|
it "temporarily expands section when filter" do
|
||||||
visit("/admin")
|
visit("/admin")
|
||||||
links = page.all(".sidebar-section-link-content-text")
|
links = page.all(".sidebar-section-link-content-text")
|
||||||
expect(links.count).to eq(2)
|
expect(links.count).to eq(3)
|
||||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||||
|
|
||||||
filter.filter("ie")
|
filter.filter("ie")
|
||||||
links = page.all(".sidebar-section-link-content-text")
|
links = page.all(".sidebar-section-link-content-text")
|
||||||
@ -126,8 +126,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
|
|||||||
|
|
||||||
filter.filter("")
|
filter.filter("")
|
||||||
links = page.all(".sidebar-section-link-content-text")
|
links = page.all(".sidebar-section-link-content-text")
|
||||||
expect(links.count).to eq(2)
|
expect(links.count).to eq(3)
|
||||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "allows further filtering of site settings or users if links do not show results" do
|
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
|
sidebar.toggle_all_sections
|
||||||
|
|
||||||
links = page.all(".sidebar-section-link-content-text")
|
links = page.all(".sidebar-section-link-content-text")
|
||||||
expect(links.count).to eq(2)
|
expect(links.count).to eq(3)
|
||||||
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
|
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
|
||||||
|
|
||||||
sidebar.toggle_all_sections
|
sidebar.toggle_all_sections
|
||||||
links = page.all(".sidebar-section-link-content-text")
|
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(
|
expect(links.map(&:text)).to eq(
|
||||||
[
|
[
|
||||||
"Dashboard",
|
"Dashboard",
|
||||||
|
"Users",
|
||||||
"What's New",
|
"What's New",
|
||||||
"All",
|
"All",
|
||||||
"Users",
|
|
||||||
"Watched Words",
|
"Watched Words",
|
||||||
"Screened Emails",
|
"Screened Emails",
|
||||||
"Screened IPs",
|
"Screened IPs",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user