Commit inicial, se subio el proyecto
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Wordpress dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n'
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import './style.scss'
|
||||
import { StatusButton, TextControl, ConnectAccountBody } from '@rank-math/components'
|
||||
import getLink from '@helpers/getLink'
|
||||
|
||||
export default ( { config = {} } ) => {
|
||||
const { isSiteConnected, registerProductNonce } = config
|
||||
const { activateUrl, isSiteUrlValid } = config.aiVisibility ?? {}
|
||||
|
||||
const ns = 'rank-math-ai-visibility-account'
|
||||
|
||||
const status = isSiteConnected ? 'connected' : 'disconnected'
|
||||
const statusLabel = isSiteConnected
|
||||
? __( 'Connected', 'seo-by-rank-math' )
|
||||
: __( 'Not Connected', 'seo-by-rank-math' )
|
||||
|
||||
return (
|
||||
<div
|
||||
className={ `${ ns } ${
|
||||
isSiteConnected ? `${ ns }-connected` : `${ ns }-disconnected`
|
||||
}` }
|
||||
>
|
||||
<header>
|
||||
<h3>{ __( 'Account Connection Required', 'seo-by-rank-math' ) }</h3>
|
||||
|
||||
<StatusButton status={ status }>{ statusLabel }</StatusButton>
|
||||
</header>
|
||||
|
||||
<div className={ `${ ns }-content` }>
|
||||
<form method="post">
|
||||
<TextControl
|
||||
type="hidden"
|
||||
name="registration-action"
|
||||
value={ isSiteConnected ? 'deregister' : 'register' }
|
||||
/>
|
||||
|
||||
<TextControl
|
||||
type="hidden"
|
||||
name="_wpnonce"
|
||||
value={ registerProductNonce }
|
||||
/>
|
||||
|
||||
<ConnectAccountBody
|
||||
description={ __(
|
||||
'Connect your account for free to start tracking your brand\'s AI visibility.',
|
||||
'seo-by-rank-math'
|
||||
) }
|
||||
helpLink={ getLink( 'ai-visibility-connect', 'AI Visibility Connect' ) }
|
||||
activateUrl={ activateUrl }
|
||||
isSiteUrlValid={ isSiteUrlValid }
|
||||
note={ __( 'Takes less than 30 seconds to get started', 'seo-by-rank-math' ) }
|
||||
noteClassName={ `${ ns }-not-registered-note` }
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
.rank-math-ai-visibility-account {
|
||||
border: 1px solid #E0E0E0;
|
||||
border-radius: 4px;
|
||||
|
||||
h3 {
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 26px;
|
||||
color: #C64539;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
padding: 19px 28px;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.rank-math-status-button.components-button.is-disconnected {
|
||||
background: #C64539;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
border-radius: 2px;
|
||||
|
||||
svg {
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
display: flex;
|
||||
padding: 80px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
color: #1E1E1E;
|
||||
|
||||
a {
|
||||
color: #017CBA;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 23px;
|
||||
|
||||
&.rank-math-ai-visibility-account-not-registered-note {
|
||||
margin-top: 30px;
|
||||
font-weight: 500;
|
||||
line-height: 16px;
|
||||
color: #757575;
|
||||
}
|
||||
}
|
||||
|
||||
.rank-math-button.components-button.button-animate {
|
||||
margin-top: 32px;
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
line-height: 80px;
|
||||
padding: 0 42px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user