Skip to content

Commit 09139d1

Browse files
author
Marco Pereirinha
committed
Merge branch 'develop' into uat
2 parents 25a5bbc + b5dc376 commit 09139d1

13 files changed

Lines changed: 602 additions & 318 deletions

File tree

css/cloudinary.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/cloudinary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 517 additions & 291 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
"terser-webpack-plugin": "^4.2.3",
147147
"tippy.js": "^6.3.1",
148148
"typescript": "^4.0.5",
149-
"webpack": "^5.76.0",
149+
"webpack": "^5.94.0",
150150
"webpack-cli": "^4.2.0",
151151
"webpackbar": "^5.0.2"
152152
},

php/class-dashboard.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public function no_assets() {
6060
* @return array
6161
*/
6262
public function register_settings( $pages ) {
63+
64+
$plugin = $this->plugin;
65+
6366
$pages['dashboard'] = array(
6467
'page_title' => __( 'Cloudinary Dashboard', 'cloudinary' ),
6568
'menu_title' => __( 'Dashboard', 'cloudinary' ),
@@ -154,7 +157,7 @@ public function register_settings( $pages ) {
154157
'cld-toggle',
155158
'hidden',
156159
),
157-
'title' => __( 'View errored assets', 'cloudinary' ),
160+
'title' => __( 'View errored assets', 'cloudinary' ),
158161
),
159162
),
160163
array(
@@ -183,7 +186,7 @@ public function register_settings( $pages ) {
183186
'cld-toggle',
184187
'hidden',
185188
),
186-
'title' => __( 'Retry sync assets with errors', 'cloudinary' ),
189+
'title' => __( 'Retry sync assets with errors', 'cloudinary' ),
187190
),
188191
),
189192
),
@@ -357,7 +360,11 @@ public function register_settings( $pages ) {
357360
),
358361
array(
359362
'type' => 'panel',
360-
'title' => __( 'Plan details', 'cloudinary' ),
363+
'title' => function () use ( $plugin ) {
364+
$cloud_name = $plugin->components['connect']->get_cloud_name();
365+
/* Translators: placeholder is the Cloudinary cloud name. */
366+
return sprintf( __( 'Plan details for @%s', 'cloudinary' ), esc_html( $cloud_name ) );
367+
},
361368
array(
362369
'type' => 'plan_details',
363370
),

php/traits/trait-params.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,15 @@ protected function set_param_array( $parts, $param, $value ) {
5353
return $new;
5454
}
5555

56-
if ( '' === $key ) {
57-
$new[] = $value;
56+
if ( is_array( $new ) ) {
57+
if ( '' === $key ) {
58+
$new[] = $value;
59+
} else {
60+
$new[ $key ] = $value;
61+
}
5862
} else {
59-
$new[ $key ] = $value;
63+
// There's likely a problem here, as we're setting an array key on a non-array.
64+
$new = array();
6065
}
6166
// @TODO: I took ksort out, need to check that it doesn't have any problems being.
6267

php/ui/component/class-on-off.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ protected function input( $struct ) {
9696
$struct['attributes']['type'] = 'hidden';
9797
}
9898

99+
if (
100+
true === $this->setting->get_param( 'disabled', false )
101+
|| $this->is_readonly()
102+
|| (
103+
true === $this->setting->get_param( 'main_required', false )
104+
&& empty( $this->setting->get_param( 'main', array() ) )
105+
)
106+
) {
107+
$struct['attributes']['disabled'] = 'disabled';
108+
}
109+
99110
return $struct;
100111
}
101112

src/css/components/ui/_ui-components.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
font-size: $size-panel-description;
5858
}
5959

60+
.cloudname {
61+
font-style: italic;
62+
}
63+
6064
.button:not(.wp-color-result) {
6165
background-color: $color-cld-blue;
6266
color: #fff;
@@ -91,6 +95,10 @@
9195
.button.wp-color-result {
9296
border-color: #d0d0d0;
9397
}
98+
99+
.button.hidden {
100+
display: none;
101+
}
94102
}
95103

96104
&-error {

src/css/components/ui/controls/_on-off.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868

6969
input:disabled + & {
7070
opacity: 0.4;
71+
pointer-events: none;
7172
}
7273

7374
input:checked + & {

src/css/components/ui/wizard/_connect.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
padding: 5px 11px;
2626
border-radius: 14px;
2727
font-weight: bold;
28+
margin-inline-start: 1em;
2829

2930
&.active {
3031
display: inline-flex;

0 commit comments

Comments
 (0)