Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
✨ Added Zapier app with pre-built zap templates list (#943)
Browse files Browse the repository at this point in the history
no issue

- add Zapier app to Apps screen
- use Zapier's zap template embed widget to list our pre-built templates
  • Loading branch information
kevinansfield authored and kirrg001 committed Jan 9, 2018
1 parent ab99bcd commit b8fc560
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/controllers/settings/apps/zapier.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Controller from '@ember/controller';

export default Controller.extend({
});
1 change: 1 addition & 0 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Router.map(function () {
this.route('slack', {path: 'slack'});
this.route('amp', {path: 'amp'});
this.route('unsplash', {path: 'unsplash'});
this.route('zapier', {path: 'zapier'});
});

this.route('subscribers', function () {
Expand Down
4 changes: 4 additions & 0 deletions app/routes/settings/apps/zapier.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';

export default Route.extend({
});
4 changes: 4 additions & 0 deletions app/styles/layouts/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
margin: 0 50px 0 0;
}

.gh-setting-content--no-action {
margin: 0;
}

.gh-setting-title {
margin-bottom: 2px;
font-size: 1.8rem;
Expand Down
20 changes: 20 additions & 0 deletions app/templates/settings/apps/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,26 @@
</article>
{{/link-to}}
</div>

<div class="apps-grid-cell" data-test-app="zapier">
{{#link-to "settings.apps.zapier" data-test-link="zapier"}}
<article class="apps-card-app">
<div class="apps-card-left">
<figure class="apps-card-app-icon" style="background-image:url(assets/img/zapiericon.png);background-size:45px;"></figure>
<div class="apps-card-meta">
<h3 class="apps-card-app-title">Zapier</h3>
<p class="apps-card-app-desc">Automation for your favourite apps</p>
</div>
</div>
<div class="gh-card-right">
<div class="apps-configured">
<span data-test-app-status>Configure</span>
{{inline-svg "arrow-right"}}
</div>
</div>
</article>
{{/link-to}}
</div>
</div>
<p class="apps-grid-note">(More coming soon!)</p>
</section>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/settings/apps/slack.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<form class="app-config-form" id="slack-settings" novalidate="novalidate" {{action "save" on="submit"}}>
<div class="gh-setting-header">Slack configuration</div>
<div class="gh-setting">
<div class="gh-setting-content">
<div class="gh-setting-content gh-setting-content--no-action">
<div class="gh-setting-title">Webhook URL</div>
<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>
<div class="gh-setting-content-extended">
Expand Down
38 changes: 38 additions & 0 deletions app/templates/settings/apps/zapier.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<section class="gh-canvas">
<header class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>
{{#link-to "settings.apps.index"}}Apps{{/link-to}}
<span>{{inline-svg "arrow-right"}}</span>
Zapier
</h2>
<section class="view-actions">
{{gh-task-button task=save class="gh-btn gh-btn-blue gh-btn-icon" data-test-save-button=true}}
</section>
</header>

<section class="view-container">
<br>
<section class="app-grid">
<div class="app-cell">
<img class="app-icon" src="assets/img/zapiericon.png" />
</div>
<div class="app-cell">
<h3>Zapier</h3>
<p>Automation for your favourite apps</p>
</div>
</section>

<div class="gh-setting-header">Zapier configuration</div>
<div class="gh-setting" id="zapier-toggle">
<div class="gh-setting-content gh-setting-content--no-action">
<div class="gh-setting-title">Zapier Templates</div>
<div class="gh-setting-desc">Explore pre-built templates for common automation tasks</div>
<div class="gh-setting-content-extended">
<div id="zapier-templates">
<script src="https://zapier.com/apps/embed/widget.js?services=ghost&container=true&limit=10&html_id=zapier-templates"></script>
</div>
</div>
</div>
</div>
</section>
</section>
Binary file added public/assets/img/zapiericon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b8fc560

Please sign in to comment.