Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/3.5.0 #797

Merged
merged 13 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
107 changes: 76 additions & 31 deletions assets/admin/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ textarea#episode_embed_code {
.ssp-settings table input.regular-text {
max-width: 90%;
background: #F1F5F9; }
.ssp-settings .validate-api-credentials-message {
margin-left: 30px; }
.ssp-settings .loader {
position: relative; }
.ssp-settings .loader:after {
Expand All @@ -253,6 +251,32 @@ textarea#episode_embed_code {
.ssp-settings .ssp-sync-msg.success .sync-overview {
color: #4caf50; }

.ssp-main-settings .error {
color: #DF4E4F; }

.ssp-main-settings .hidden {
display: none; }

.ssp-main-settings .disconnect-castos {
margin-right: 8px;
vertical-align: middle; }

.ssp-main-settings.tab-castos-hosting .loader {
position: relative; }
.ssp-main-settings.tab-castos-hosting .loader:after {
content: '';
display: block;
background: url(../img/loader2.svg) no-repeat;
position: absolute;
right: -50px;
top: -9px;
background-size: contain;
width: 44px;
height: 44px; }

.connect-castos-message {
margin-left: 20px; }

.ssp-sync-podcast {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -477,6 +501,8 @@ textarea#episode_embed_code {
right: 350px; }
.ssp-onboarding-step-4 .ssp-onboarding__steps::after {
right: 180px; }
.ssp-onboarding-step-4 .ssp-onboarding__settings-body {
padding: 24px 24px 36px; }
.ssp-onboarding-step-4__info {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -669,7 +695,7 @@ textarea#episode_embed_code {
z-index: 0;
visibility: hidden;
transition: .6s;
margin-top: -444px; }
margin-top: -345px; }
.ssp-onboarding-step-4__form--opened {
visibility: visible;
margin-top: 0; }
Expand Down Expand Up @@ -759,6 +785,12 @@ textarea#episode_embed_code {
text-align: right;
margin-top: 25px;
position: relative; }
.ssp-onboarding__submit span.connect-castos-message {
position: absolute;
left: 0;
bottom: -24px;
margin-left: 0;
display: block; }
.ssp-onboarding__submit button[type=submit], .ssp-onboarding__submit .button {
position: relative;
height: 50px;
Expand Down Expand Up @@ -804,39 +836,56 @@ textarea#episode_embed_code {
background: #516178; }
.ssp-onboarding__submit .button span {
line-height: 50px; }
.ssp-onboarding__submit .validate-token {
.ssp-onboarding__submit .castos-connect {
float: left;
position: relative;
padding: 0 20px 0 45px; }
.ssp-onboarding__submit .validate-token:after {
.ssp-onboarding__submit .castos-connect:after {
content: '';
display: block;
position: absolute;
background: url(../img/validate.svg) no-repeat;
background-size: cover;
left: 19px;
top: 17px;
width: 14px;
height: 18px;
filter: none; }
.ssp-onboarding__submit .validate-token.validating {
background: #374151; }
.ssp-onboarding__submit .validate-token.validating:hover, .ssp-onboarding__submit .validate-token.validating:active, .ssp-onboarding__submit .validate-token.validating:focus {
background: #374151; }
.ssp-onboarding__submit .validate-token.validating:after {
background: url(../img/connect.svg) no-repeat;
left: 13px;
top: 13px;
width: 25px;
height: 23px;
filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(198deg) brightness(101%) contrast(102%);
background-size: contain; }
.ssp-onboarding__submit .castos-connect:disabled {
background: #9CA3AF !important;
color: #D1D5DB !important; }
.ssp-onboarding__submit .castos-connect:disabled:after {
filter: invert(94%) sepia(8%) saturate(150%) hue-rotate(177deg) brightness(90%) contrast(93%);
transition: none; }
.ssp-onboarding__submit .castos-connect.connecting {
background: #DE7373 !important;
color: #FFFFFF !important; }
.ssp-onboarding__submit .castos-connect.connecting:hover, .ssp-onboarding__submit .castos-connect.connecting:active, .ssp-onboarding__submit .castos-connect.connecting:focus, .ssp-onboarding__submit .castos-connect.connecting:disabled {
background: #DE7373; }
.ssp-onboarding__submit .castos-connect.connecting:after {
width: 17px;
height: 18px;
background-image: url(../img/validating.svg); }
.ssp-onboarding__submit .validate-token.valid {
background: #10B981;
padding: 0 16px 0 45px; }
.ssp-onboarding__submit .validate-token.valid:hover, .ssp-onboarding__submit .validate-token.valid:active, .ssp-onboarding__submit .validate-token.valid:focus {
background-image: url(../img/connecting.svg);
animation: rotation 2s infinite linear;
filter: none;
transition: none;
top: 15px;
left: 15px; }
.ssp-onboarding__submit .castos-connect.connected {
background: #10B981 !important;
color: #FFFFFF !important;
padding: 0 16px 0 45px;
opacity: .7; }
.ssp-onboarding__submit .castos-connect.connected:hover, .ssp-onboarding__submit .castos-connect.connected:active, .ssp-onboarding__submit .castos-connect.connected:focus {
background: #10B981; }
.ssp-onboarding__submit .validate-token.valid:after {
width: 16px;
height: 12px;
top: 19px;
background-image: url(../img/checkbox.svg); }
.ssp-onboarding__submit .castos-connect.connected:after {
background-image: url(../img/connect.svg);
left: 13px;
top: 13px;
width: 25px;
height: 23px;
filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(198deg) brightness(101%) contrast(102%);
background-size: contain; }
.ssp-onboarding__image-info {
position: absolute;
display: flex;
Expand Down Expand Up @@ -874,10 +923,6 @@ textarea#episode_embed_code {
transform: rotate(-45deg); }
.ssp-onboarding__delete-image:hover:before, .ssp-onboarding__delete-image:hover:after {
background: #fff; }
.ssp-onboarding .validate-api-credentials-message {
position: absolute;
left: 0;
bottom: -18px; }
.ssp-onboarding__links {
display: flex;
text-align: left; }
Expand Down
3 changes: 3 additions & 0 deletions assets/admin/img/connect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/admin/img/connecting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions assets/admin/img/loader2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 20 additions & 16 deletions assets/admin/js/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jQuery(document).ready(function($) {
$imgName = $imgInfo.find('.js-onboarding-img-name'),
$fields = $('.js-onboarding-field'),
$btn = $('.js-onboarding-btn'),
$validateTokenBtn = $('.js-onboarding-validate-token'),
$connectCastosBtn = $('.js-onboarding-castos-connect'),
$hostingStep2 = $('.js-hosting-form'),
$accordion = $('.js-accordion'),
$dragable = $('.js-onboarding-dragable'),
Expand Down Expand Up @@ -54,29 +54,33 @@ jQuery(document).ready(function($) {
});
},
initTokenValidation = function(){
$validateTokenBtn.on('validated', function () {
//don't use $btn since it has custom validation
var $form = $validateTokenBtn.closest('form'),
$nextButton = $form.find('button[type=submit]');
$(this).removeClass('validating');
if ($validateTokenBtn.hasClass('valid')) {
$connectCastosBtn.on('connected', function (e, response) {
var $form = $connectCastosBtn.closest('form'),
$nextButton = $form.find('button[type=submit]'),
$me = $(this),
$msg = $form.find('.connect-castos-message'),
$field = $('.js-onboarding-castos-connect-field');
$me.removeClass('connecting');
$msg.show();

if ("success" === response.status) {
$me.html($me.data('connected-txt'));
$field.attr('disabled', 'disabled');
$nextButton.removeAttr('disabled');
$form.find('.validate-api-credentials-message').html('');
$(this).html($(this).data('valid-txt'));
} else {
$(this).html($(this).data('initial-txt'));
$me.html($me.data('initial-txt'));
$nextButton.attr('disabled', 'disabled');
}
});

$validateTokenBtn.on('click', function(){
$(this).addClass('validating').html($(this).data('validating-txt'));
$connectCastosBtn.on('connecting', function(){
$(this).addClass('connecting').html($(this).data('connecting-txt'));
});

$('.js-onboarding-validate-token-field').on('change paste keyup', function(){
var $nextButton = $validateTokenBtn.closest('form').find('button[type=submit]');
$validateTokenBtn.html($validateTokenBtn.data('initial-txt'));
$validateTokenBtn.removeClass('valid');
$('.js-onboarding-castos-connect-field').on('change paste keyup', function(){
var $nextButton = $connectCastosBtn.closest('form').find('button[type=submit]');
$connectCastosBtn.html($connectCastosBtn.data('initial-txt'));
$connectCastosBtn.removeClass('valid');
$nextButton.attr('disabled', 'disabled');
});
},
Expand Down
46 changes: 42 additions & 4 deletions assets/admin/scss/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ textarea#episode_embed_code {
}
}

#podmotor_account_api_token {
width: 100%;
min-width: 100%;
display: block;
margin-bottom: 8px;
}

.ssp-settings-integrations {
table label {
Expand Down Expand Up @@ -305,10 +311,6 @@ textarea#episode_embed_code {
}
}

.validate-api-credentials-message {
margin-left: 30px;
}

.loader {
position: relative;
&:after {
Expand Down Expand Up @@ -341,6 +343,42 @@ textarea#episode_embed_code {
}
}

.ssp-main-settings {
.error {
color: $clr_red_400;
}

.hidden {
display: none;
}

.disconnect-castos {
margin-right: 8px;
vertical-align: middle;
}

&.tab-castos-hosting {
.loader {
position: relative;
&:after {
content: '';
display: block;
background: url(../img/loader2.svg) no-repeat;
position: absolute;
right: -50px;
top: -9px;
background-size: contain;
width: 44px;
height: 44px;
}
}
}
}

.connect-castos-message {
margin-left: 20px;
}

.ssp-sync-podcast {
display: flex;
justify-content: space-between;
Expand Down
Loading
Loading