discourse/app/assets/javascripts/admin/addon/templates/email-server-settings.gjs
Ted Johansson b1e97d9ebd
DEV: Add e-mail site settings to e-mail admin page (#32214)
Follow-up to #32211. This PR adds a Settings tab to the Email settings admin page. The current Settings tab is renamed to Server settings.
2025-04-08 18:59:50 +08:00

53 lines
1.6 KiB
Text
Vendored

import RouteTemplate from "ember-route-template";
import DButton from "discourse/components/d-button";
import TextField from "discourse/components/text-field";
import { i18n } from "discourse-i18n";
export default RouteTemplate(
<template>
<table class="table">
<tbody>
<tr>
<th>{{i18n "admin.email.delivery_method"}}</th>
<td>{{@controller.delivery_method}}</td>
</tr>
{{#each @controller.model.settings as |s|}}
<tr>
<th style="width: 25%">{{s.name}}</th>
<td>{{s.value}}</td>
</tr>
{{/each}}
</tbody>
</table>
<form>
<div class="admin-controls">
<div class="controls">
<div class="inline-form">
{{#if @controller.sendingEmail}}
{{i18n "admin.email.sending_test"}}
{{else}}
<TextField
@value={{@controller.testEmailAddress}}
@placeholderKey="admin.email.test_email_address"
/>
<DButton
@action={{@controller.sendTestEmail}}
@disabled={{@controller.sendTestEmailDisabled}}
@label="admin.email.send_test"
type="submit"
class="btn-primary"
/>
{{#if @controller.sentTestEmailMessage}}
<span
class="result-message"
>{{@controller.sentTestEmailMessage}}</span>
{{/if}}
{{/if}}
</div>
</div>
</div>
</form>
</template>
);