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

Add support link for Premium users #573

Merged
merged 1 commit into from
Jun 30, 2023
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
18 changes: 16 additions & 2 deletions assets/src/parts/connected/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {

import { useSelect } from '@wordpress/data';

import { addQueryArgs } from '@wordpress/url';

const reasons = [
optimoleDashboardApp.strings.upgrade.reason_1,
optimoleDashboardApp.strings.upgrade.reason_2,
Expand Down Expand Up @@ -69,7 +71,7 @@ const Sidebar = () => {
/>
</div>

{ 'free' === plan && (
{ 'free' === plan ? (
<div
className="bg-info flex flex-col text-white border-0 rounded-lg shadow-md p-8 bg-promo bg-no-repeat"
style={ {
Expand All @@ -90,7 +92,6 @@ const Sidebar = () => {
) ) }
</ul>


<Button
variant="link"
className="optml__button flex w-full justify-center font-bold min-h-40 !no-underline !text-white !bg-opaque-black !rounded"
Expand All @@ -100,6 +101,19 @@ const Sidebar = () => {
{ optimoleDashboardApp.strings.upgrade.cta }
</Button>
</div>
) : (
<Button
variant="default"
className="bg-white flex font-bold border-0 rounded-lg shadow-md p-8 text-sm justify-center"
href={ addQueryArgs( 'https://optimole.com/contact/', {
contact_name: window.optimoleDashboardApp.user_data.display_name,
contact_email: optimoleDashboardApp.user_data.user_email,
contact_website: optimoleDashboardApp.home_url
}) }
target="_blank"
>
{ optimoleDashboardApp.strings.premium_support }
</Button>
) }
</div>
);
Expand Down
1 change: 1 addition & 0 deletions inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ private function get_dashboard_strings() {
'private_cdn_url' => __( 'IMAGES DOMAIN', 'optimole-wp' ),
'existing_user' => __( 'Existing user?', 'optimole-wp' ),
'notification_message_register' => __( 'We sent you the API Key in the email. Add it below to connect to Optimole.', 'optimole-wp' ),
'premium_support' => __( 'Access our Premium Support', 'optimole-wp' ),
'account_needed_title' => sprintf(
__( 'In order to get access to free image optimization service you will need an API key from %s.', 'optimole-wp' ),
' <a href="https://dashboard.optimole.com/register" target="_blank">optimole.com</a>'
Expand Down