Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into enhance/translat…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
sapayth committed Sep 13, 2024
2 parents 88e7529 + c2ef2ab commit ae4ddcc
Show file tree
Hide file tree
Showing 76 changed files with 47,028 additions and 5,094 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ npm-debug.log
vendor
!assets/vendor
phpcs-report.txt
assets/css/admin/subscriptions.min.css
assets/js/subscriptions.min.js
23 changes: 22 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function(grunt) {
makepot: {
target: {
options: {
exclude: ['build/.*', 'node_modules/*', 'assets/*'],
exclude: ['build/.*', 'node_modules/*'],
mainFile: 'wpuf.php',
domainPath: '/languages/',
potFilename: 'wp-user-frontend.pot',
Expand Down Expand Up @@ -100,6 +100,18 @@ module.exports = function(grunt) {
'jshint:formBuilder', 'less:admin',
'concat:formBuilder', 'concat:templates', 'less:front'
]
},

vue: {
files: [
'assets/js/subscriptions.js',
'assets/css/admin/subscriptions.css',
'assets/js/components/**/*.vue',
'assets/js/stores/**/*.js',
],
tasks: [
'shell:npm_build'
]
}
},

Expand Down Expand Up @@ -133,6 +145,7 @@ module.exports = function(grunt) {
'!config.codekit',
'!**/nbproject/**',
'!assets/less/**',
'!assets/tailwind/**',
'!tests/**',
'!**/Gruntfile.js',
'!**/package.json',
Expand Down Expand Up @@ -203,6 +216,13 @@ module.exports = function(grunt) {
}
}
},

// is to run NPM commands through Grunt
shell: {
npm_build: {
command: 'npm run build',
}
}
});

// Load NPM tasks to be used here
Expand All @@ -217,6 +237,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks( 'grunt-contrib-compress' );
grunt.loadNpmTasks( 'grunt-notify' );
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.loadNpmTasks( 'grunt-shell' );

grunt.registerTask( 'default', [ 'less', 'concat', 'uglify', 'i18n' ] );

Expand Down
4 changes: 2 additions & 2 deletions admin/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static function common_text( $id, $values = [] ) {

<div class="wpuf-form-sub-fields">
<label>
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Numebr of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Number of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
</label>
</div>
</div> <!-- .wpuf-form-rows -->
Expand Down Expand Up @@ -196,7 +196,7 @@ public static function common_textarea( $id, $values = [] ) {

<div class="wpuf-form-sub-fields">
<label>
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Numebr of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Number of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
</label>
</div>
</div> <!-- .wpuf-form-rows -->
Expand Down
6 changes: 3 additions & 3 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ img.user-listing.active {
.wpuf-pro-field-tooltip {
background: #000;
width: max-content;
padding: 25px 50px 20px 20px;
padding: 25px 35px 30px 20px;
border-radius: 5px;
color: #fff;
position: absolute;
Expand All @@ -769,6 +769,7 @@ img.user-listing.active {
}
h3.tooltip-header {
color: #fff;
font-size: 1.3rem;
}
.wpuf-subscription-pack-settings nav ul .wpuf-pro-field-tooltip ul li span.tooltip-check svg path,
.wpuf-pro-field-tooltip ul li span.tooltip-check svg path {
Expand All @@ -780,8 +781,7 @@ h3.tooltip-header {
}
.wpuf-subscription-pack-settings nav ul .wpuf-pro-field-tooltip ul li,
.wpuf-pro-field-tooltip ul li {
font-size: 1.2em;
line-height: 1.5em;
line-height: 1.5rem;
font-weight: 400;
margin-bottom: 6px;
}
Expand Down
13 changes: 13 additions & 0 deletions assets/css/admin/subscriptions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.wpuf-inline-input .wpuf-p-4 {
padding: 0;
}
.wpuf-inline-input > *:first-child {
margin-right: 1rem;
}
body.user-frontend_page_wpuf_subscription {
background: #fff;
}
1 change: 1 addition & 0 deletions assets/css/admin/subscriptions.min.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions assets/images/wpuf-icon-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions assets/js/components/Header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script setup>
import { __ } from '@wordpress/i18n';
import {inject} from 'vue';
const wpufSubscriptions = inject( 'wpufSubscriptions' );
const logoUrl = wpufSubscriptions.assetUrl + '/images/wpuf-icon-circle.svg';
</script>

<template>
<div class="wpuf-w-[calc(100%+40px)] wpuf-ml-[-20px] wpuf-px-[20px] wpuf-flex wpuf-mt-4 wpuf-justify-between wpuf-items-center wpuf-border-b-2 wpuf-border-gray-100 wpuf-pb-4">
<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>
<a
v-if="!wpufSubscriptions.isProActive"
:href="wpufSubscriptions.upgradeUrl"
target="_blank"
class="wpuf-ml-4 wpuf-rounded-md wpuf-bg-amber-500 wpuf-px-3 wpuf-py-2 wpuf-text-sm font-semibold wpuf-text-white wpuf-shadow-sm hover:wpuf-bg-amber-600 hover:wpuf-text-white hover:wpuf-shadow-none active:wpuf-shadow-none focus:wpuf-bg-amber-600 focus:wpuf-text-white">
{{ __( 'Upgrade', 'wp-user-frontend' ) }}
&nbsp;
<span class="dashicons dashicons-superhero-alt"></span>
</a>
</div>
<div class="wpuf-flex wpuf-justify-end wpuf-items-center wpuf-w-2/4">
<span
id="wpuf-headway-icon"
class="wpuf-border wpuf-border-gray-100 wpuf-mr-[16px] wpuf-rounded-full wpuf-p-1 wpuf-shadow-sm hover:wpuf-bg-slate-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"
></span>
<a
class="wpuf-border wpuf-border-gray-100 wpuf-mr-[16px] wpuf-canny-link wpuf-text-center wpuf-rounded-md wpuf-px-3 wpuf-py-2 wpuf-text-sm wpuf-font-semibold wpuf-shadow-sm hover:wpuf-bg-slate-100 focus:wpuf-bg-slate-100"
target="_blank"
href="https://wpuf.canny.io/ideas">💡 {{ __( 'Submit Ideas', 'wp-user-frontend' ) }}</a>
<a
:href="wpufSubscriptions.supportUrl"
target="_blank"
class="wpuf-rounded-md wpuf-text-center wpuf-bg-indigo-600 wpuf-px-3 wpuf-py-2 wpuf-text-sm wpuf-font-semibold wpuf-text-white wpuf-shadow-sm hover:wpuf-bg-indigo-500 hover:wpuf-text-white focus:wpuf-bg-indigo-500 focus:wpuf-text-white">
{{ __( 'Support ', 'wp-user-frontend' ) }}
&nbsp;&nbsp;
<span class="dashicons dashicons-businessman"></span>
</a>
</div>
</div>

</template>
8 changes: 8 additions & 0 deletions assets/js/components/ProBadge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script setup></script>

<template>
<svg
width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.2131 4.11564C19.2161 4.16916 19.2121 4.22364 19.1983 4.27775L17.9646 10.5323C17.9024 10.7741 17.6796 10.9441 17.4235 10.9455L10.0216 10.9818H10.0188H2.61682C2.35933 10.9818 2.13495 10.8112 2.07275 10.5681L0.839103 4.29542C0.824897 4.23985 0.820785 4.18385 0.824374 4.12895C0.34714 3.98269 0 3.54829 0 3.03636C0 2.40473 0.528224 1.89091 1.17757 1.89091C1.82692 1.89091 2.35514 2.40473 2.35514 3.03636C2.35514 3.39207 2.18759 3.71033 1.92523 3.92058L3.46976 5.43433C3.86011 5.81695 4.40179 6.03629 4.95596 6.03629C5.61122 6.03629 6.23596 5.7336 6.62938 5.22647L9.1677 1.95491C8.95447 1.74764 8.82243 1.46124 8.82243 1.14545C8.82243 0.513818 9.35065 0 10 0C10.6493 0 11.1776 0.513818 11.1776 1.14545C11.1776 1.45178 11.0526 1.72982 10.8505 1.93556L10.8526 1.93811L13.3726 5.21869C13.7658 5.73069 14.3928 6.03636 15.0499 6.03636C15.6092 6.03636 16.1351 5.82451 16.5305 5.43978L18.0848 3.92793C17.8169 3.71775 17.6449 3.39644 17.6449 3.03636C17.6449 2.40473 18.1731 1.89091 18.8224 1.89091C19.4718 1.89091 20 2.40473 20 3.03636C20 3.53462 19.6707 3.9584 19.2131 4.11564ZM17.8443 12.6909C17.8443 12.3897 17.5932 12.1455 17.2835 12.1455H2.77884C2.46916 12.1455 2.21809 12.3897 2.21809 12.6909V14C2.21809 14.3012 2.46916 14.5455 2.77884 14.5455H17.2835C17.5932 14.5455 17.8443 14.3012 17.8443 14V12.6909Z" fill="#FB9A28"/>
</svg>
</template>
54 changes: 54 additions & 0 deletions assets/js/components/ProTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<script setup></script>

<template>
<div class="wpuf-pro-field-tooltip" style="left: 50%; top: -0.5em;">
<h3 class="tooltip-header">Available in Pro. Also enjoy:</h3>
<ul>
<li class="wpuf-flex wpuf-items-center"><span class="tooltip-check"><svg width="10" height="8" viewBox="0 0 10 8" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.92671 1.13426C8.59667 0.804188 8.06162 0.804234 7.73159 1.13423L3.37421 5.49165L1.89718 4.01462C1.56712 3.68454 1.03208 3.68467 0.702082 4.0146C0.372021 4.34463 0.372046 4.8797 0.702068 5.20972L2.77666 7.28428C3.10675 7.61442 3.64199 7.61406 3.97177 7.28428L8.92668 2.32937C9.25676 1.99933 9.25668 1.46426 8.92671 1.13426ZM0.992017 4.85283C1.00166 4.86513 1.01215 4.87698 1.02348 4.88831L3.09807 6.96287C3.25053 7.11537 3.49796 7.11527 3.65036 6.96287L8.60528 2.00795C8.74649 1.86675 8.75695 1.64433 8.6367 1.49107C8.7569 1.64433 8.74643 1.86671 8.60524 2.00789L3.65032 6.96281C3.49792 7.11521 3.25048 7.11532 3.09803 6.96281L1.02343 4.88825C1.01212 4.87694 1.00165 4.86511 0.992017 4.85283Z"
fill="white"></path>
</svg>
</span> 24/7 Priority Support</li>
<li class="wpuf-flex wpuf-items-center"><span class="tooltip-check"><svg width="10" height="8" viewBox="0 0 10 8" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.92671 1.13426C8.59667 0.804188 8.06162 0.804234 7.73159 1.13423L3.37421 5.49165L1.89718 4.01462C1.56712 3.68454 1.03208 3.68467 0.702082 4.0146C0.372021 4.34463 0.372046 4.8797 0.702068 5.20972L2.77666 7.28428C3.10675 7.61442 3.64199 7.61406 3.97177 7.28428L8.92668 2.32937C9.25676 1.99933 9.25668 1.46426 8.92671 1.13426ZM0.992017 4.85283C1.00166 4.86513 1.01215 4.87698 1.02348 4.88831L3.09807 6.96287C3.25053 7.11537 3.49796 7.11527 3.65036 6.96287L8.60528 2.00795C8.74649 1.86675 8.75695 1.64433 8.6367 1.49107C8.7569 1.64433 8.74643 1.86671 8.60524 2.00789L3.65032 6.96281C3.49792 7.11521 3.25048 7.11532 3.09803 6.96281L1.02343 4.88825C1.01212 4.87694 1.00165 4.86511 0.992017 4.85283Z"
fill="white"></path>
</svg>
</span> 20+ Premium Modules</li>
<li class="wpuf-flex wpuf-items-center"><span class="tooltip-check"><svg width="10" height="8" viewBox="0 0 10 8" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.92671 1.13426C8.59667 0.804188 8.06162 0.804234 7.73159 1.13423L3.37421 5.49165L1.89718 4.01462C1.56712 3.68454 1.03208 3.68467 0.702082 4.0146C0.372021 4.34463 0.372046 4.8797 0.702068 5.20972L2.77666 7.28428C3.10675 7.61442 3.64199 7.61406 3.97177 7.28428L8.92668 2.32937C9.25676 1.99933 9.25668 1.46426 8.92671 1.13426ZM0.992017 4.85283C1.00166 4.86513 1.01215 4.87698 1.02348 4.88831L3.09807 6.96287C3.25053 7.11537 3.49796 7.11527 3.65036 6.96287L8.60528 2.00795C8.74649 1.86675 8.75695 1.64433 8.6367 1.49107C8.7569 1.64433 8.74643 1.86671 8.60524 2.00789L3.65032 6.96281C3.49792 7.11521 3.25048 7.11532 3.09803 6.96281L1.02343 4.88825C1.01212 4.87694 1.00165 4.86511 0.992017 4.85283Z"
fill="white"></path>
</svg>
</span> User Activity and Reports</li>
<li class="wpuf-flex wpuf-items-center"><span class="tooltip-check"><svg width="10" height="8" viewBox="0 0 10 8" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.92671 1.13426C8.59667 0.804188 8.06162 0.804234 7.73159 1.13423L3.37421 5.49165L1.89718 4.01462C1.56712 3.68454 1.03208 3.68467 0.702082 4.0146C0.372021 4.34463 0.372046 4.8797 0.702068 5.20972L2.77666 7.28428C3.10675 7.61442 3.64199 7.61406 3.97177 7.28428L8.92668 2.32937C9.25676 1.99933 9.25668 1.46426 8.92671 1.13426ZM0.992017 4.85283C1.00166 4.86513 1.01215 4.87698 1.02348 4.88831L3.09807 6.96287C3.25053 7.11537 3.49796 7.11527 3.65036 6.96287L8.60528 2.00795C8.74649 1.86675 8.75695 1.64433 8.6367 1.49107C8.7569 1.64433 8.74643 1.86671 8.60524 2.00789L3.65032 6.96281C3.49792 7.11521 3.25048 7.11532 3.09803 6.96281L1.02343 4.88825C1.01212 4.87694 1.00165 4.86511 0.992017 4.85283Z"
fill="white"></path>
</svg>
</span> Private Messaging Option</li>
<li class="wpuf-flex wpuf-items-center"><span class="tooltip-check"><svg width="10" height="8" viewBox="0 0 10 8" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.92671 1.13426C8.59667 0.804188 8.06162 0.804234 7.73159 1.13423L3.37421 5.49165L1.89718 4.01462C1.56712 3.68454 1.03208 3.68467 0.702082 4.0146C0.372021 4.34463 0.372046 4.8797 0.702068 5.20972L2.77666 7.28428C3.10675 7.61442 3.64199 7.61406 3.97177 7.28428L8.92668 2.32937C9.25676 1.99933 9.25668 1.46426 8.92671 1.13426ZM0.992017 4.85283C1.00166 4.86513 1.01215 4.87698 1.02348 4.88831L3.09807 6.96287C3.25053 7.11537 3.49796 7.11527 3.65036 6.96287L8.60528 2.00795C8.74649 1.86675 8.75695 1.64433 8.6367 1.49107C8.7569 1.64433 8.74643 1.86671 8.60524 2.00789L3.65032 6.96281C3.49792 7.11521 3.25048 7.11532 3.09803 6.96281L1.02343 4.88825C1.01212 4.87694 1.00165 4.86511 0.992017 4.85283Z"
fill="white"></path>
</svg>
</span> License for 20 websites</li>
</ul>
<div class="pro-link"><a
href="https://wedevs.com/wp-user-frontend-pro/pricing/?utm_source=wpdashboard&amp;utm_medium=popup"
target="_blank" class="wpuf-button button-upgrade-to-pro wpuf-flex wpuf-items-center wpuf-w-[calc(100%-2rem)] wpuf-justify-around">Upgrade to PRO<span
class="pro-icon icon-white"> <svg width="20" height="15" viewBox="0 0 20 15" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M19.2131 4.11564C19.2161 4.16916 19.2121 4.22364 19.1983 4.27775L17.9646 10.5323C17.9024 10.7741 17.6796 10.9441 17.4235 10.9455L10.0216 10.9818H10.0188H2.61682C2.35933 10.9818 2.13495 10.8112 2.07275 10.5681L0.839103 4.29542C0.824897 4.23985 0.820785 4.18385 0.824374 4.12895C0.34714 3.98269 0 3.54829 0 3.03636C0 2.40473 0.528224 1.89091 1.17757 1.89091C1.82692 1.89091 2.35514 2.40473 2.35514 3.03636C2.35514 3.39207 2.18759 3.71033 1.92523 3.92058L3.46976 5.43433C3.86011 5.81695 4.40179 6.03629 4.95596 6.03629C5.61122 6.03629 6.23596 5.7336 6.62938 5.22647L9.1677 1.95491C8.95447 1.74764 8.82243 1.46124 8.82243 1.14545C8.82243 0.513818 9.35065 0 10 0C10.6493 0 11.1776 0.513818 11.1776 1.14545C11.1776 1.45178 11.0526 1.72982 10.8505 1.93556L10.8526 1.93811L13.3726 5.21869C13.7658 5.73069 14.3928 6.03636 15.0499 6.03636C15.6092 6.03636 16.1351 5.82451 16.5305 5.43978L18.0848 3.92793C17.8169 3.71775 17.6449 3.39644 17.6449 3.03636C17.6449 2.40473 18.1731 1.89091 18.8224 1.89091C19.4718 1.89091 20 2.40473 20 3.03636C20 3.53462 19.6707 3.9584 19.2131 4.11564ZM17.8443 12.6909C17.8443 12.3897 17.5932 12.1455 17.2835 12.1455H2.77884C2.46916 12.1455 2.21809 12.3897 2.21809 12.6909V14C2.21809 14.3012 2.46916 14.5455 2.77884 14.5455H17.2835C17.5932 14.5455 17.8443 14.3012 17.8443 14V12.6909Z"
fill="#FB9A28"></path>
</svg>
</span></a></div><i style="left: 50%; top: 100%; transform: initial;"></i>
</div>
</template>
Loading

0 comments on commit ae4ddcc

Please sign in to comment.