2017-05-30 16:23:38 +03:00
<section class="gh-canvas">
2019-06-18 13:47:21 +03:00
<GhCanvasHeader class="gh-canvas-header">
2017-05-30 16:23:38 +03:00
<h2 class="gh-canvas-title" data-test-screen-title>
2021-01-28 18:25:21 +03:00
<LinkTo @route="integrations" data-test-link="integrations-back">Integrations</LinkTo>
2018-03-19 12:57:31 +03:00
<span> {{ svg-jar "arrow-right" }} </span>
2017-05-30 16:23:38 +03:00
Slack
</h2>
<section class="view-actions">
2021-02-08 21:54:16 +03:00
<GhTaskButton @task= {{ this .save }} @class="gh-btn gh-btn-primary gh-btn-icon" data-test-save-button= {{ true }} />
2017-05-30 16:23:38 +03:00
</section>
2019-06-18 13:47:21 +03:00
</GhCanvasHeader>
2017-05-30 16:23:38 +03:00
2019-12-13 17:20:29 +03:00
{{ # if this .showLeaveSettingsModal }}
2020-01-16 18:14:03 +03:00
<GhFullscreenModal @modal="leave-settings"
@confirm= {{ action "leaveSettings" }}
@close= {{ action "toggleLeaveSettingsModal" }}
@modifier="action wide" />
2017-10-31 18:27:25 +03:00
{{ / if }}
2021-02-08 23:16:41 +03:00
<section class="view-container">
2021-02-08 21:54:16 +03:00
<section class="gh-main-section bt app-grid">
<div class="gh-main-section-block app-detail-heading app-grid">
<div class="app-cell">
2019-06-18 13:47:21 +03:00
<img class="app-icon" src="assets/img/slackicon.png" />
</div>
2021-02-08 21:54:16 +03:00
<div class="app-cell">
<h3>Slack</h3>
<p>A messaging app for teams</p>
</div>
2016-03-29 11:40:44 +03:00
</div>
</section>
2021-02-10 20:48:27 +03:00
<section class="gh-main-section">
<h4 class="gh-main-section-header small bn">Slack configuration</h4>
<div class="gh-main-section-block">
2021-02-23 00:44:55 +03:00
<div class="gh-main-section-content grey">
2021-02-10 20:48:27 +03:00
<form class="app-config-form" id="slack-settings" novalidate="novalidate" {{ action "save" on = "submit" }} >
2019-06-18 13:47:21 +03:00
2021-02-10 20:48:27 +03:00
<div class="gh-main-section-block">
<div class="gh-setting-first">
<div class="gh-setting-content gh-setting-content--no-action">
<div class="gh-setting-title">Webhook URL</div>
2021-02-23 00:50:51 +03:00
<div class="gh-setting-desc">Automatically send newly published posts to a channel in Slack or any Slack-compatible service like Discord or Mattermost.</div>
2021-02-10 20:48:27 +03:00
<div class="gh-setting-content-extended">
<GhFormGroup @errors= {{ this .slackSettings .errors }} @hasValidated= {{ this .slackSettings .hasValidated }} @property="url">
<GhTextInput
@placeholder="https://hooks.slack.com/services/..."
@name="slack[url]"
@value= {{ readonly this .slackSettings .url }}
@input= {{ action "updateURL" value = "target.value" }}
@keyEvents= {{ hash
Enter=(action "save")
}}
@focus-out= {{ action "triggerDirtyState" }}
data-test-slack-url-input= {{ true }}
/>
{{ # unless this .slackSettings .errors .url }}
<p>Set up a new incoming webhook <a href="https://my.slack.com/apps/new/A0F7XDUAZ-incoming-webhooks" target="_blank">here</a>, and grab the URL.</p>
{{ else }}
<GhErrorMessage @errors= {{ this .slackSettings .errors }} @property="url" data-test-error="slack-url" />
{{ / unless }}
</GhFormGroup>
</div>
2021-02-09 19:22:58 +03:00
</div>
2021-02-08 21:54:16 +03:00
</div>
2021-02-12 16:58:56 +03:00
<div class="gh-setting-last">
2021-02-10 20:48:27 +03:00
<div class="gh-setting-content gh-setting-content--no-action">
<div class="gh-setting-title">Username</div>
2021-02-23 00:50:51 +03:00
<div class="gh-setting-desc">The username to display messages from</div>
2021-02-10 20:48:27 +03:00
<div class="gh-setting-content-extended">
<GhFormGroup @errors= {{ this .slackSettings .errors }} @hasValidated= {{ this .slackSettings .hasValidated }} @property="username">
<GhTextInput
@placeholder="Ghost"
@name="slack[username]"
@value= {{ readonly this .slackSettings .username }}
@input= {{ action "updateUsername" value = "target.value" }}
@keyEvents= {{ hash
Enter=(action "save")
}}
@focus-out= {{ action "triggerDirtyState" }}
data-test-slack-username-input= {{ true }}
/>
{{ # if this .slackSettings .errors .username }}
<GhErrorMessage @errors= {{ this .slackSettings .errors }} @property="username" />
{{ / if }}
</GhFormGroup>
</div>
<GhTaskButton @buttonText="Send test notification" @task= {{ this .sendTestNotification }} @successText="Sent" @class="gh-btn gh-btn-icon" @disabled= {{ this .testNotificationDisabled }} data-test-send-notification-button="true" />
2021-02-09 19:22:58 +03:00
</div>
2021-02-08 21:54:16 +03:00
</div>
2019-06-18 13:47:21 +03:00
</div>
2021-02-10 20:48:27 +03:00
</form>
</div>
</div>
</section>
2016-03-29 11:40:44 +03:00
</section>
</section>