FEATURE: Use DBreadcrumbsItem in admin UI (#631)
This commit uses the new DBreadcrumbsItem and DBreadcrumbsContainer from core to show a path back to the admin plugins list.
This commit is contained in:
parent
59e63a2da9
commit
06137ac706
|
@ -1,3 +1,9 @@
|
|||
<DBreadcrumbsItem as |linkClass|>
|
||||
<LinkTo @route="adminPlugins.show.discourse-ai-personas" class={{linkClass}}>
|
||||
{{@model.plugin.nameTitleized}}
|
||||
</LinkTo>
|
||||
</DBreadcrumbsItem>
|
||||
|
||||
<AiPersonaListEditor
|
||||
@personas={{this.allPersonas}}
|
||||
@currentPersona={{this.model}}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { concat } from "@ember/helper";
|
||||
import { LinkTo } from "@ember/routing";
|
||||
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
import I18n from "discourse-i18n";
|
||||
|
@ -12,6 +13,15 @@ export default class AiLlmsListEditor extends Component {
|
|||
}
|
||||
|
||||
<template>
|
||||
<DBreadcrumbsItem as |linkClass|>
|
||||
<LinkTo
|
||||
@route="adminPlugins.show.discourse-ai-personas"
|
||||
class={{linkClass}}
|
||||
>
|
||||
{{i18n "discourse_ai.llms.short_title"}}
|
||||
</LinkTo>
|
||||
</DBreadcrumbsItem>
|
||||
|
||||
<section class="ai-llms-list-editor admin-detail pull-left">
|
||||
{{#if @currentLlm}}
|
||||
<AiLlmEditor @model={{@currentLlm}} @llms={{@llms}} />
|
||||
|
|
|
@ -4,6 +4,7 @@ import { fn } from "@ember/helper";
|
|||
import { on } from "@ember/modifier";
|
||||
import { action } from "@ember/object";
|
||||
import { LinkTo } from "@ember/routing";
|
||||
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
|
||||
import DToggleSwitch from "discourse/components/d-toggle-switch";
|
||||
import concatClass from "discourse/helpers/concat-class";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
|
@ -42,6 +43,15 @@ export default class AiPersonaListEditor extends Component {
|
|||
}
|
||||
|
||||
<template>
|
||||
<DBreadcrumbsItem as |linkClass|>
|
||||
<LinkTo
|
||||
@route="adminPlugins.show.discourse-ai-personas"
|
||||
class={{linkClass}}
|
||||
>
|
||||
{{i18n "discourse_ai.ai_persona.short_title"}}
|
||||
</LinkTo>
|
||||
</DBreadcrumbsItem>
|
||||
|
||||
<section class="ai-persona-list-editor__current admin-detail pull-left">
|
||||
{{#if @currentPersona}}
|
||||
<AiPersonaEditor @model={{@currentPersona}} @personas={{@personas}} />
|
||||
|
|
Loading…
Reference in New Issue