2016-11-30 02:07:53 +08:00
|
|
|
export default function() {
|
2018-06-15 23:03:24 +08:00
|
|
|
this.route("admin", { resetNamespace: true }, function() {
|
2019-04-01 18:39:49 +08:00
|
|
|
this.route("dashboard", { path: "/" }, function() {
|
2018-07-27 02:59:28 +08:00
|
|
|
this.route("general", { path: "/" });
|
2019-04-01 18:39:49 +08:00
|
|
|
this.route("admin.dashboardModeration", {
|
2018-07-27 02:59:28 +08:00
|
|
|
path: "/dashboard/moderation",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
2019-04-01 18:39:49 +08:00
|
|
|
this.route("admin.dashboardSecurity", {
|
2018-12-14 20:47:59 +08:00
|
|
|
path: "/dashboard/security",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
2019-04-01 18:39:49 +08:00
|
|
|
this.route("admin.dashboardReports", {
|
2018-12-19 21:44:43 +08:00
|
|
|
path: "/dashboard/reports",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
2018-07-20 02:33:11 +08:00
|
|
|
});
|
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
this.route(
|
|
|
|
"adminSiteSettings",
|
|
|
|
{ path: "/site_settings", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("adminSiteSettingsCategory", {
|
|
|
|
path: "category/:category_id",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminEmail",
|
|
|
|
{ path: "/email", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("sent");
|
|
|
|
this.route("skipped");
|
|
|
|
this.route("bounced");
|
|
|
|
this.route("received");
|
|
|
|
this.route("rejected");
|
|
|
|
this.route("previewDigest", { path: "/preview-digest" });
|
2018-11-29 07:03:50 +08:00
|
|
|
this.route("advancedTest", { path: "/advanced-test" });
|
2018-06-15 23:03:24 +08:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminCustomize",
|
|
|
|
{ path: "/customize", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("colors", function() {
|
|
|
|
this.route("show", { path: "/:scheme_id" });
|
|
|
|
});
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminCustomizeThemes",
|
|
|
|
{ path: "themes", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("show", { path: "/:theme_id" });
|
|
|
|
this.route("edit", { path: "/:theme_id/:target/:field_name/edit" });
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminSiteText",
|
|
|
|
{ path: "/site_texts", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("edit", { path: "/:id" });
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route("adminUserFields", {
|
|
|
|
path: "/user_fields",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
|
|
|
this.route("adminEmojis", { path: "/emojis", resetNamespace: true });
|
|
|
|
this.route("adminPermalinks", {
|
|
|
|
path: "/permalinks",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
|
|
|
this.route("adminEmbedding", {
|
|
|
|
path: "/embedding",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
|
|
|
this.route(
|
|
|
|
"adminCustomizeEmailTemplates",
|
|
|
|
{ path: "/email_templates", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("edit", { path: "/:id" });
|
|
|
|
}
|
|
|
|
);
|
2019-07-16 01:47:44 +08:00
|
|
|
this.route("adminCustomizeRobotsTxt", {
|
|
|
|
path: "/robots",
|
|
|
|
resetNamespace: true
|
|
|
|
});
|
2019-07-31 03:05:08 +08:00
|
|
|
this.route(
|
|
|
|
"adminCustomizeEmailStyle",
|
|
|
|
{ path: "/email_style", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("edit", { path: "/:field_name" });
|
|
|
|
}
|
|
|
|
);
|
2018-06-15 23:03:24 +08:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route("adminApi", { path: "/api", resetNamespace: true }, function() {
|
2019-11-05 22:10:23 +08:00
|
|
|
this.route(
|
|
|
|
"adminApiKeys",
|
|
|
|
{ path: "/keys", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("show", { path: "/:api_key_id" });
|
|
|
|
this.route("new", { path: "/new" });
|
|
|
|
}
|
|
|
|
);
|
2018-06-15 23:03:24 +08:00
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminWebHooks",
|
|
|
|
{ path: "/web_hooks", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("show", { path: "/:web_hook_id" });
|
|
|
|
this.route("showEvents", { path: "/:web_hook_id/events" });
|
|
|
|
}
|
|
|
|
);
|
2013-11-14 03:02:47 +08:00
|
|
|
});
|
2013-04-05 00:59:44 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
this.route(
|
|
|
|
"admin.backups",
|
|
|
|
{ path: "/backups", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("logs");
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2018-06-18 18:31:56 +08:00
|
|
|
this.route(
|
|
|
|
"adminReports",
|
|
|
|
{ path: "/reports", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("show", { path: ":type" });
|
|
|
|
}
|
|
|
|
);
|
2013-06-04 04:12:24 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
this.route(
|
|
|
|
"adminLogs",
|
|
|
|
{ path: "/logs", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("staffActionLogs", { path: "/staff_action_logs" });
|
|
|
|
this.route("screenedEmails", { path: "/screened_emails" });
|
|
|
|
this.route("screenedIpAddresses", { path: "/screened_ip_addresses" });
|
|
|
|
this.route("screenedUrls", { path: "/screened_urls" });
|
|
|
|
this.route(
|
|
|
|
"adminSearchLogs",
|
|
|
|
{ path: "/search_logs", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("index", { path: "/" });
|
2019-03-29 10:39:44 +08:00
|
|
|
this.route("term", { path: "/term" });
|
2018-06-15 23:03:24 +08:00
|
|
|
}
|
|
|
|
);
|
|
|
|
this.route(
|
|
|
|
"adminWatchedWords",
|
|
|
|
{ path: "/watched_words", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("index", { path: "/" });
|
|
|
|
this.route("action", { path: "/action/:action_id" });
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminUsers",
|
|
|
|
{ path: "/users", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route(
|
|
|
|
"adminUser",
|
|
|
|
{ path: "/:user_id/:username", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("badges");
|
|
|
|
this.route("tl3Requirements", { path: "/tl3_requirements" });
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminUsersList",
|
|
|
|
{ path: "/list", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("show", { path: "/:filter" });
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminBadges",
|
|
|
|
{ path: "/badges", resetNamespace: true },
|
|
|
|
function() {
|
2020-01-13 22:20:26 +08:00
|
|
|
this.route("award", { path: "/award/:badge_id" });
|
2018-06-15 23:03:24 +08:00
|
|
|
this.route("show", { path: "/:badge_id" });
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
this.route(
|
|
|
|
"adminPlugins",
|
|
|
|
{ path: "/plugins", resetNamespace: true },
|
|
|
|
function() {
|
|
|
|
this.route("index", { path: "/" });
|
|
|
|
}
|
|
|
|
);
|
2016-11-30 02:07:53 +08:00
|
|
|
});
|
2018-06-15 23:03:24 +08:00
|
|
|
}
|