Skip to content

Commit 7382c63

Browse files
authored
Merge pull request #890 from Codeinwp/feat/opml-service/1339
feat: add button for direct cloud library access
2 parents febe9f9 + a2bb93c commit 7382c63

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

assets/src/dashboard/parts/connected/settings/CloudLibrary.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ import classnames from 'classnames';
33
import {
44
BaseControl,
55
FormTokenField,
6-
ToggleControl
6+
ToggleControl,
7+
Icon
78
} from '@wordpress/components';
89
import { useSelect } from '@wordpress/data';
910

11+
import {
12+
arrowRight
13+
} from '@wordpress/icons';
14+
1015
export default function CloudLibrary( props ) {
1116
const { user_data, strings } = optimoleDashboardApp;
1217
const { options_strings } = strings;
@@ -81,6 +86,16 @@ export default function CloudLibrary( props ) {
8186
onChange={value => updateOption( 'cloud_images', value )}
8287
/>
8388

89+
<div className="m-0">
90+
<a href={options_strings.cloud_library_btn_link} className="font-semibold text-info text-sm hover:text-info inline-flex items-center">
91+
{options_strings.cloud_library_btn_text}
92+
<Icon
93+
icon={arrowRight}
94+
className="inline-block ml-2 fill-current"
95+
/>
96+
</a>
97+
</div>
98+
8499
<hr className="my-8 border-grayish-blue"/>
85100

86101
{showSiteSelector && (

inc/admin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,6 +1889,8 @@ private function get_dashboard_strings() {
18891889
'rollback_stop_title' => __( 'Are you sure?', 'optimole-wp' ),
18901890
'rollback_stop_description' => __( 'Canceling will halt the ongoing process, and any remaining images will stay in the Optimole Cloud. To transfer images to the Optimole Cloud, use the Offloading option.', 'optimole-wp' ),
18911891
'rollback_stop_action' => __( 'Cancel the transfer from Optimole', 'optimole-wp' ),
1892+
'cloud_library_btn_text' => __( 'Go to Cloud Library', 'optimole-wp' ),
1893+
'cloud_library_btn_link' => add_query_arg( 'page', 'optimole-dam', admin_url( 'admin.php' ) ),
18921894
],
18931895
'help' => [
18941896
'section_one_title' => __( 'Help and Support', 'optimole-wp' ),

0 commit comments

Comments
 (0)