mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 12:08:12 -05:00
FIX: Restore support for normalized plugin routes under admin/ (#35598)
Following 37648149c4, it became impossible
to resolve some deprecations with plugin admin templates. This commit
fixes that problem, and also resolves the deprecation for the
chat-integration plugin.
This commit is contained in:
@@ -387,6 +387,7 @@ export function buildResolver(baseName) {
|
||||
let adminParsedName = this.parseName(`template:${namespaced}`);
|
||||
const candidates = [
|
||||
[parsedName, "discourse/admin/templates/"],
|
||||
[parsedName, "admin/templates/"],
|
||||
[adminParsedName, "admin/templates/"],
|
||||
[adminParsedName, "discourse/admin/templates/"],
|
||||
[adminParsedName, "admin/"],
|
||||
|
||||
@@ -431,6 +431,13 @@ module("Unit | Ember | resolver", function (hooks) {
|
||||
}
|
||||
);
|
||||
|
||||
lookupTemplate(
|
||||
assert,
|
||||
"template:admin/plugin-template",
|
||||
"discourse/plugins/my-plugin/discourse/templates/admin/plugin-template",
|
||||
"looks up templates in plugin discourse namespace with correct name"
|
||||
);
|
||||
|
||||
withSilencedDeprecations(
|
||||
"discourse.deprecated-resolver-normalization",
|
||||
() => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import RouteTemplate from "ember-route-template";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import icon from "discourse/helpers/d-icon";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import ChannelDetails from "../components/channel-details";
|
||||
import ChannelDetails from "../../../components/channel-details";
|
||||
|
||||
export default RouteTemplate(
|
||||
<template>
|
||||
Reference in New Issue
Block a user