[LYS] Tweak site visibility settings page (#46365)
This commit is contained in:
parent
255a45911c
commit
0387404d7f
|
@ -188,9 +188,9 @@ const SiteVisibility = () => {
|
|||
} }
|
||||
/>
|
||||
</div>
|
||||
{ privateLink === 'yes' && (
|
||||
{ comingSoon === 'yes' && privateLink === 'yes' && (
|
||||
<div className="site-visibility-settings-slotfill-private-link">
|
||||
{ getPrivateLink() }
|
||||
<input value={ getPrivateLink() } readOnly />
|
||||
<Button
|
||||
ref={ copyClipboardRef }
|
||||
variant="link"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
}
|
||||
|
||||
.site-visibility-settings-slotfill-private-link {
|
||||
margin-top: 12px;
|
||||
margin-left: 73px;
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
|
@ -20,8 +21,29 @@
|
|||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
outline: none;
|
||||
border: 0;
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
color: $gray-900;
|
||||
}
|
||||
|
||||
button {
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
font-size: 13px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
|
||||
&:focus {
|
||||
outline: none !important;
|
||||
box-shadow: none;
|
||||
|
@ -74,17 +96,25 @@
|
|||
}
|
||||
|
||||
.site-visibility-settings-slotfill-section {
|
||||
max-width: 620px;
|
||||
max-width: 650px;
|
||||
|
||||
&:last-child {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.site-visibility-settings-slotfill-section-content {
|
||||
gap: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 16px 0 0 30px;
|
||||
|
||||
&.is-hidden {
|
||||
display: none;
|
||||
}
|
||||
margin: 16px 0 0 30px;
|
||||
|
||||
.components-toggle-control {
|
||||
margin: 0;
|
||||
|
||||
.components-h-stack {
|
||||
align-items: baseline;
|
||||
}
|
||||
|
@ -93,6 +123,7 @@
|
|||
.components-base-control__field {
|
||||
p {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
Tweaks Site visibility settings page'
|
|
@ -323,7 +323,7 @@ final class WooCommerce {
|
|||
|
||||
$coming_soon = $is_new_install ? 'yes' : 'no';
|
||||
$store_pages_only = WCAdminHelper::is_site_fresh() ? 'no' : 'yes';
|
||||
$private_link = 'yes';
|
||||
$private_link = 'no';
|
||||
$share_key = wp_generate_password( 32, false );
|
||||
|
||||
if ( false === get_option( 'woocommerce_coming_soon', false ) ) {
|
||||
|
|
|
@ -51,7 +51,7 @@ class WooCommerce_Test extends \WC_Unit_Test_Case {
|
|||
|
||||
$this->assertEquals( 'yes', get_option( 'woocommerce_coming_soon' ) );
|
||||
$this->assertEquals( 'no', get_option( 'woocommerce_store_pages_only' ) );
|
||||
$this->assertEquals( 'yes', get_option( 'woocommerce_private_link' ) );
|
||||
$this->assertEquals( 'no', get_option( 'woocommerce_private_link' ) );
|
||||
$this->assertNotEmpty( get_option( 'woocommerce_share_key' ) );
|
||||
$this->assertMatchesRegularExpression( '/^[a-zA-Z0-9]{32}$/', get_option( 'woocommerce_share_key' ) );
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class WooCommerce_Test extends \WC_Unit_Test_Case {
|
|||
|
||||
$this->assertEquals( 'no', get_option( 'woocommerce_coming_soon' ) );
|
||||
$this->assertEquals( 'yes', get_option( 'woocommerce_store_pages_only' ) );
|
||||
$this->assertEquals( 'yes', get_option( 'woocommerce_private_link' ) );
|
||||
$this->assertEquals( 'no', get_option( 'woocommerce_private_link' ) );
|
||||
$this->assertNotEmpty( get_option( 'woocommerce_share_key' ) );
|
||||
$this->assertMatchesRegularExpression( '/^[a-zA-Z0-9]{32}$/', get_option( 'woocommerce_share_key' ) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue