Skip to content

Commit 6eb19c2

Browse files
committed
Works with deploy status cancelled now.
1 parent b3f7cf5 commit 6eb19c2

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

Diff for: css/main.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
.nd-status-no-build-hook .msg-success,
1111
.nd-status-success .msg-success,
1212
.nd-status-building .msg-building,
13-
.nd-status-failed .msg-failed {
13+
.nd-status-canceled .msg-canceled,
14+
.nd-status-failed .msg-failed,
15+
.nd-status-unknown .msg-unknown {
1416
display: inline-block;
1517
}
1618
.page-nd-options .error {

Diff for: includes/admin-bar.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ function nd_toolbar_item($wp_admin_bar)
1414
}
1515

1616
$title = '
17-
<span class="msg msg-success"><span class="dashicons dashicons-admin-site"></span> New Deploy</span>
18-
<span class="msg msg-building"><span class="dashicons dashicons-backup"></span> Deploying</span>
19-
<span class="msg msg-failed"><span class="dashicons dashicons-dismiss"></span> Deploy failed</span>
17+
<span class="msg msg-success" title="Last deploy succeeded. Click to trigger new deploy."><span class="dashicons dashicons-admin-site"></span> New Deploy</span>
18+
<span class="msg msg-building" title="Deploy building"><span class="dashicons dashicons-backup"></span> Deploying</span>
19+
<span class="msg msg-failed" title="Deploy failed"><span class="dashicons dashicons-warning"></span> Deploy failed</span>
20+
<span class="msg msg-canceled" title="Deploy canceled"><span class="dashicons dashicons-dismiss"></span> Deploy cancelled</span>
21+
<span class="msg msg-unknown" title="Deploy status unknown"><span class="dashicons dashicons-flag"></span> Deploy status unknown</span>
2022
';
2123

2224
$args = [

Diff for: includes/utilities.php

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function nd_get_build_status($content_header = "")
9292
case strpos($content_header, "building") !== false:
9393
$status = "building";
9494
break;
95+
96+
case strpos($content_header, "canceled") !== false:
97+
$status = "canceled";
98+
break;
9599

96100
case strpos($content_header, "failed") !== false:
97101
$status = "failed";

Diff for: js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ var nd = {
8888
// Update adminbar class
8989
$j(".nd-deploy-button")
9090
.removeClass(
91-
"nd-status-unknown nd-status-success nd-status-building nd-status-failed"
91+
"nd-status-unknown nd-status-success nd-status-building nd-status-failed nd-status-canceled"
9292
)
9393
.addClass("nd-status-" + status);
9494
},

Diff for: netlify-deploy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: Netlify Deploy
44
Description: Trigger a deploy to Netlify either automatically or with a button in the dashboard.
5-
Version: 1.0.2
5+
Version: 1.1.0
66
Author: Funkhaus
77
Plugin URI: https://github.com/funkhaus/netlify-deploy
88
Author URI: http://funkhaus.us

0 commit comments

Comments
 (0)