import Controller, { inject as controller } from "@ember/controller"; import { action } from "@ember/object"; import { alias } from "@ember/object/computed"; import { service } from "@ember/service"; import discourseComputed from "discourse-common/utils/decorators"; export default class AdminEmbeddingIndexController extends Controller { @service router; @service site; @controller adminEmbedding; @alias("adminEmbedding.embedding") embedding; get showEmbeddingCode() { return !this.site.isMobileDevice; } @discourseComputed("embedding.base_url") embeddingCode(baseUrl) { const html = `
`; return html; } @action deleteHost(host) { this.get("embedding.embeddable_hosts").removeObject(host); } }