Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
86a6e62
remove old video config
DavidCramer Apr 24, 2020
a20b31e
add styles and rebuild assets
DavidCramer Apr 24, 2020
bbb6fba
add notice handling and ui on dashboard.
DavidCramer Apr 24, 2020
687d3f3
improve consistancey on meta and allow switching between account types
DavidCramer Apr 25, 2020
5526d0e
clean up video js error
DavidCramer Apr 25, 2020
0cfbe84
make method to get stat value.
DavidCramer May 8, 2020
bfa187f
merge develop
DavidCramer May 8, 2020
20399d2
Fix a if condition that could stop a listing page. See CLOUD 409.
May 13, 2020
547645e
Replace the bulk sync status feedback script
May 14, 2020
e41b014
Improve consistency
May 14, 2020
c79963d
Add running flag to the REST response
May 14, 2020
c9d6735
Add loading icon
May 14, 2020
f06bcea
Replace the out of status by the simple syncing icon
May 14, 2020
f696a04
update texts and remove forced reload.
DavidCramer May 19, 2020
068f235
Merge pull request #76 from cloudinary/feature/CLOUD-396
May 19, 2020
5760d7b
Update loading url
May 19, 2020
397ee44
Check vars before use them
May 26, 2020
1fe6402
Try to set SVGs size
May 26, 2020
6572de6
Move the queue resume to the shutdown
May 26, 2020
7b3d9f7
Add a fallback cron job that ensures that the queue is resumed
May 26, 2020
1a9d9fd
Use constants for better readability
May 27, 2020
24990f4
Check if the queue is running
May 27, 2020
60af7ff
Merge pull request #87 from cloudinary/fix/CLOUD-425
May 29, 2020
3efb566
merge dev
DavidCramer May 29, 2020
1599f75
Merge pull request #88 from cloudinary/fix/CLOUD-403
May 29, 2020
ca778f0
Merge pull request #85 from cloudinary/feature/CLOUD-408
May 29, 2020
6753876
Merge pull request #83 from cloudinary/fix/CLOUD-409
May 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,95 +1,109 @@
@font-face {
font-family: 'cloudinary';
src: url('fonts/cloudinary.eot?fj77m5');
src: url('fonts/cloudinary.eot?fj77m5#iefix') format('embedded-opentype'),
font-family : 'cloudinary';
src : url('fonts/cloudinary.eot?fj77m5');
src : url('fonts/cloudinary.eot?fj77m5#iefix') format('embedded-opentype'),
url('fonts/cloudinary.ttf?fj77m5') format('truetype'),
url('fonts/cloudinary.woff?fj77m5') format('woff'),
url('fonts/cloudinary.svg?fj77m5#cloudinary') format('svg');
font-weight: normal;
font-style: normal;
font-weight : normal;
font-style : normal;
}

.dashicons {
&-cloudinary {
/* use !important to prevent issues with browser extensions that change fonts */
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
speak : none;
font-style : normal;
font-weight : normal;
font-variant : normal;
text-transform : none;
line-height : 1;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing : antialiased;
-moz-osx-font-smoothing : grayscale;

&:before {
font-family: 'cloudinary' !important;
content: '\e900';
font-family : 'cloudinary' !important;
content : '\e900';
}

&.success {
color: $color-green;
color : $color-green;
}

&.error {
color: $color-red;
color : $color-red;

&:before {
content: '\e901';
content : '\e901';
}
}

&.warning {
color: $color-orange;
color : $color-orange;

&:before {
content: '\e902';
content : '\e902';
}
}

&.warning {
color: $color-orange;
color : $color-orange;
}

&.warning {
color: $color-orange;
color : $color-orange;
}
}
}

.column-cld_status {
width: 5.5em;
width : 5.5em;

.dashicons {
&-cloudinary {
display: inline-block;
display : inline-block;

&:before {
font-size: 1.8rem;
font-size : 1.8rem;
}
}
}
}

.form-field, .form-table {
.error-notice {
display: none;
color: $color-red;
display : none;
color : $color-red;
}

input.cld-field:invalid {
border-color: $color-red;
border-color : $color-red;

+ .error-notice {
display: inline-block;
display : inline-block;
}
}
}

.cloudinary-welcome {
background-image: url("logo.svg");
background-repeat: no-repeat;
background-size: 153px;
background-position: top 12px right 20px;
.cloudinary {
&-welcome {
background-image : url("logo.svg");
background-repeat : no-repeat;
background-size : 153px;
background-position : top 12px right 20px;
}
&-stats{
display: inline-block;
margin-left: 25px;
}
&-stat{
cursor: help;
}
&-percent {
font-size : 0.8em;
vertical-align : top;
color : $color-blue;
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ const Sync = {
progress: document.getElementById( 'progress-wrapper' ),
submitButton: document.getElementById( 'submit' ),
stopButton: document.getElementById( 'stop-sync' ),
progressCount: document.getElementById( 'sync-progress' ),
barSyncCount: document.getElementById( 'sync-total' ),
completed: document.getElementById( 'completed-notice' ),
show: 'inline-block',
hide: 'none',
isRunning: false,
getStatus: function getStatus() {
var self = this,
resourceType = [],
Expand All @@ -22,8 +21,9 @@ const Sync = {
request.setRequestHeader( 'X-WP-Nonce', cloudinaryApi.nonce );
},
} ).done( function( data ) {
if ( data.done < data.total ) {
setTimeout( Sync.getStatus, 2000 );
Sync.isRunning = data.is_running;
if ( Sync.isRunning ) {
setTimeout( Sync.getStatus, 10000 );
}
Sync._updateUI( data );
} );
Expand All @@ -32,6 +32,8 @@ const Sync = {
var self = this,
url = cloudinaryApi.restUrl + 'cloudinary/v1/sync';

Sync.isRunning = false;

wp.ajax.send( {
url: url,
data: {
Expand All @@ -48,11 +50,16 @@ const Sync = {
var self = this,
url = cloudinaryApi.restUrl + 'cloudinary/v1/sync';

Sync.isRunning = true;
Sync.progress.style.display = Sync.show;

wp.ajax.send( {
url: url,
beforeSend: function( request ) {
request.setRequestHeader( 'X-WP-Nonce', cloudinaryApi.nonce );
},
} ).done( function ( data ) {
setTimeout( Sync.getStatus, 10000 );
} );
},
_updateUI: function _updateUI( data ) {
Expand All @@ -75,13 +82,14 @@ const Sync = {
this.stopButton.style.display = this.hide;
}

if ( data.percent < 100 ) {
this.barSyncCount.innerText = data.total;
this.progressCount.innerText = data.done;
if ( data.percent === 100 ) {
this.completed.style.display = this.show;
}

if ( this.isRunning ) {
this.progress.style.display = this.show;
}
else {
this.completed.style.display = this.show;
this.progress.style.display = this.hide;
}
},
Expand Down
Loading