Skip to content

Commit

Permalink
qa followups round 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sapayth committed Aug 12, 2024
1 parent e3d990e commit 8c001c8
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin/subscriptions.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const logoUrl = wpufSubscriptions.assetUrl + '/images/wpuf-icon-circle.svg';
<div class="wpuf-flex wpuf-justify-start wpuf-items-center">
<img :src="logoUrl" alt="WPUF Icon" class="wpuf-w-12 wpuf-mr-4">
<h2>{{ __( 'WP User Frontend', 'wp-user-frontend' ) }}</h2>
<span class="wpuf-ml-2 wpuf-inline-flex wpuf-items-center wpuf-rounded-full wpuf-bg-green-100 wpuf-px-2 wpuf-py-1 wpuf-text-xs wpuf-font-medium wpuf-text-green-700 wpuf-ring-1 wpuf-ring-inset wpuf-ring-green-600/20">V{{ wpufSubscriptions.version }}</span>
<span class="wpuf-ml-2 wpuf-inline-flex wpuf-items-center wpuf-rounded-full wpuf-bg-green-100 wpuf-px-2 wpuf-py-1 wpuf-text-xs wpuf-font-medium wpuf-text-green-700 wpuf-ring-1 wpuf-ring-inset wpuf-ring-green-600/20">v{{ wpufSubscriptions.version }}</span>
<a
v-if="!wpufSubscriptions.isProActive"
:href="wpufSubscriptions.upgradeUrl"
Expand Down
3 changes: 2 additions & 1 deletion assets/js/components/subscriptions/InfoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const getBillingAmountText = computed(() => {
if (parseFloat( currentSubscription.meta_value.billing_amount ) === 0) {
return __( 'Free', 'wp-user-frontend' );
} else {
if ( isRecurring ) {
if ( isRecurring.value ) {
const cyclePeriod = currentSubscription.meta_value.cycle_period === '' ? __( 'day', 'wp-user-frontend' ) : currentSubscription.meta_value.cycle_period;
const expireAfter = currentSubscription.meta_value._billing_cycle_number !== '0' ? ' ' + currentSubscription.meta_value._billing_cycle_number + ' ' : '';
return wpufSubscriptions.currencySymbol + currentSubscription.meta_value.billing_amount + ' <span class="wpuf-text-sm wpuf-text-gray-500">per ' + expireAfter + ' ' + cyclePeriod + '(s)</span>';
}
Expand Down
4 changes: 3 additions & 1 deletion assets/js/components/subscriptions/New.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const updateSubscription = () => {
</script>
<template>
<div class="wpuf-px-12">
<div
:class="subscriptionStore.isUnsavedPopupOpen ? 'wpuf-blur' : ''"
class="wpuf-px-12">
<h3 class="wpuf-text-lg wpuf-font-bold wpuf-mb-0">{{ __( 'New Subscription', 'wp-user-frontend' ) }}</h3>
<SubscriptionsDetails />
<div class="wpuf-flex wpuf-flex-row-reverse wpuf-mt-8 wpuf-text-end">
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/subscriptions/Popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const info = computed( () => {
default:
return {
title: __( 'Trash Subscription', 'wp-user-frontend' ),
message: __( 'This subscription will moved to trash. Are you sure?', 'wp-user-frontend' ),
message: __( 'This subscription will be moved to the trash. Are you sure?', 'wp-user-frontend' ),
actionText: __( 'Trash', 'wp-user-frontend' ),
}
}
Expand Down
8 changes: 4 additions & 4 deletions assets/js/components/subscriptions/QuickEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ const updateSubscription = () => {
--dp-primary-disabled-color: none;
--dp-primary-text-color: none;
--dp-secondary-color: none;
--dp-border-color: none;
--dp-menu-border-color: none;
--dp-border-color-hover: none;
--dp-border-color: #8c8f94;
--dp-menu-border-color: #8c8f94;
--dp-border-color-hover: #8c8f94;
--dp-disabled-color: none;
--dp-scroll-bar-background: none;
--dp-scroll-bar-color: none;
Expand All @@ -102,7 +102,7 @@ const updateSubscription = () => {
--dp-highlight-color: none;
--dp-range-between-dates-background-color: none;
--dp-range-between-dates-text-color: none;
--dp-range-between-border-color: none;
--dp-range-between-border-color: #8c8f94;
}
.dp__input_valid {
box-shadow: none;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/subscriptions/SectionInnerField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const showField = computed(() => {
{{ parentField.label }}
<div
v-if="parentField.tooltip"
class="wpuf-tooltip wpuf-cursor-pointer wpuf-ml-2 wpuf-z-[9999]"
class="wpuf-tooltip wpuf-cursor-pointer wpuf-ml-2 wpuf-z-10"
:data-tip="parentField.tooltip">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none">
<path d="M9.833 12.333H9V9h-.833M9 5.667h.008M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 1 1 15 0z"
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/subscriptions/SectionInputField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ onMounted(() => {
{{ field.label }}
<span
v-if="field.tooltip"
class="wpuf-tooltip wpuf-cursor-pointer wpuf-ml-2 wpuf-z-[9999]"
class="wpuf-tooltip wpuf-cursor-pointer wpuf-ml-2 wpuf-z-10"
:data-tip="field.tooltip">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none">
<path d="M9.833 12.333H9V9h-.833M9 5.667h.008M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 1 1 15 0z"
Expand Down
2 changes: 1 addition & 1 deletion assets/js/stores/subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const useSubscriptionStore = defineStore( 'subscription', {
return fetch( requestUrl, requestOptions )
.then( ( response ) => response.json() )
.catch( ( error ) => {
console.log( error );
this.setError('fetch', 'An error occurred while updating the subscription.');
} ).finally( () => {
this.isUpdating = false;
} );
Expand Down
2 changes: 1 addition & 1 deletion assets/js/subscriptions.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions includes/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ public function enqueue_scripts() {
'validation' => __( 'is not valid', 'wp-user-frontend' ),
]
);

wp_localize_script(
'wpuf-subscriptions', 'wpuf_subscription', apply_filters(
'wpuf_subscription_js_data', [
'pack_notice' => __( 'Please Cancel Your Currently Active Pack first!', 'wp-user-frontend' ),
]
)
);
}
}

Expand Down
12 changes: 10 additions & 2 deletions languages/wp-user-frontend.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WP User Frontend 4.0.10\n"
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
"POT-Creation-Date: 2024-08-08 09:32:14+00:00\n"
"POT-Creation-Date: 2024-08-12 16:06:24+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -4721,7 +4721,11 @@ msgid "Learn more about Coupons"
msgstr ""

#: includes/Free/Free_Loader.php:1440
msgid "Taxonomy Restriction"
msgid "Taxonomy Access"
msgstr ""

#: includes/Free/Free_Loader.php:1441
msgid "(Control user access to specific taxonomies)"
msgstr ""

#: includes/Free/Simple_Login.php:316 includes/Widgets/Login_Widget.php:295
Expand Down Expand Up @@ -5371,6 +5375,10 @@ msgstr ""
msgid "is not valid"
msgstr ""

#: includes/Frontend.php:154
msgid "Please Cancel Your Currently Active Pack first!"
msgstr ""

#: includes/Frontend_Render_Form.php:300
#: includes/class-frontend-render-form.php:910
#: templates/dashboard/posts.php:120
Expand Down

0 comments on commit 8c001c8

Please sign in to comment.