🔀 Merge branch 'trunk'
# Conflicts: # modules/ppcp-settings/resources/js/Components/ReusableComponents/Navigation.js # modules/ppcp-settings/resources/js/Components/Screens/Settings.js # modules/ppcp-settings/services.php # modules/ppcp-settings/src/SettingsModule.php
|
@ -61,19 +61,24 @@ class PaymentMethodTokensEndpoint {
|
|||
* Creates a setup token.
|
||||
*
|
||||
* @param PaymentSource $payment_source The payment source.
|
||||
* @param string $customer_id PayPal customer ID.
|
||||
*
|
||||
* @return stdClass
|
||||
*
|
||||
* @throws RuntimeException When something when wrong with the request.
|
||||
* @throws PayPalApiException When something when wrong setting up the token.
|
||||
*/
|
||||
public function setup_tokens( PaymentSource $payment_source ): stdClass {
|
||||
public function setup_tokens( PaymentSource $payment_source, string $customer_id = '' ): stdClass {
|
||||
$data = array(
|
||||
'payment_source' => array(
|
||||
$payment_source->name() => $payment_source->properties(),
|
||||
),
|
||||
);
|
||||
|
||||
if ( $customer_id ) {
|
||||
$data['customer']['id'] = $customer_id;
|
||||
}
|
||||
|
||||
$bearer = $this->bearer->bearer();
|
||||
$url = trailingslashit( $this->host ) . 'v3/vault/setup-tokens';
|
||||
|
||||
|
@ -109,19 +114,24 @@ class PaymentMethodTokensEndpoint {
|
|||
* Creates a payment token for the given payment source.
|
||||
*
|
||||
* @param PaymentSource $payment_source The payment source.
|
||||
* @param string $customer_id PayPal customer ID.
|
||||
*
|
||||
* @return stdClass
|
||||
*
|
||||
* @throws RuntimeException When something when wrong with the request.
|
||||
* @throws PayPalApiException When something when wrong setting up the token.
|
||||
*/
|
||||
public function create_payment_token( PaymentSource $payment_source ): stdClass {
|
||||
public function create_payment_token( PaymentSource $payment_source, string $customer_id = '' ): stdClass {
|
||||
$data = array(
|
||||
'payment_source' => array(
|
||||
$payment_source->name() => $payment_source->properties(),
|
||||
),
|
||||
);
|
||||
|
||||
if ( $customer_id ) {
|
||||
$data['customer']['id'] = $customer_id;
|
||||
}
|
||||
|
||||
$bearer = $this->bearer->bearer();
|
||||
$url = trailingslashit( $this->host ) . 'v3/vault/payment-tokens';
|
||||
|
||||
|
|
|
@ -6,16 +6,16 @@ const processAxoConfig = ( config ) => {
|
|||
const scriptOptions = {};
|
||||
const sdkClientToken = config?.axo?.sdk_client_token;
|
||||
const uuid = uuidv4().replace( /-/g, '' );
|
||||
if ( sdkClientToken ) {
|
||||
if ( sdkClientToken && config?.user?.is_logged !== true ) {
|
||||
scriptOptions[ 'data-sdk-client-token' ] = sdkClientToken;
|
||||
scriptOptions[ 'data-client-metadata-id' ] = uuid;
|
||||
}
|
||||
return scriptOptions;
|
||||
};
|
||||
|
||||
const processUserIdToken = ( config, sdkClientToken ) => {
|
||||
const processUserIdToken = ( config ) => {
|
||||
const userIdToken = config?.save_payment_methods?.id_token;
|
||||
return userIdToken && ! sdkClientToken
|
||||
return userIdToken && config?.user?.is_logged === true
|
||||
? { 'data-user-id-token': userIdToken }
|
||||
: {};
|
||||
};
|
||||
|
@ -26,9 +26,6 @@ export const processConfig = ( config ) => {
|
|||
scriptOptions = merge( scriptOptions, config.script_attributes );
|
||||
}
|
||||
const axoOptions = processAxoConfig( config );
|
||||
const userIdTokenOptions = processUserIdToken(
|
||||
config,
|
||||
axoOptions[ 'data-sdk-client-token' ]
|
||||
);
|
||||
const userIdTokenOptions = processUserIdToken( config );
|
||||
return merge.all( [ scriptOptions, axoOptions, userIdTokenOptions ] );
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@ const scriptPromises = new Map();
|
|||
const handleDataClientIdAttribute = async ( scriptOptions, config ) => {
|
||||
if (
|
||||
config.data_client_id?.set_attribute &&
|
||||
config.vault_v3_enabled !== '1'
|
||||
config.vault_v3_enabled !== true
|
||||
) {
|
||||
return new Promise( ( resolve, reject ) => {
|
||||
dataClientIdAttributeHandler(
|
||||
|
|
|
@ -75,7 +75,7 @@ export const loadPaypalScript = ( config, onLoaded, onError = null ) => {
|
|||
// Axo SDK options
|
||||
const sdkClientToken = config?.axo?.sdk_client_token;
|
||||
const uuid = uuidv4().replace( /-/g, '' );
|
||||
if ( sdkClientToken ) {
|
||||
if ( sdkClientToken && config?.user?.is_logged !== true ) {
|
||||
scriptOptions[ 'data-sdk-client-token' ] = sdkClientToken;
|
||||
scriptOptions[ 'data-client-metadata-id' ] = uuid;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ export const loadPaypalScript = ( config, onLoaded, onError = null ) => {
|
|||
|
||||
// Adds data-user-id-token to script options.
|
||||
const userIdToken = config?.save_payment_methods?.id_token;
|
||||
if ( userIdToken && ! sdkClientToken ) {
|
||||
if ( userIdToken && config?.user?.is_logged === true ) {
|
||||
scriptOptions[ 'data-user-id-token' ] = userIdToken;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use WooCommerce\PayPalCommerce\Onboarding\Endpoint\UpdateSignupLinksEndpoint;
|
|||
use WooCommerce\PayPalCommerce\Onboarding\Assets\OnboardingAssets;
|
||||
use WooCommerce\PayPalCommerce\Onboarding\Endpoint\LoginSellerEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingRenderer;
|
||||
use WooCommerce\PayPalCommerce\Settings\SettingsModule;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExecutableModule;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExtendingModule;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ModuleClassNameIdTrait;
|
||||
|
@ -48,7 +49,8 @@ class OnboardingModule implements ServiceModule, ExtendingModule, ExecutableModu
|
|||
// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
'woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled',
|
||||
getenv( 'PCP_SETTINGS_ENABLED' ) === '1'
|
||||
) ) {
|
||||
) || SettingsModule::should_use_the_old_ui()
|
||||
) {
|
||||
|
||||
$asset_loader = $c->get( 'onboarding.assets' );
|
||||
/**
|
||||
|
|
|
@ -94,7 +94,9 @@ class CreatePaymentToken implements EndpointInterface {
|
|||
)
|
||||
);
|
||||
|
||||
$result = $this->payment_method_tokens_endpoint->create_payment_token( $payment_source );
|
||||
$customer_id = get_user_meta( get_current_user_id(), '_ppcp_target_customer_id', true );
|
||||
|
||||
$result = $this->payment_method_tokens_endpoint->create_payment_token( $payment_source, $customer_id );
|
||||
|
||||
if ( is_user_logged_in() && isset( $result->customer->id ) ) {
|
||||
$current_user_id = get_current_user_id();
|
||||
|
|
|
@ -103,7 +103,9 @@ class CreateSetupToken implements EndpointInterface {
|
|||
);
|
||||
}
|
||||
|
||||
$result = $this->payment_method_tokens_endpoint->setup_tokens( $payment_source );
|
||||
$customer_id = get_user_meta( get_current_user_id(), '_ppcp_target_customer_id', true );
|
||||
|
||||
$result = $this->payment_method_tokens_endpoint->setup_tokens( $payment_source, $customer_id );
|
||||
|
||||
wp_send_json_success( $result );
|
||||
return true;
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M28.75 22.5C28.75 23.1904 28.1904 23.75 27.5 23.75L10 23.75C9.30964 23.75 8.75 23.1904 8.75 22.5L8.75 13.75C8.75 13.0596 9.30965 12.5 10 12.5L27.5 12.5C28.1904 12.5 28.75 13.0596 28.75 13.75V22.5Z" fill="#5BBBFC"/>
|
||||
<path d="M1.25 7.5C1.25 6.80964 1.80964 6.25 2.5 6.25H17.5C18.1904 6.25 18.75 6.80964 18.75 7.5V17.5C18.75 18.1904 18.1904 18.75 17.5 18.75H2.5C1.80964 18.75 1.25 18.1904 1.25 17.5V7.5Z" fill="#DD7F57"/>
|
||||
<path d="M18.75 12.5V17.5C18.75 18.1904 18.1904 18.75 17.5 18.75H8.75L8.75 13.75C8.75 13.0596 9.30965 12.5 10 12.5L18.75 12.5Z" fill="#FAF8F5"/>
|
||||
<path d="M14.375 18.125C14.375 15.7088 16.3338 13.75 18.75 13.75C21.1662 13.75 23.125 15.7088 23.125 18.125C23.125 20.5412 21.1662 22.5 18.75 22.5C16.3338 22.5 14.375 20.5412 14.375 18.125Z" fill="#001C64"/>
|
||||
<path d="M1.25 8.75H18.75V11.25H1.25V8.75Z" fill="#4F2825"/>
|
||||
<path d="M7.5 16.4062C7.5 16.5788 7.36009 16.7188 7.1875 16.7188H2.8125C2.63991 16.7188 2.5 16.5788 2.5 16.4062V15.9375C2.5 15.7649 2.63991 15.625 2.8125 15.625H7.1875C7.36009 15.625 7.5 15.7649 7.5 15.9375V16.4062Z" fill="#4F2825"/>
|
||||
<path d="M14.375 18.125C14.375 15.7088 16.3338 13.75 18.75 13.75V17.5C18.75 18.1904 18.1904 18.75 17.5 18.75H14.4193C14.3901 18.5459 14.375 18.3372 14.375 18.125Z" fill="#4F2825"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -1,5 +1,10 @@
|
|||
<svg width="58" height="58" viewBox="0 0 58 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.000488281" width="58" height="58" rx="3" fill="white"/>
|
||||
<rect x="0.5" y="0.500488" width="57" height="57" rx="2.5" stroke="black" stroke-opacity="0.07"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6557 23.0408C15.1747 23.6163 14.405 24.0702 13.6354 24.0053C13.5392 23.2272 13.916 22.4005 14.3569 21.8898C14.8379 21.2981 15.6797 20.8767 16.3611 20.8442C16.4413 21.6548 16.1286 22.4491 15.6557 23.0408ZM16.3527 24.1591C15.6747 24.1197 15.056 24.3653 14.5563 24.5637C14.2347 24.6914 13.9624 24.7995 13.7552 24.7995C13.5228 24.7995 13.2392 24.6856 12.9208 24.5577C12.5037 24.3901 12.0267 24.1986 11.5266 24.2078C10.3802 24.224 9.31398 24.8805 8.72875 25.9261C7.52624 28.0173 8.4161 31.1136 9.57853 32.8157C10.1477 33.6587 10.8291 34.5827 11.727 34.5503C12.122 34.5352 12.4062 34.4133 12.7002 34.2871C13.0388 34.1419 13.3905 33.991 13.9396 33.991C14.4697 33.991 14.8061 34.1379 15.1289 34.279C15.4359 34.4131 15.7307 34.5419 16.1683 34.534C17.0982 34.5178 17.6835 33.6911 18.2526 32.8481C18.8669 31.9434 19.1368 31.0604 19.1778 30.9264L19.1826 30.9109C19.1816 30.9099 19.174 30.9064 19.1607 30.9003L19.1607 30.9003L19.1606 30.9002C18.9553 30.8052 17.3859 30.0788 17.3708 28.1308C17.3557 26.4957 18.6156 25.6673 18.814 25.5369C18.826 25.529 18.8342 25.5236 18.8379 25.5208C18.0362 24.3212 16.7856 24.1916 16.3527 24.1591ZM22.7899 34.4452V21.8089H27.4797C29.9007 21.8089 31.5923 23.4948 31.5923 25.9589C31.5923 28.4229 29.8687 30.125 27.4155 30.125H24.7299V34.4452H22.7899ZM24.7298 23.4621H26.9665C28.65 23.4621 29.612 24.3699 29.612 25.9667C29.612 27.5634 28.65 28.4793 26.9585 28.4793H24.7298V23.4621ZM37.9971 32.9291C37.4841 33.9179 36.3537 34.542 35.1352 34.542C33.3314 34.542 32.0728 33.4559 32.0728 31.8186C32.0728 30.1976 33.2913 29.2654 35.544 29.1276L37.9651 28.9818V28.2847C37.9651 27.2553 37.2997 26.696 36.1132 26.696C35.1352 26.696 34.4217 27.2067 34.2774 27.9848H32.5297C32.5858 26.3475 34.109 25.156 36.1693 25.156C38.3899 25.156 39.833 26.3313 39.833 28.155V34.4448H38.0372V32.9291H37.9971ZM35.6573 33.0428C34.6232 33.0428 33.9658 32.5403 33.9658 31.7703C33.9658 30.976 34.5991 30.514 35.8096 30.441L37.9661 30.3032V31.0165C37.9661 32.1999 36.9721 33.0428 35.6573 33.0428ZM45.7894 34.9398C45.0118 37.1525 44.1219 37.882 42.23 37.882C42.0857 37.882 41.6047 37.8658 41.4924 37.8334V36.3177C41.6127 36.3339 41.9093 36.3501 42.0616 36.3501C42.9194 36.3501 43.4004 35.9854 43.697 35.037L43.8734 34.4778L40.5865 25.2781H42.6148L44.8996 32.7432H44.9396L47.2244 25.2781H49.1965L45.7894 34.9398Z" fill="black"/>
|
||||
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5121_50953)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.81566 10.6056C5.46406 11.0263 4.90149 11.3581 4.33893 11.3107C4.26861 10.7419 4.54403 10.1376 4.86633 9.76431C5.21794 9.33179 5.83324 9.0237 6.33135 9C6.38995 9.59249 6.16141 10.1731 5.81566 10.6056ZM6.3249 11.4231C5.82929 11.3943 5.37707 11.5738 5.0118 11.7188C4.77674 11.8122 4.57768 11.8912 4.42624 11.8912C4.2563 11.8912 4.04903 11.8079 3.81631 11.7145C3.51137 11.592 3.16274 11.452 2.79715 11.4587C1.95916 11.4705 1.17977 11.9504 0.751983 12.7147C-0.127026 14.2434 0.523441 16.5067 1.37315 17.7509C1.78921 18.3671 2.28732 19.0425 2.94365 19.0188C3.23239 19.0078 3.4401 18.9187 3.65505 18.8265C3.90253 18.7203 4.15961 18.61 4.56102 18.61C4.94852 18.61 5.19436 18.7174 5.43035 18.8205C5.65474 18.9186 5.87023 19.0127 6.19012 19.007C6.86989 18.9951 7.29767 18.3908 7.71374 17.7746C8.16273 17.1133 8.36005 16.4678 8.38999 16.3699L8.39351 16.3585C8.39279 16.3578 8.38724 16.3552 8.37745 16.3507C8.22736 16.2812 7.08014 15.7502 7.06913 14.3263C7.05808 13.1311 7.97908 12.5256 8.12406 12.4303C8.13288 12.4245 8.13883 12.4205 8.14152 12.4185C7.55552 11.5416 6.64135 11.4468 6.3249 11.4231ZM11.0306 18.9418V9.70495H14.4587C16.2284 9.70495 17.4649 10.9373 17.4649 12.7385C17.4649 14.5396 16.205 15.7839 14.4118 15.7839H12.4487V18.9418H11.0306ZM12.4487 10.9138H14.0837C15.3143 10.9138 16.0175 11.5774 16.0175 12.7446C16.0175 13.9118 15.3143 14.5813 14.0778 14.5813H12.4487V10.9138ZM22.1475 17.834C21.7724 18.5569 20.9462 19.0131 20.0554 19.0131C18.7369 19.0131 17.8169 18.2192 17.8169 17.0223C17.8169 15.8374 18.7076 15.156 20.3543 15.0553L22.124 14.9486V14.4391C22.124 13.6866 21.6377 13.2778 20.7704 13.2778C20.0554 13.2778 19.5339 13.6511 19.4284 14.2199H18.1509C18.1919 13.0231 19.3054 12.1521 20.8114 12.1521C22.4346 12.1521 23.4894 13.0112 23.4894 14.3443V18.942H22.1768V17.834H22.1475ZM20.4359 17.917C19.68 17.917 19.1995 17.5497 19.1995 16.9868C19.1995 16.4062 19.6624 16.0685 20.5473 16.0151L22.1236 15.9144V16.4358C22.1236 17.3008 21.397 17.917 20.4359 17.917ZM27.8427 19.3032C27.2743 20.9206 26.6238 21.4539 25.2409 21.4539C25.1354 21.4539 24.7838 21.442 24.7017 21.4183V20.3104C24.7896 20.3222 25.0065 20.3341 25.1178 20.3341C25.7448 20.3341 26.0964 20.0675 26.3133 19.3742L26.4422 18.9654L24.0396 12.2407H25.5222L27.1923 17.6975H27.2216L28.8917 12.2407H30.3333L27.8427 19.3032Z" fill="black"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5121_50953">
|
||||
<rect width="30" height="30" fill="white" transform="translate(0.333496)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -1,9 +1,14 @@
|
|||
<svg width="58" height="58" viewBox="0 0 58 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.000732422" width="58" height="58" rx="3" fill="white"/>
|
||||
<rect x="0.5" y="0.500732" width="57" height="57" rx="2.5" stroke="black" stroke-opacity="0.07"/>
|
||||
<path d="M44.3201 29.4307H40.9228C40.5449 29.4307 40.2375 29.1296 40.2375 28.7527C40.2375 28.3758 40.5449 28.044 40.9228 28.044H46.0949V25.4927H40.9228C39.1176 25.4927 37.6488 26.9644 37.6488 28.7651C37.6488 30.5658 39.1176 32.0375 40.9228 32.0375H44.2739C44.6518 32.0375 44.9592 32.3373 44.9592 32.7142C44.9592 33.0911 44.6517 33.3686 44.2739 33.3686H37.0878C36.4777 34.5334 35.8845 35.5317 34.6802 36.0309H44.3201C46.0949 36.0054 47.5468 34.5033 47.5468 32.7185C47.5468 30.9339 46.0949 29.4562 44.3201 29.4307Z" fill="#71706F"/>
|
||||
<path d="M31.2969 25.4927C28.4175 25.4927 26.0723 27.8519 26.0723 30.7507V30.8616V41.6883H28.6791V36.0309H31.2914C34.1709 36.0309 36.5078 33.6404 36.5078 30.7415C36.5077 27.8427 34.1763 25.4927 31.2969 25.4927ZM31.2969 33.3686H28.6791V30.7415C28.6791 29.2735 29.8479 28.0791 31.2969 28.0791C32.7459 28.0791 33.9246 29.2735 33.9246 30.7415C33.9246 32.2096 32.7459 33.3686 31.2969 33.3686Z" fill="#71706F"/>
|
||||
<path d="M17.8193 36.0308C15.3545 36.0308 13.2822 34.2744 12.7215 31.9798C12.7215 31.9798 12.5595 31.2212 12.5595 30.7216C12.5595 30.2221 12.7128 29.4556 12.7128 29.4556C13.2776 27.1667 15.3473 25.4623 17.8081 25.4623C20.7023 25.4623 23.0772 27.815 23.0772 30.7091V31.9819H15.3879C15.842 32.8693 16.7603 33.3685 17.8193 33.3685H24.7316L24.7411 25.8631C24.7411 24.7441 23.8257 23.8286 22.7067 23.8286H12.9095C11.7906 23.8286 10.875 24.7164 10.875 25.8354V35.6325C10.875 36.7515 11.7906 37.6947 12.9095 37.6947H22.7067C23.7109 37.6947 24.5485 36.9737 24.7104 36.0308H17.8193Z" fill="#C8036F"/>
|
||||
<path d="M17.8079 27.9526C16.753 27.9526 15.8356 28.5985 15.3796 29.4304H20.2363C19.7804 28.5985 18.863 27.9526 17.8079 27.9526Z" fill="#C8036F"/>
|
||||
<path d="M22.2452 20.6427C22.2452 18.2516 20.2581 16.3132 17.8068 16.3132C15.3961 16.3132 13.4355 18.1882 13.3711 20.5245C13.3701 20.5344 13.3709 20.544 13.3709 20.5542V21.8552C13.3709 22.0109 13.4977 22.1647 13.6572 22.1647H15.2901C15.4496 22.1647 15.5895 22.0109 15.5895 21.8552V20.6427C15.5895 19.4487 16.584 18.4772 17.8081 18.4772C19.0322 18.4772 20.0267 19.4487 20.0267 20.6427V21.8552C20.0267 22.0109 20.1561 22.1647 20.3156 22.1647H21.9486C22.1081 22.1647 22.2452 22.0109 22.2452 21.8552V20.6427Z" fill="#C8036F"/>
|
||||
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5121_51087)">
|
||||
<path d="M27.3615 15.7886H24.5822C24.273 15.7886 24.0216 15.541 24.0216 15.231C24.0216 14.921 24.2731 14.6482 24.5822 14.6482H28.8136V12.5498H24.5822C23.1053 12.5498 21.9037 13.7602 21.9037 15.2412C21.9037 16.7222 23.1053 17.9326 24.5822 17.9326H27.3238C27.6329 17.9326 27.8845 18.1792 27.8845 18.4891C27.8845 18.7991 27.6329 19.0274 27.3238 19.0274H21.4448C20.9456 19.9853 20.4603 20.8064 19.4751 21.217H27.3615C28.8136 21.1959 30.0013 19.9606 30.0013 18.4927C30.0013 17.0249 28.8136 15.8096 27.3615 15.7886Z" fill="#71706F"/>
|
||||
<path d="M16.7064 12.5498C14.3508 12.5498 12.4321 14.4901 12.4321 16.8743V16.9655V25.8698H14.5648V21.217H16.7019C19.0576 21.217 20.9695 19.2508 20.9695 16.8667C20.9695 14.4825 19.0621 12.5498 16.7064 12.5498ZM16.7064 19.0274H14.5648V16.8667C14.5648 15.6593 15.521 14.677 16.7064 14.677C17.8918 14.677 18.8562 15.6593 18.8562 16.8667C18.8562 18.0741 17.8918 19.0274 16.7064 19.0274Z" fill="#71706F"/>
|
||||
<path d="M5.68167 21.2166C3.66517 21.2166 1.96984 19.772 1.51109 17.8849C1.51109 17.8849 1.37855 17.2609 1.37855 16.85C1.37855 16.4392 1.50402 15.8088 1.50402 15.8088C1.96608 13.9263 3.65932 12.5245 5.67251 12.5245C8.04026 12.5245 9.98316 14.4595 9.98316 16.8397V17.8865H3.69249C4.06398 18.6164 4.81527 19.027 5.68167 19.027H11.3367L11.3444 12.8542C11.3444 11.9339 10.5955 11.1809 9.68005 11.1809H1.66496C0.749507 11.1809 0.000488281 11.911 0.000488281 12.8314V20.889C0.000488281 21.8093 0.749507 22.5851 1.66496 22.5851H9.68005C10.5016 22.5851 11.1869 21.992 11.3193 21.2166H5.68167Z" fill="#C8036F"/>
|
||||
<path d="M5.67044 14.5728C4.80739 14.5728 4.05683 15.1039 3.68384 15.7882H7.65713C7.28414 15.1039 6.53362 14.5728 5.67044 14.5728Z" fill="#C8036F"/>
|
||||
<path d="M9.30189 8.56078C9.30189 6.59421 7.67616 5 5.67078 5C3.69861 5 2.09462 6.54207 2.04194 8.46358C2.04108 8.47169 2.04176 8.47959 2.04176 8.48794V9.55801C2.04176 9.68601 2.14544 9.81255 2.27594 9.81255H3.61185C3.74235 9.81255 3.85679 9.68601 3.85679 9.55801V8.56078C3.85679 7.57875 4.67038 6.77978 5.67182 6.77978C6.67327 6.77978 7.48686 7.57875 7.48686 8.56078V9.55801C7.48686 9.68601 7.59272 9.81255 7.72322 9.81255H9.05917C9.18967 9.81255 9.30189 9.68601 9.30189 9.55801V8.56078Z" fill="#C8036F"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5121_51087">
|
||||
<rect width="30" height="30" fill="white" transform="translate(0.333496)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
@ -1,11 +1,9 @@
|
|||
<svg width="58" height="58" viewBox="0 0 58 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.000488281" width="58" height="58" rx="3" fill="white"/>
|
||||
<rect x="0.5" y="0.500488" width="57" height="57" rx="2.5" stroke="black" stroke-opacity="0.07"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.1926 34.1615V29.1674V29.1665H30.8942C32.0081 29.1671 32.9442 28.8171 33.7025 28.1165C34.4689 27.4515 34.8974 26.4954 34.8756 25.4989C34.8908 24.5079 34.4631 23.5589 33.7025 22.896C32.9508 22.1916 31.9398 21.8072 30.8942 21.8283H26.5574V34.1615H28.1926ZM28.1929 27.6524V23.3471V23.3461H30.9351C31.5463 23.3295 32.1355 23.5678 32.5531 24.0005C32.9732 24.3963 33.2102 24.9399 33.2102 25.5076C33.2102 26.0753 32.9732 26.6189 32.5531 27.0147C32.1304 27.4383 31.543 27.6698 30.9351 27.6524H28.1929Z" fill="#5F6368"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M41.5056 26.387C40.8061 25.7612 39.8521 25.4482 38.6434 25.4482C37.0908 25.4482 35.9184 25.9993 35.1262 27.1015L36.5664 27.9802C37.0986 27.2337 37.8214 26.8604 38.7348 26.8604C39.3172 26.8538 39.8808 27.06 40.3132 27.438C40.7443 27.7834 40.9923 28.2983 40.9886 28.8403V29.2024C40.3602 28.858 39.5606 28.6858 38.5896 28.6858C37.4521 28.6871 36.5427 28.9456 35.8616 29.4612C35.1804 29.9769 34.8398 30.6713 34.8398 31.5445C34.825 32.3396 35.1809 33.0988 35.8087 33.611C36.4547 34.1621 37.2574 34.4376 38.2169 34.4376C39.3409 34.4376 40.2414 33.9554 40.9185 32.991H40.9896V34.1621H42.5537V28.9613C42.5544 27.871 42.205 27.0129 41.5056 26.387ZM37.0703 32.6125C36.7278 32.3732 36.5257 31.9883 36.528 31.5792C36.528 31.1196 36.7504 30.7368 37.1983 30.4219C37.6418 30.1116 38.1957 29.9565 38.8599 29.9565C39.772 29.9565 40.4829 30.1533 40.9928 30.5469C40.9928 31.2121 40.7219 31.7917 40.1803 32.2857C39.6924 32.7585 39.0309 33.0246 38.3409 33.0258C37.8809 33.0341 37.432 32.8881 37.0703 32.6125Z" fill="#5F6368"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M51.5326 25.724L46.0724 37.882H44.3844L46.4107 33.628L42.8203 25.724H44.5977L47.1927 31.7858H47.2283L49.7522 25.724H51.5326Z" fill="#5F6368"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.5843 28.0914C21.5849 27.6086 21.5427 27.1266 21.4583 26.6508H14.562V29.3796H18.5119C18.3486 30.2602 17.821 31.038 17.0514 31.5327V33.304H19.4087C20.789 32.071 21.5843 30.2475 21.5843 28.0914Z" fill="#4285F4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5625 35.0146C16.5359 35.0146 18.1976 34.3868 19.4092 33.3043L17.0519 31.533C16.3958 31.964 15.5508 32.21 14.5625 32.21C12.6551 32.21 11.0362 30.9642 10.4572 29.2854H8.02881V31.1108C9.2701 33.504 11.7981 35.0145 14.5625 35.0146Z" fill="#34A853"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4571 29.2863C10.1511 28.4066 10.1511 27.4539 10.4571 26.5742V24.7488H8.02868C6.99044 26.7505 6.99044 29.11 8.02868 31.1117L10.4571 29.2863Z" fill="#FBBC04"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5625 23.6493C15.6054 23.6328 16.6131 24.0145 17.3678 24.7121L19.4549 22.6898C18.1315 21.4854 16.3781 20.8242 14.5625 20.8447C11.7981 20.8448 9.2701 22.3553 8.02881 24.7485L10.4572 26.5739C11.0362 24.8951 12.6551 23.6493 14.5625 23.6493Z" fill="#EA4335"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1889 18.2509V14.8676V14.8669H16.0191C16.7737 14.8674 17.4079 14.6303 17.9217 14.1556C18.4409 13.7051 18.7312 13.0574 18.7164 12.3823C18.7267 11.7109 18.4369 11.068 17.9217 10.6189C17.4124 10.1416 16.7275 9.88125 16.0191 9.89558H13.0811V18.2509H14.1889ZM14.1884 13.841V10.9243V10.9236H16.0462C16.4603 10.9123 16.8594 11.0738 17.1423 11.3669C17.4269 11.6351 17.5875 12.0033 17.5875 12.3879C17.5875 12.7726 17.4269 13.1408 17.1423 13.409C16.856 13.696 16.458 13.8528 16.0462 13.841H14.1884Z" fill="#5F6368"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.2076 12.9839C22.7337 12.5599 22.0874 12.3479 21.2686 12.3479C20.2167 12.3479 19.4224 12.7212 18.8857 13.4679L19.8614 14.0632C20.222 13.5575 20.7117 13.3046 21.3305 13.3046C21.725 13.3001 22.1068 13.4398 22.3997 13.6959C22.6918 13.9299 22.8599 14.2787 22.8573 14.6459V14.8912C22.4316 14.6579 21.8899 14.5412 21.2321 14.5412C20.4614 14.5421 19.8454 14.7172 19.3839 15.0666C18.9224 15.4159 18.6917 15.8864 18.6917 16.4779C18.6817 17.0166 18.9228 17.5309 19.3481 17.8779C19.7857 18.2513 20.3296 18.4379 20.9796 18.4379C21.741 18.4379 22.3511 18.1113 22.8098 17.4579H22.858V18.2513H23.9176V14.7279C23.9181 13.9892 23.6814 13.4079 23.2076 12.9839ZM20.2024 17.2012C19.9703 17.0391 19.8335 16.7784 19.835 16.5012C19.835 16.1899 19.9857 15.9305 20.2891 15.7172C20.5896 15.507 20.9648 15.4019 21.4148 15.4019C22.0327 15.4019 22.5143 15.5352 22.8598 15.8019C22.8598 16.2525 22.6763 16.6452 22.3093 16.9799C21.9788 17.3002 21.5307 17.4804 21.0632 17.4812C20.7515 17.4868 20.4474 17.3879 20.2024 17.2012Z" fill="#5F6368"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 12.5344L26.3009 20.7711H25.1573L26.53 17.8891L24.0977 12.5344H25.3018L27.0598 16.6411H27.0839L28.7938 12.5344H30Z" fill="#5F6368"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.71146 14.1384C9.71188 13.8113 9.68333 13.4847 9.62614 13.1624H4.9541V15.011H7.63003C7.51938 15.6077 7.16195 16.1346 6.64058 16.4697V17.6697H8.2376C9.1727 16.8344 9.71146 15.599 9.71146 14.1384Z" fill="#4285F4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.95374 18.8293C6.29067 18.8293 7.41636 18.404 8.23724 17.6707L6.64021 16.4707C6.19571 16.7627 5.62323 16.9293 4.95374 16.9293C3.66153 16.9293 2.56474 16.0853 2.17253 14.948H0.527344V16.1847C1.36828 17.806 3.08095 18.8293 4.95374 18.8293Z" fill="#34A853"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.17272 14.9478C1.96538 14.3518 1.96538 13.7064 2.17272 13.1105V11.8738H0.527529C-0.175843 13.2299 -0.175843 14.8284 0.527529 16.1845L2.17272 14.9478Z" fill="#FBBC04"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.95374 11.1291C5.66024 11.1179 6.34292 11.3765 6.8542 11.8491L8.2682 10.4791C7.37158 9.66313 6.18375 9.21516 4.95374 9.22907C3.08095 9.22916 1.36828 10.2524 0.527344 11.8738L2.17253 13.1104C2.56474 11.9731 3.66153 11.1291 4.95374 11.1291Z" fill="#EA4335"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -1,20 +1,18 @@
|
|||
<svg width="58" height="58" viewBox="0 0 58 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.000488281" width="58" height="58" rx="3" fill="white"/>
|
||||
<rect x="0.5" y="0.500488" width="57" height="57" rx="2.5" stroke="black" stroke-opacity="0.07"/>
|
||||
<g clip-path="url(#clip0_3277_11784)">
|
||||
<path d="M9 13.5955V43.6249C9 45.0623 10.1761 46.2384 11.6135 46.2384H29.5554C43.1196 46.2384 49 38.6461 49 28.571C49 18.5481 43.1196 10.9819 29.5554 10.9819H11.6135C10.1761 10.9819 9 12.158 9 13.5955Z" fill="white"/>
|
||||
<path d="M21.0078 18.3528V40.5417H30.6648C39.4332 40.5417 43.2358 35.589 43.2358 28.5848C43.2358 21.8811 39.4332 16.6802 30.6648 16.6802H22.6805C21.7527 16.6802 21.0078 17.4381 21.0078 18.3528Z" fill="#CC0066"/>
|
||||
<path d="M29.5561 43.8352H13.9533C12.5682 43.8352 11.4443 42.7113 11.4443 41.3262V15.8835C11.4443 14.4983 12.5682 13.3745 13.9533 13.3745H29.5561C44.3617 13.3745 46.5701 22.9008 46.5701 28.5722C46.5701 38.4121 40.5198 43.8352 29.5561 43.8352ZM13.9533 14.2108C13.0255 14.2108 12.2807 14.9557 12.2807 15.8835V41.3262C12.2807 42.254 13.0255 42.9988 13.9533 42.9988H29.5561C39.984 42.9988 45.7338 37.8763 45.7338 28.5722C45.7338 16.0795 35.5933 14.2108 29.5561 14.2108H13.9533Z" fill="black"/>
|
||||
<path d="M24.4023 25.5966C24.7421 25.5966 25.0557 25.6488 25.3562 25.7534C25.6568 25.8579 25.9051 26.0278 26.1272 26.2369C26.3363 26.459 26.5062 26.7334 26.6369 27.0471C26.7545 27.3738 26.8198 27.7527 26.8198 28.197C26.8198 28.5891 26.7676 28.9419 26.6761 29.2686C26.5715 29.5953 26.4278 29.8827 26.2318 30.118C26.0358 30.3532 25.7875 30.5361 25.4869 30.6799C25.1864 30.8105 24.8335 30.889 24.4284 30.889H22.1416V25.5835H24.4023V25.5966ZM24.3239 29.9219C24.4938 29.9219 24.6506 29.8958 24.8205 29.8435C24.9773 29.7913 25.121 29.6998 25.2386 29.5691C25.3562 29.4384 25.4608 29.2816 25.5392 29.0726C25.6176 28.8635 25.6568 28.6283 25.6568 28.3277C25.6568 28.0663 25.6307 27.8181 25.5784 27.609C25.5261 27.3999 25.4346 27.2039 25.317 27.0601C25.1994 26.9164 25.0426 26.7857 24.8466 26.7073C24.6506 26.6289 24.4154 26.5897 24.1279 26.5897H23.2916V29.935H24.3239V29.9219Z" fill="white"/>
|
||||
<path d="M31.5357 25.5966V26.5766H28.7392V27.7135H31.3135V28.6152H28.7392V29.9089H31.601V30.889H27.5762V25.5835H31.5357V25.5966Z" fill="white"/>
|
||||
<path d="M35.5369 25.5952L37.5232 30.9007H36.3079L35.9028 29.7246H33.9165L33.4984 30.9007H32.3223L34.3216 25.5952H35.5369ZM35.6022 28.8491L34.9358 26.902H34.9227L34.2301 28.8491H35.6022Z" fill="white"/>
|
||||
<path d="M39.4189 25.5952V29.9206H42.0063V30.9007H38.2559V25.5952H39.4189Z" fill="white"/>
|
||||
<path d="M16.6458 30.6925C17.9954 30.6925 19.0894 29.5984 19.0894 28.2488C19.0894 26.8992 17.9954 25.8052 16.6458 25.8052C15.2962 25.8052 14.2021 26.8992 14.2021 28.2488C14.2021 29.5984 15.2962 30.6925 16.6458 30.6925Z" fill="black"/>
|
||||
<path d="M18.4872 40.5476C16.4356 40.5476 14.7891 38.8881 14.7891 36.8495V33.9616C14.7891 32.9423 15.6123 32.106 16.6447 32.106C17.6639 32.106 18.5003 32.9292 18.5003 33.9616V40.5476H18.4872Z" fill="black"/>
|
||||
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5121_51053)">
|
||||
<path d="M0.666748 3.73895V26.261C0.666748 27.3391 1.54881 28.2211 2.62689 28.2211H16.0833C26.2564 28.2211 30.6667 22.5269 30.6667 14.9706C30.6667 7.45343 26.2564 1.77881 16.0833 1.77881H2.62689C1.54881 1.77881 0.666748 2.66087 0.666748 3.73895Z" fill="white"/>
|
||||
<path d="M9.67358 7.30649V23.9481H16.9163C23.4926 23.9481 26.3446 20.2336 26.3446 14.9805C26.3446 9.95269 23.4926 6.052 16.9163 6.052H10.9281C10.2322 6.052 9.67358 6.62044 9.67358 7.30649Z" fill="#CC0066"/>
|
||||
<path d="M16.0833 26.4278H4.38125C3.34237 26.4278 2.49951 25.5849 2.49951 24.546V5.46401C2.49951 4.42514 3.34237 3.58228 4.38125 3.58228H16.0833C27.1875 3.58228 28.8438 10.727 28.8438 14.9805C28.8438 22.3605 24.3061 26.4278 16.0833 26.4278ZM4.38125 4.20952C3.6854 4.20952 3.12676 4.76816 3.12676 5.46401V24.546C3.12676 25.2419 3.6854 25.8005 4.38125 25.8005H16.0833C23.9043 25.8005 28.2166 21.9586 28.2166 14.9805C28.2166 5.61102 20.6112 4.20952 16.0833 4.20952H4.38125Z" fill="black"/>
|
||||
<path d="M12.2219 12.7359C12.4767 12.7359 12.7119 12.7751 12.9373 12.8535C13.1628 12.9319 13.349 13.0593 13.5156 13.2161C13.6724 13.3827 13.7998 13.5885 13.8978 13.8238C13.986 14.0688 14.035 14.353 14.035 14.6862C14.035 14.9802 13.9958 15.2449 13.9272 15.4899C13.8488 15.7349 13.741 15.9505 13.594 16.1269C13.447 16.3033 13.2608 16.4405 13.0354 16.5484C12.8099 16.6464 12.5453 16.7052 12.2415 16.7052H10.5264V12.7261H12.2219V12.7359ZM12.1631 15.9799C12.2905 15.9799 12.4081 15.9603 12.5355 15.9211C12.6531 15.8819 12.7609 15.8133 12.8491 15.7153C12.9373 15.6173 13.0158 15.4997 13.0746 15.3429C13.1334 15.1861 13.1628 15.0096 13.1628 14.7842C13.1628 14.5882 13.1432 14.402 13.104 14.2452C13.0648 14.0884 12.9962 13.9414 12.9079 13.8336C12.8197 13.7257 12.7021 13.6277 12.5551 13.5689C12.4081 13.5101 12.2317 13.4807 12.0161 13.4807H11.3888V15.9897H12.1631V15.9799Z" fill="white"/>
|
||||
<path d="M17.5731 12.7359V13.4709H15.4758V14.3236H17.4065V14.9998H15.4758V15.9701H17.6221V16.7052H14.6035V12.7261H17.5731V12.7359Z" fill="white"/>
|
||||
<path d="M20.5721 12.7358L22.0618 16.7149H21.1504L20.8465 15.8329H19.3568L19.0432 16.7149H18.1611L19.6606 12.7358H20.5721ZM20.6211 15.1762L20.1213 13.7159H20.1115L19.592 15.1762H20.6211Z" fill="white"/>
|
||||
<path d="M23.4826 12.7358V15.9799H25.4231V16.7149H22.6104V12.7358H23.4826Z" fill="white"/>
|
||||
<path d="M6.39987 16.5583C7.41206 16.5583 8.23261 15.7378 8.23261 14.7256C8.23261 13.7134 7.41206 12.8928 6.39987 12.8928C5.38768 12.8928 4.56714 13.7134 4.56714 14.7256C4.56714 15.7378 5.38768 16.5583 6.39987 16.5583Z" fill="black"/>
|
||||
<path d="M7.78215 23.948C6.24344 23.948 5.00854 22.7033 5.00854 21.1744V19.0084C5.00854 18.2439 5.62599 17.6167 6.40025 17.6167C7.16471 17.6167 7.79195 18.2341 7.79195 19.0084V23.948H7.78215Z" fill="black"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3277_11784">
|
||||
<rect width="40" height="35.2565" fill="white" transform="translate(9 11.0005)"/>
|
||||
<clipPath id="clip0_5121_51053">
|
||||
<rect width="30" height="26.4423" fill="white" transform="translate(0.666748 1.77881)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1,15 @@
|
|||
<svg width="64" height="63" viewBox="0 0 64 63" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="64" height="62.8571" rx="3" fill="white"/>
|
||||
<rect x="0.5" y="0.5" width="63" height="61.8571" rx="2.5" stroke="black" stroke-opacity="0.07"/>
|
||||
<g clip-path="url(#clip0_5121_51714)">
|
||||
<path d="M43.2889 20.9441C43.2889 25.7526 38.8793 31.4358 32.2162 31.4358H25.7984L25.4869 33.4385L23.9858 43.0928H16L20.8014 12.0068H33.7358C38.0885 12.0068 41.5175 14.4552 42.774 17.8576C43.1296 18.821 43.3109 19.8611 43.2896 20.9441H43.2889Z" fill="#002991"/>
|
||||
<path d="M47.8945 29.8816C47.0127 35.2732 42.4076 39.2071 36.969 39.2071H32.5103L30.6486 50.8642H22.7119L23.9855 43.0931L25.4867 33.4388L25.7981 31.436H32.2159C38.879 31.436 43.2886 25.7529 43.2886 20.9443C43.29 20.9443 43.2915 20.9458 43.2929 20.9465C46.5725 22.6477 48.4812 26.0945 47.8938 29.8816H47.8945Z" fill="#60CDFF"/>
|
||||
<path d="M43.2881 20.9436C43.2881 20.9436 43.2909 20.9451 43.2924 20.9458C43.2909 20.8634 43.2902 20.8584 43.2881 20.9436Z" fill="black"/>
|
||||
<path d="M43.2903 20.9428C41.9186 20.2143 40.2524 19.7773 38.4398 19.7773H27.6124L25.7998 31.4344H32.2176C38.8807 31.4344 43.2903 25.7513 43.2903 20.9428Z" fill="#008CFF"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_5121_51714">
|
||||
<rect width="32" height="38.8571" fill="white" transform="translate(16 12)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -1,15 +1,13 @@
|
|||
<svg width="58" height="58" viewBox="0 0 58 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect y="0.000183105" width="58" height="58" rx="3" fill="white"/>
|
||||
<rect x="0.5" y="0.500183" width="57" height="57" rx="2.5" stroke="black" stroke-opacity="0.07"/>
|
||||
<g clip-path="url(#clip0_3277_11734)">
|
||||
<path d="M40.2889 18.9445C40.2889 23.7531 35.8793 29.4362 29.2162 29.4362H22.7984L22.4869 31.439L20.9858 41.0933H13L17.8014 10.0073H30.7358C35.0885 10.0073 38.5175 12.4556 39.774 15.858C40.1296 16.8214 40.3109 17.8615 40.2896 18.9445H40.2889Z" fill="#002991"/>
|
||||
<path d="M44.8945 27.882C44.0127 33.2736 39.4076 37.2076 33.969 37.2076H29.5103L27.6486 48.8646H19.7119L20.9855 41.0935L22.4867 31.4392L22.7981 29.4364H29.2159C35.879 29.4364 40.2886 23.7533 40.2886 18.9448C40.29 18.9448 40.2915 18.9462 40.2929 18.9469C43.5725 20.6481 45.4812 24.095 44.8938 27.882H44.8945Z" fill="#60CDFF"/>
|
||||
<path d="M40.2881 18.9441C40.2881 18.9441 40.2909 18.9455 40.2924 18.9462C40.2909 18.8638 40.2902 18.8588 40.2881 18.9441Z" fill="black"/>
|
||||
<path d="M40.2903 18.9432C38.9186 18.2147 37.2524 17.7778 35.4398 17.7778H24.6124L22.7998 29.4348H29.2176C35.8807 29.4348 40.2903 23.7517 40.2903 18.9432Z" fill="#008CFF"/>
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_5121_50796)">
|
||||
<path d="M22.0767 8.52009C22.0767 11.4901 19.3125 15.0002 15.1356 15.0002H11.1125L10.9172 16.2372L9.97623 22.2002H4.97021L7.98006 3H16.0882C18.8168 3 20.9663 4.51219 21.7539 6.61369C21.9768 7.20875 22.0905 7.85114 22.0771 8.52009H22.0767Z" fill="#002991"/>
|
||||
<path d="M24.9631 14.0401C24.4103 17.3702 21.5235 19.8 18.1143 19.8H15.3193L14.1523 26.9999H9.177L9.97538 22.2001L10.9164 16.2372L11.1116 15.0002H15.1347C19.3116 15.0002 22.0758 11.49 22.0758 8.52002C22.0767 8.52002 22.0776 8.5209 22.0785 8.52135C24.1344 9.5721 25.3309 11.701 24.9626 14.0401H24.9631Z" fill="#60CDFF"/>
|
||||
<path d="M22.0769 8.52011C22.0769 8.52011 22.0787 8.521 22.0796 8.52144C22.0787 8.47056 22.0782 8.46746 22.0769 8.52011Z" fill="black"/>
|
||||
<path d="M22.076 8.52011C21.2161 8.07017 20.1717 7.80029 19.0354 7.80029H12.2481L11.1118 15.0002H15.1349C19.3118 15.0002 22.076 11.4901 22.076 8.52011Z" fill="#008CFF"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3277_11734">
|
||||
<rect width="32" height="38.8571" fill="white" transform="translate(13 10.0003)"/>
|
||||
<clipPath id="clip0_5121_50796">
|
||||
<rect width="20.0597" height="24" fill="white" transform="translate(4.97021 3)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 32 KiB |
|
@ -1,3 +1,4 @@
|
|||
|
||||
<svg width="38" height="24" viewBox="0 0 38 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="38" height="24" rx="2" fill="white"/>
|
||||
<rect x="0.5" y="0.5" width="37" height="23" rx="1.5" stroke="black" stroke-opacity="0.07"/>
|
||||
|
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
3
modules/ppcp-settings/images/icon-settings.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.9557 4.836C10.9945 4.6025 11.1149 4.39034 11.2954 4.23726C11.476 4.08418 11.705 4.00011 11.9417 4H13.2477C13.4846 3.99987 13.7138 4.08384 13.8945 4.23694C14.0753 4.39004 14.1958 4.60233 14.2347 4.836L14.4787 6.302C15.2657 6.562 15.9817 6.981 16.5867 7.52L17.9797 6.998C18.2013 6.91523 18.4451 6.91372 18.6677 6.99373C18.8904 7.07374 19.0774 7.23009 19.1957 7.435L19.8487 8.565C19.9673 8.77005 20.0094 9.01056 19.9672 9.2437C19.9251 9.47683 19.8016 9.68744 19.6187 9.838L18.4707 10.782C18.6364 11.5852 18.6364 12.4138 18.4707 13.217L19.6197 14.163C19.8023 14.3135 19.9257 14.5239 19.9678 14.7568C20.0099 14.9898 19.9681 15.2301 19.8497 15.435L19.1967 16.565C19.0784 16.7699 18.8914 16.9263 18.6687 17.0063C18.4461 17.0863 18.2023 17.0848 17.9807 17.002L16.5867 16.48C15.9817 17.02 15.2667 17.438 14.4787 17.698L14.2347 19.164C14.1958 19.3977 14.0753 19.61 13.8945 19.7631C13.7138 19.9162 13.4846 20.0001 13.2477 20H11.9417C11.705 19.9999 11.476 19.9158 11.2954 19.7627C11.1149 19.6097 10.9945 19.3975 10.9557 19.164L10.7117 17.698C9.9331 17.4405 9.21564 17.0259 8.60367 16.48L7.20967 17.002C6.98803 17.0851 6.74409 17.0869 6.52125 17.0071C6.2984 16.9273 6.11111 16.771 5.99267 16.566L5.33967 15.435C5.22128 15.2301 5.17941 14.9898 5.22153 14.7568C5.26364 14.5239 5.387 14.3135 5.56967 14.163L6.71867 13.217C6.55297 12.4138 6.55297 11.5852 6.71867 10.782L5.57067 9.838C5.388 9.68749 5.26464 9.47707 5.22253 9.24416C5.18041 9.01125 5.22228 8.77095 5.34067 8.566L5.99367 7.435C6.11195 7.22986 6.29918 7.07335 6.52204 6.99333C6.7449 6.91331 6.98892 6.91496 7.21067 6.998L8.60367 7.52C9.21562 6.97407 9.93308 6.55952 10.7117 6.302L10.9557 4.836ZM15.5957 12C15.5957 12.394 15.5181 12.7841 15.3673 13.1481C15.2165 13.512 14.9956 13.8427 14.717 14.1213C14.4384 14.3999 14.1077 14.6209 13.7437 14.7716C13.3797 14.9224 12.9896 15 12.5957 15C12.2017 15 11.8116 14.9224 11.4476 14.7716C11.0836 14.6209 10.7529 14.3999 10.4744 14.1213C10.1958 13.8427 9.9748 13.512 9.82403 13.1481C9.67327 12.7841 9.59567 12.394 9.59567 12C9.59567 11.2044 9.91174 10.4413 10.4744 9.87868C11.037 9.31607 11.8 9 12.5957 9C13.3913 9 14.1544 9.31607 14.717 9.87868C15.2796 10.4413 15.5957 11.2044 15.5957 12Z" fill="#505050"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -11,6 +11,9 @@ $color-gray-400: #CCCCCC;
|
|||
$color-gray-300: #EBEBEB;
|
||||
$color-gray-200: #E0E0E0;
|
||||
$color-gray: #646970;
|
||||
$color-text-tertiary: #505050;
|
||||
$color-text-text: #070707;
|
||||
$color-border:#AEAEAE;
|
||||
|
||||
$shadow-card: 0 3px 6px 0 rgba(0, 0, 0, 0.15);
|
||||
$shadow-selection-box: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
|
|
|
@ -5,7 +5,6 @@ button.components-button, a.components-button {
|
|||
}
|
||||
|
||||
&:disabled {
|
||||
background-color: $color-gray-500;
|
||||
color: $color-white;
|
||||
}
|
||||
|
||||
|
@ -16,16 +15,20 @@ button.components-button, a.components-button {
|
|||
|
||||
&.is-primary {
|
||||
@include font(13, 20, 400);
|
||||
color:$color-white;
|
||||
|
||||
&:not(:disabled) {
|
||||
background-color: $color-blueberry;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-secondary:not(:disabled) {
|
||||
border-color:$color-blueberry;
|
||||
background-color:$color-white;
|
||||
color:$color-blueberry;
|
||||
&:hover{
|
||||
background-color:$color-white;
|
||||
background:none;
|
||||
border-color: $color-blueberry;
|
||||
background-color: $color-white;
|
||||
color: $color-blueberry;
|
||||
|
||||
&:hover {
|
||||
background-color: $color-white;
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,20 @@
|
|||
&__radio-value {
|
||||
@include hide-input-field;
|
||||
|
||||
&:checked {
|
||||
+ .ppcp-r__radio-presentation {
|
||||
background: $color-white;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 6px solid $color-blueberry;
|
||||
&:checked + .ppcp-r__radio-presentation {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 12px;
|
||||
background-color: $color-blueberry;
|
||||
display: block;
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +112,7 @@ select {
|
|||
.components-base-control__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
gap: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,46 +1,75 @@
|
|||
.ppcp-r-payment-method-item-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.ppcp-r-payment-method-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
width: calc(100% / 3 - 32px / 3);
|
||||
border: 1px solid $color-gray-300;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
min-height: 200px;
|
||||
|
||||
&:not(:last-child) {
|
||||
padding-bottom: 32px;
|
||||
@media screen and (max-width: 767px) {
|
||||
width: calc(50% - 8px);
|
||||
}
|
||||
|
||||
&:not(:first-child) {
|
||||
border-top: 1px solid $color-gray-400;
|
||||
padding-top: 32px;
|
||||
@media screen and (max-width: 480px) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__checkbox-wrap {
|
||||
position: relative;
|
||||
&__wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&__title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.ppcp-r__checkbox {
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
&__icon-wrap {
|
||||
margin-right: 18px;
|
||||
margin: 0 0 8px 0;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__content {
|
||||
padding-right: 24px;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: $color-text-tertiary;
|
||||
@include font(13, 20, 400);
|
||||
}
|
||||
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include font(16, 20, 600);
|
||||
@include font(13, 20, 500);
|
||||
color: $color-black;
|
||||
margin: 0 0 8px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&__settings-button {
|
||||
line-height: 0;
|
||||
transition: 0.2s ease-out transform;
|
||||
transform: rotate(0deg);
|
||||
zoom: 1.005;
|
||||
|
||||
&:hover {
|
||||
transform: rotate(45deg);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
button.is-secondary {
|
||||
@include small-button;
|
||||
}
|
||||
|
||||
&__footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: auto;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,18 +3,6 @@
|
|||
@import './button';
|
||||
@import './fields';
|
||||
|
||||
&__container {
|
||||
max-width: 100%;
|
||||
width: 400px;
|
||||
|
||||
&--small {
|
||||
padding: 0 50px;
|
||||
@media screen and (max-width: 480px){
|
||||
padding:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.components-modal {
|
||||
&__header {
|
||||
height: 52px;
|
||||
|
@ -26,8 +14,23 @@
|
|||
}
|
||||
|
||||
&__content {
|
||||
margin-top: 60px;
|
||||
padding:0 24px 28px 24px;
|
||||
}
|
||||
}
|
||||
|
||||
&__container {
|
||||
width: 352px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.has-size-small {
|
||||
.ppcp-r-modal__container {
|
||||
max-width: 252px;
|
||||
}
|
||||
|
||||
.components-modal__content {
|
||||
margin-top: 48px;
|
||||
padding: 0 50px 48px 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,23 +40,30 @@
|
|||
align-items: center;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid $color-gray-500;
|
||||
padding-bottom: 12px;
|
||||
margin-bottom: 24px;
|
||||
padding-bottom: 18px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include font(16, 20, 600);
|
||||
@include font(14, 20, 600);
|
||||
color: $color-black;
|
||||
}
|
||||
|
||||
&__content {
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__inverted-toggle-control {
|
||||
.components-form-toggle {
|
||||
order: 1;
|
||||
.components-toggle-control {
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
|
||||
label {
|
||||
@include font(13, 20, 400);
|
||||
color: $color-text-text;
|
||||
}
|
||||
|
||||
.components-form-toggle__track {
|
||||
border-color: $color-border;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +73,7 @@
|
|||
gap: 8px;
|
||||
|
||||
&--save {
|
||||
margin-top: 24px;
|
||||
margin-top: -4px;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
|
@ -81,15 +91,28 @@
|
|||
|
||||
&--acdc {
|
||||
gap: 18px;
|
||||
|
||||
.ppcp-r-modal__field-row--save {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ppcp-r-modal__field-row--save button.is-primary {
|
||||
@include small-button;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
.ppcp-r__radio-content {
|
||||
label {
|
||||
@include font(13, 20, 400);
|
||||
}
|
||||
}
|
||||
|
||||
&__content-title {
|
||||
@include font(14, 20, 600);
|
||||
@include font(13, 20, 600);
|
||||
color: $color-black;
|
||||
display: block;
|
||||
margin: 0 0 4px 0;
|
||||
|
@ -97,7 +120,7 @@
|
|||
|
||||
&__description {
|
||||
@include font(14, 20, 400);
|
||||
margin: 0 0 24px 0;
|
||||
color: $color-black;
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,21 +17,35 @@
|
|||
}
|
||||
|
||||
&-settings-card {
|
||||
background-color: $color-white;
|
||||
padding: 48px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px 0 #0000001A;
|
||||
@media screen and (min-width: 960px) {
|
||||
display: flex;
|
||||
gap: 48px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
&__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
padding-bottom: 18px;
|
||||
border-bottom: 2px solid $color-gray-700;
|
||||
margin-bottom: 32px;
|
||||
|
||||
@media screen and (min-width: 960px) {
|
||||
width: 280px;
|
||||
flex-shrink: 0;
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
@media screen and (min-width: 960px) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
box-shadow: 0 -1px 0 0 $color-gray-400 inset;
|
||||
margin-bottom: 48px;
|
||||
gap: 12px;
|
||||
|
||||
overflow: auto;
|
||||
.components-button {
|
||||
padding: 16px 20px;
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
body:has(.ppcp-r-container--settings) {
|
||||
background-color: #fff !important;
|
||||
|
||||
.notice, .nav-tab-wrapper.woo-nav-tab-wrapper, .woocommerce-layout, .wrap.woocommerce form > h2, #screen-meta-links {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
.ppcp-r-tabs.settings,
|
||||
.ppcp-r-container--settings {
|
||||
--max-container-width: var(--max-width-settings);
|
||||
|
||||
.ppcp-r-inner-container {
|
||||
max-width: var(--max-container-width);
|
||||
}
|
||||
}
|
|
@ -20,10 +20,12 @@
|
|||
@import './components/reusable-components/spinner-overlay';
|
||||
@import './components/reusable-components/welcome-docs';
|
||||
@import './components/screens/onboarding';
|
||||
@import './components/screens/settings';
|
||||
@import './components/screens/overview/tab-overview';
|
||||
@import './components/screens/overview/tab-payment-methods';
|
||||
@import 'components/screens/overview/tab-settings';
|
||||
@import './components/screens/overview/tab-settings';
|
||||
}
|
||||
|
||||
@import './components/reusable-components/payment-method-modal';
|
||||
@import './components/screens/onboarding-global';
|
||||
@import './components/screens/settings-global';
|
||||
|
|
|
@ -2,7 +2,9 @@ import { Button } from '@wordpress/components';
|
|||
import PaymentMethodIcon from './PaymentMethodIcon';
|
||||
import { PayPalCheckbox } from './Fields';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { ToggleControl } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import data from '../../utils/data';
|
||||
|
||||
const PaymentMethodItem = ( props ) => {
|
||||
const [ paymentMethodState, setPaymentMethodState ] = useState();
|
||||
|
@ -21,36 +23,37 @@ const PaymentMethodItem = ( props ) => {
|
|||
return (
|
||||
<>
|
||||
<div className="ppcp-r-payment-method-item">
|
||||
<div className="ppcp-r-payment-method-item__checkbox-wrap">
|
||||
<PayPalCheckbox
|
||||
currentValue={ [ paymentMethodState ] }
|
||||
name="payment_method_status"
|
||||
value={ props.payment_method_id }
|
||||
handleCheckboxState={ handleCheckboxState }
|
||||
/>
|
||||
<div className="ppcp-r-payment-method-item__icon-wrap">
|
||||
<div className="ppcp-r-payment-method-item__wrap">
|
||||
<div className="ppcp-r-payment-method-item__title-wrap">
|
||||
<PaymentMethodIcon
|
||||
icons={ [ props.icon ] }
|
||||
type={ props.icon }
|
||||
/>
|
||||
</div>
|
||||
<div className="ppcp-r-payment-method-item__content">
|
||||
<span className="ppcp-r-payment-method-item__title">
|
||||
{ props.title }
|
||||
</span>
|
||||
</div>
|
||||
<div className="ppcp-r-payment-method-item__content">
|
||||
<p>{ props.description }</p>
|
||||
</div>
|
||||
<div className="ppcp-r-payment-method-item__footer">
|
||||
<ToggleControl
|
||||
__nextHasNoMarginBottom={ true }
|
||||
checked={
|
||||
props.payment_method_id === paymentMethodState
|
||||
}
|
||||
onChange={ ( newValue ) =>
|
||||
handleCheckboxState( newValue )
|
||||
}
|
||||
/>
|
||||
<div
|
||||
className="ppcp-r-payment-method-item__settings-button"
|
||||
onClick={ () => setModalIsVisible( true ) }
|
||||
>
|
||||
{ Modal && data().getImage( 'icon-settings.svg' ) }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{ Modal && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={ () => {
|
||||
setModalIsVisible( true );
|
||||
} }
|
||||
>
|
||||
{ __( 'Modify', 'woocommerce-paypal-payments' ) }
|
||||
</Button>
|
||||
) }
|
||||
</div>
|
||||
{ Modal && modalIsVisible && (
|
||||
<Modal setModalIsVisible={ setModalIsVisible } />
|
||||
|
|
|
@ -3,20 +3,17 @@ import PaymentMethodIcon from './PaymentMethodIcon';
|
|||
|
||||
const PaymentMethodModal = ( props ) => {
|
||||
let className = 'ppcp-r-modal';
|
||||
let classNameContainer = 'ppcp-r-modal__container';
|
||||
const classNameContainer = 'ppcp-r-modal__container';
|
||||
|
||||
if ( props?.className ) {
|
||||
className += ' ' + props.className;
|
||||
}
|
||||
|
||||
if ( props?.container && props.container === 'small' ) {
|
||||
classNameContainer += ' ppcp-r-modal__container--small';
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
className={ className }
|
||||
onRequestClose={ () => props.setModalIsVisible( false ) }
|
||||
size={ props?.size }
|
||||
>
|
||||
<div className={ classNameContainer }>
|
||||
<div className="ppcp-r-modal__header">
|
||||
|
|
|
@ -9,7 +9,6 @@ const SettingsCard = ( props ) => {
|
|||
return (
|
||||
<div className={ className }>
|
||||
<div className="ppcp-r-settings-card__header">
|
||||
{ data().getImage( props.icon ) }
|
||||
<div className="ppcp-r-settings-card__content-inner">
|
||||
<span className="ppcp-r-settings-card__title">
|
||||
{ props.title }
|
||||
|
|
|
@ -14,7 +14,7 @@ const ModalAcdc = ( { setModalIsVisible } ) => {
|
|||
return (
|
||||
<PaymentMethodModal
|
||||
setModalIsVisible={ setModalIsVisible }
|
||||
icon="payment-method-cards"
|
||||
icon="payment-method-cards-big"
|
||||
title={ __(
|
||||
'Advanced Credit and Debit Card Payments',
|
||||
'woocommerce-paypal-payments'
|
||||
|
@ -64,8 +64,7 @@ const ModalAcdc = ( { setModalIsVisible } ) => {
|
|||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
/>
|
||||
</div>
|
||||
<div className="ppcp-r-modal__field-rows">
|
||||
|
||||
<div className="ppcp-r-modal__field-row ppcp-r-modal__field-row--save">
|
||||
<Button variant="primary">
|
||||
{ __( 'Save changes', 'woocommerce-paypal-payments' ) }
|
||||
|
|
|
@ -17,8 +17,9 @@ const ModalFastlane = ( { setModalIsVisible } ) => {
|
|||
return (
|
||||
<PaymentMethodModal
|
||||
setModalIsVisible={ setModalIsVisible }
|
||||
icon="payment-method-fastlane"
|
||||
icon="payment-method-fastlane-big"
|
||||
title={ __( 'Fastlane by PayPal', 'woocommerce-paypal-payments' ) }
|
||||
size="small"
|
||||
>
|
||||
<div className="ppcp-r-modal__field-rows ppcp-r-modal__field-rows--fastlane">
|
||||
<div className="ppcp-r-modal__field-row">
|
||||
|
|
|
@ -17,8 +17,7 @@ const ModalPayPal = ( { setModalIsVisible } ) => {
|
|||
return (
|
||||
<PaymentMethodModal
|
||||
setModalIsVisible={ setModalIsVisible }
|
||||
icon="payment-method-paypal"
|
||||
container="small"
|
||||
icon="payment-method-paypal-big"
|
||||
title={ __( 'PayPal', 'woocommerce-paypal-payments' ) }
|
||||
>
|
||||
<div className="ppcp-r-modal__field-rows">
|
||||
|
@ -53,7 +52,6 @@ const ModalPayPal = ( { setModalIsVisible } ) => {
|
|||
</div>
|
||||
<div className="ppcp-r-modal__field-row">
|
||||
<ToggleControl
|
||||
className="ppcp-r-modal__inverted-toggle-control"
|
||||
label={ __(
|
||||
'Show logo',
|
||||
'woocommerce-paypal-payments'
|
||||
|
|
|
@ -24,7 +24,6 @@ const TabOverview = () => {
|
|||
{ todosData.length > 0 && (
|
||||
<SettingsCard
|
||||
className="ppcp-r-tab-overview-todo"
|
||||
icon="icon-overview-list.svg"
|
||||
title={ __(
|
||||
'Things to do next',
|
||||
'woocommerce-paypal-payments'
|
||||
|
@ -52,7 +51,6 @@ const TabOverview = () => {
|
|||
) }
|
||||
<SettingsCard
|
||||
className="ppcp-r-tab-overview-support"
|
||||
icon="icon-overview-support.svg"
|
||||
title={ __( 'Status', 'woocommerce-paypal-payments' ) }
|
||||
description={ __(
|
||||
'Your PayPal account connection details, along with available products and features.',
|
||||
|
|
|
@ -7,9 +7,16 @@ import ModalAcdc from './Modals/ModalAcdc';
|
|||
|
||||
const TabPaymentMethods = () => {
|
||||
const renderPaymentMethods = ( data ) => {
|
||||
return data.map( ( paymentMethod ) => (
|
||||
<PaymentMethodItem key={ paymentMethod.id } { ...paymentMethod } />
|
||||
) );
|
||||
return (
|
||||
<div className="ppcp-r-payment-method-item-list">
|
||||
{ data.map( ( paymentMethod ) => (
|
||||
<PaymentMethodItem
|
||||
key={ paymentMethod.id }
|
||||
{ ...paymentMethod }
|
||||
/>
|
||||
) ) }
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -110,7 +117,7 @@ const paymentMethodsOnlineCardPaymentsDefault = [
|
|||
"Present custom credit and debit card fields to your payers so they can pay with credit and debit cards using your site's branding.",
|
||||
'woocommerce-paypal-payments'
|
||||
),
|
||||
icon: 'payment-method-cards',
|
||||
icon: 'payment-method-advanced-cards',
|
||||
modal: ModalAcdc,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import TabNavigation from '../ReusableComponents/TabNavigation';
|
||||
import { getSettingsTabs } from './tabs';
|
||||
import { OnboardingHooks } from '../../data';
|
||||
import Onboarding from './Onboarding/Onboarding';
|
||||
import SettingsScreen from './SettingsScreen';
|
||||
|
||||
const Settings = () => {
|
||||
const onboardingProgress = OnboardingHooks.useSteps();
|
||||
|
@ -15,9 +14,7 @@ const Settings = () => {
|
|||
return <Onboarding />;
|
||||
}
|
||||
|
||||
const tabs = getSettingsTabs( onboardingProgress );
|
||||
|
||||
return <TabNavigation tabs={ tabs }></TabNavigation>;
|
||||
return <SettingsScreen />;
|
||||
};
|
||||
|
||||
export default Settings;
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
import { Button } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import data from '../../utils/data';
|
||||
|
||||
const SettingsNavigation = ( {} ) => {
|
||||
return (
|
||||
<div className="ppcp-r-navigation-container">
|
||||
<div className="ppcp-r-navigation">
|
||||
<div className="ppcp-r-navigation--left">
|
||||
<span>{ data().getImage( 'icon-arrow-left.svg' ) }</span>
|
||||
<a
|
||||
className="ppcp-r-navigation--left__link"
|
||||
href={ global.ppcpSettings.wcPaymentsTabUrl }
|
||||
aria-label={ __(
|
||||
'PayPal Payments',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
>
|
||||
{ __(
|
||||
'PayPal Payments',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
</a>
|
||||
</div>
|
||||
{
|
||||
<div className="ppcp-r-navigation--right">
|
||||
<Button variant="primary" disabled={ false }>
|
||||
{ __( 'Save', 'woocommerce-paypal-payments' ) }
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SettingsNavigation;
|
|
@ -0,0 +1,19 @@
|
|||
import { getSettingsTabs } from './tabs';
|
||||
import SettingsNavigation from './SettingsNavigation';
|
||||
import Container from '../ReusableComponents/Container';
|
||||
import TabNavigation from '../ReusableComponents/TabNavigation';
|
||||
|
||||
const SettingsScreen = () => {
|
||||
const tabs = getSettingsTabs();
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsNavigation />
|
||||
<Container page="settings">
|
||||
<TabNavigation tabs={ tabs }></TabNavigation>
|
||||
</Container>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SettingsScreen;
|
32
modules/ppcp-settings/resources/js/switchSettingsUi.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const config = ppcpSwitchSettingsUi;
|
||||
const button = document.querySelector('.button.button-settings-switch-ui');
|
||||
|
||||
if ( ! typeof config || !button) {
|
||||
return;
|
||||
}
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
fetch(config.endpoint, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
nonce: config.nonce,
|
||||
}),
|
||||
})
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
window.location.reload();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -10,14 +10,15 @@ declare( strict_types = 1 );
|
|||
namespace WooCommerce\PayPalCommerce\Settings;
|
||||
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
|
||||
use WooCommerce\PayPalCommerce\Settings\Data\CommonSettings;
|
||||
use WooCommerce\PayPalCommerce\Settings\Data\OnboardingProfile;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\CommonRestEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\ConnectManualRestEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\LoginLinkRestEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\OnboardingRestEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\SwitchSettingsUiEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Service\ConnectionUrlGenerator;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\LoginLinkRestEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Data\CommonSettings;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\CommonRestEndpoint;
|
||||
|
||||
return array(
|
||||
'settings.url' => static function ( ContainerInterface $container ) : string {
|
||||
|
@ -154,4 +155,10 @@ return array(
|
|||
|
||||
return $generators;
|
||||
},
|
||||
'settings.switch-ui.endpoint' => static function ( ContainerInterface $container ) : SwitchSettingsUiEndpoint {
|
||||
return new SwitchSettingsUiEndpoint(
|
||||
$container->get( 'woocommerce.logger.woocommerce' ),
|
||||
$container->get( 'button.request-data' ),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/**
|
||||
* The settings UI switching Endpoint.
|
||||
*
|
||||
* @package WooCommerce\PayPalCommerce\Settings\Endpoint
|
||||
*/
|
||||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace WooCommerce\PayPalCommerce\Settings\Endpoint;
|
||||
|
||||
use Exception;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData;
|
||||
|
||||
/**
|
||||
* Class SwitchSettingsUiEndpoint
|
||||
*/
|
||||
class SwitchSettingsUiEndpoint {
|
||||
|
||||
public const ENDPOINT = 'ppcp-settings-switch-ui';
|
||||
public const OPTION_NAME_SHOULD_USE_OLD_UI = 'woocommerce_ppcp-settings-should-use-old-ui';
|
||||
|
||||
/**
|
||||
* The RequestData.
|
||||
*
|
||||
* @var RequestData
|
||||
*/
|
||||
protected RequestData $request_data;
|
||||
|
||||
/**
|
||||
* The logger.
|
||||
*
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
protected LoggerInterface $logger;
|
||||
|
||||
/**
|
||||
* SwitchSettingsUiEndpoint constructor.
|
||||
*
|
||||
* @param LoggerInterface $logger The logger.
|
||||
* @param RequestData $request_data The Request data.
|
||||
*/
|
||||
public function __construct(
|
||||
LoggerInterface $logger,
|
||||
RequestData $request_data
|
||||
) {
|
||||
$this->logger = $logger;
|
||||
$this->request_data = $request_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the request.
|
||||
*/
|
||||
public function handle_request(): void {
|
||||
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
||||
wp_send_json_error( 'Not an admin.', 403 );
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->request_data->read_request( $this->nonce() );
|
||||
update_option( self::OPTION_NAME_SHOULD_USE_OLD_UI, false );
|
||||
|
||||
wp_send_json_success();
|
||||
} catch ( Exception $error ) {
|
||||
wp_send_json_error( array( 'message' => $error->getMessage() ), 500 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The nonce.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function nonce(): string {
|
||||
return self::ENDPOINT;
|
||||
}
|
||||
}
|
|
@ -9,11 +9,12 @@ declare( strict_types = 1 );
|
|||
|
||||
namespace WooCommerce\PayPalCommerce\Settings;
|
||||
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\RestEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\SwitchSettingsUiEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExecutableModule;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ModuleClassNameIdTrait;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ServiceModule;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\RestEndpoint;
|
||||
|
||||
/**
|
||||
* Class SettingsModule
|
||||
|
@ -21,6 +22,16 @@ use WooCommerce\PayPalCommerce\Settings\Endpoint\RestEndpoint;
|
|||
class SettingsModule implements ServiceModule, ExecutableModule {
|
||||
use ModuleClassNameIdTrait;
|
||||
|
||||
/**
|
||||
* Returns whether the old settings UI should be loaded.
|
||||
*/
|
||||
public static function should_use_the_old_ui() : bool {
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_should_use_the_old_ui',
|
||||
(bool) get_option( SwitchSettingsUiEndpoint::OPTION_NAME_SHOULD_USE_OLD_UI ) === true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -32,6 +43,59 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
public function run( ContainerInterface $container ) : bool {
|
||||
if ( self::should_use_the_old_ui() ) {
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_inside_settings_page_header',
|
||||
static fn() : string => sprintf(
|
||||
'<a href="#" class="button button-settings-switch-ui">%s</a>',
|
||||
esc_html__( 'Switch to new settings UI', 'woocommerce-paypal-payments' )
|
||||
)
|
||||
);
|
||||
|
||||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
static function () use ( $container ) {
|
||||
$module_url = $container->get( 'settings.url' );
|
||||
|
||||
/**
|
||||
* Require resolves.
|
||||
*
|
||||
* @psalm-suppress UnresolvableInclude
|
||||
*/
|
||||
$script_asset_file = require dirname( realpath( __FILE__ ) ?: '', 2 ) . '/assets/switchSettingsUi.asset.php';
|
||||
|
||||
wp_register_script(
|
||||
'ppcp-switch-settings-ui',
|
||||
untrailingslashit( $module_url ) . '/assets/switchSettingsUi.js',
|
||||
$script_asset_file['dependencies'],
|
||||
$script_asset_file['version'],
|
||||
true
|
||||
);
|
||||
|
||||
wp_localize_script(
|
||||
'ppcp-switch-settings-ui',
|
||||
'ppcpSwitchSettingsUi',
|
||||
array(
|
||||
'endpoint' => \WC_AJAX::get_endpoint( SwitchSettingsUiEndpoint::ENDPOINT ),
|
||||
'nonce' => wp_create_nonce( SwitchSettingsUiEndpoint::nonce() ),
|
||||
)
|
||||
);
|
||||
|
||||
wp_enqueue_script( 'ppcp-switch-settings-ui' );
|
||||
}
|
||||
);
|
||||
|
||||
$endpoint = $container->get( 'settings.switch-ui.endpoint' );
|
||||
assert( $endpoint instanceof SwitchSettingsUiEndpoint );
|
||||
|
||||
add_action( 'wc_ajax_' . SwitchSettingsUiEndpoint::ENDPOINT, array(
|
||||
$endpoint,
|
||||
'handle_request',
|
||||
) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@ module.exports = {
|
|||
...{
|
||||
entry: {
|
||||
index: path.resolve( process.cwd(), 'resources/js', 'index.js' ),
|
||||
switchSettingsUi: path.resolve( process.cwd(), 'resources/js', 'switchSettingsUi.js' ),
|
||||
style: path.resolve( process.cwd(), 'resources/css', 'style.scss' ),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ declare(strict_types=1);
|
|||
namespace WooCommerce\PayPalCommerce\Uninstall;
|
||||
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Repository\PayPalRequestIdRepository;
|
||||
use WooCommerce\PayPalCommerce\Settings\Endpoint\SwitchSettingsUiEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Uninstall\Assets\ClearDatabaseAssets;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway;
|
||||
|
@ -34,6 +35,7 @@ return array(
|
|||
WebhookSimulation::OPTION_ID,
|
||||
WebhookRegistrar::KEY,
|
||||
'ppcp_payment_tokens_migration_initialized',
|
||||
SwitchSettingsUiEndpoint::OPTION_NAME_SHOULD_USE_OLD_UI,
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -166,6 +166,10 @@ class VaultingModule implements ServiceModule, ExtendingModule, ExecutableModule
|
|||
add_action(
|
||||
'wp',
|
||||
function() use ( $container ) {
|
||||
if ( $container->get( 'vaulting.vault-v3-enabled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
global $wp;
|
||||
|
||||
if ( isset( $wp->query_vars['delete-payment-method'] ) ) {
|
||||
|
|
|
@ -24,6 +24,7 @@ use WooCommerce\PayPalCommerce\Googlepay\GooglePayGateway;
|
|||
use WooCommerce\PayPalCommerce\Onboarding\Environment;
|
||||
use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingOptionsRenderer;
|
||||
use WooCommerce\PayPalCommerce\Onboarding\State;
|
||||
use WooCommerce\PayPalCommerce\Settings\SettingsModule;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Admin\RenderReauthorizeAction;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Assets\VoidButtonAssets;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Endpoint\CaptureCardPayment;
|
||||
|
@ -2067,6 +2068,6 @@ return array(
|
|||
},
|
||||
|
||||
'wcgateway.settings.admin-settings-enabled' => static function( ContainerInterface $container ): bool {
|
||||
return $container->has( 'settings.url' );
|
||||
return $container->has( 'settings.url' ) && ! SettingsModule::should_use_the_old_ui();
|
||||
},
|
||||
);
|
||||
|
|
|
@ -76,6 +76,7 @@ class HeaderRenderer {
|
|||
. __( 'Submit a bug', 'woocommerce-paypal-payments' ) .
|
||||
'</a>
|
||||
</span>
|
||||
' . apply_filters( 'woocommerce_paypal_payments_inside_settings_page_header', '' ) . '
|
||||
</div>
|
||||
|
||||
<div class="ppcp-notice-wrapper"></div>
|
||||
|
|