cartodb/lib/assets/javascripts/dashboard/components/service-item/service-item.tpl
2020-06-15 10:58:47 +08:00

37 lines
1.7 KiB
Smarty

<div class="FormAccount-rowLabel">
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor FormAccount-label"><%- title %></label>
</div>
<div class="FormAccount-rowData">
<% if (connected) { %>
<input class="CDB-InputText CDB-Text FormAccount-input FormAccount-input--med is-disabled" readonly value="Connected" />
<% } else { %>
<% if (state === "loading") { %>
<button type="button" class="CDB-Size-medium FormAccount-link is-disabled">Connecting...</button>
<% } else { %>
<button type="button" class="CDB-Size-medium FormAccount-link js-connect">
<i class="ServiceIcon ServiceIcon--<%- name %>"></i>Connect
</button>
<% } %>
<% } %>
<div class="FormAccount-rowInfo FormAccount-rowInfo--marginLeft FormAccount-rowInfoText--multipleLines">
<p class="FormAccount-rowInfoText <%- state === "error" ? 'FormAccount-rowInfoText--error' : '' %>">
<% if (connected) { %>
<% if (state === "error") { %>
Ooops! There was an error, please <button type="button" class="FormAccount-link js-disconnect">try it again</button>
or <a class="FormAccount-link" href="mailto:support@carto.com">contact us</a> if the problem persists
<% } else if (state === "loading") { %>
Disconnecting...
<% } else { %>
<button type="button" class="CDB-Size-medium FormAccount-link js-disconnect">Disconnect</button>
<% } %>
<% } else { %>
<% if (state === "error") { %>
There was an error, please be sure your pop-up blocker is disabled and try again or
<a class="FormAccount-link" href="mailto:support@carto.com">contact us</a> if the problem persists
<% } %>
<% } %>
</p>
</div>
</div>