Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace flaticons with font awesome icons. #1963

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed assets/font/flaticon/Flaticon.eot
Binary file not shown.
176 changes: 0 additions & 176 deletions assets/font/flaticon/Flaticon.svg

This file was deleted.

Binary file removed assets/font/flaticon/Flaticon.ttf
Binary file not shown.
Binary file removed assets/font/flaticon/Flaticon.woff
Binary file not shown.
44 changes: 0 additions & 44 deletions assets/font/flaticon/flaticon.css

This file was deleted.

51 changes: 49 additions & 2 deletions assets/src/js/helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;(function(document, window) {
;(function(document, window, $) {

/**
* Gets i18n date format
Expand Down Expand Up @@ -379,4 +379,51 @@
evt.preventDefault();
}
}
})(document, window);

let copyIcon = `<svg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path d='M8 4V16C8 17.1046 8.89543 18 10 18L18 18C19.1046 18 20 17.1046 20 16V7.24162C20 6.7034 19.7831 6.18789 19.3982 5.81161L16.0829 2.56999C15.7092 2.2046 15.2074 2 14.6847 2H10C8.89543 2 8 2.89543 8 4Z' stroke='#000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/>
<path d='M16 18V20C16 21.1046 15.1046 22 14 22H6C4.89543 22 4 21.1046 4 20V9C4 7.89543 4.89543 7 6 7H8' stroke='#000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/>
</svg>`;
let tickIcon = `<svg width="20px" height="20px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.89163 13.2687L9.16582 17.5427L18.7085 8" stroke="#000000" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`;
let copyHolder = null;

let Functions = {
init() {
this.copyToClipBoardInit();
$('.dokan-copy-to-clipboard').on( 'click', this.copyToClipboardClickhandler );
},

copyToClipBoardInit() {
copyHolder = $('.dokan-copy-to-clipboard');
copyHolder.css( 'cursor', 'pointer' );
copyHolder.html( copyIcon )
},

copyToClipboardClickhandler() {
let copyItem = $(this);
let copydata = $(this).data('copy') ? $(this).data('copy') : '';

const textarea = document.createElement('textarea');
textarea.classList.add("dokan-copy-to-clipboard-textarea");
document.body.appendChild(textarea);
textarea.value = copydata;
textarea.select();
textarea.setSelectionRange(0, 99999);
let copiedSuccessfully = document.execCommand('copy');
document.body.removeChild(textarea);

if (copiedSuccessfully) {
copyItem.html( tickIcon )
setTimeout(() => {
copyItem.html( copyIcon )
}, 1000);
}
}
};

$( document ).ready( function() {
Functions.init();
});
})(document, window, jQuery);
6 changes: 1 addition & 5 deletions includes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,17 +315,13 @@ public function get_styles() {
'deps' => [ 'dokan-vue-vendor' ],
'version' => filemtime( DOKAN_DIR . '/assets/css/vue-bootstrap.css' ),
],
'dokan-flaticon' => [
'src' => DOKAN_PLUGIN_ASSEST . '/font/flaticon/flaticon.css',
'version' => filemtime( DOKAN_DIR . '/assets/font/flaticon/flaticon.css' ),
],
'dokan-sf-pro-text' => [
'src' => DOKAN_PLUGIN_ASSEST . '/font/sf-pro-text/sf-pro-text.css',
'version' => filemtime( DOKAN_DIR . '/assets/font/sf-pro-text/sf-pro-text.css' ),
],
'dokan-vue-admin' => [
'src' => DOKAN_PLUGIN_ASSEST . '/css/vue-admin.css',
'deps' => [ 'dokan-vue-vendor', 'dokan-vue-bootstrap', 'dokan-flaticon' ],
'deps' => [ 'dokan-vue-vendor', 'dokan-vue-bootstrap' ],
'version' => filemtime( DOKAN_DIR . '/assets/css/vue-admin.css' ),
],
'dokan-vue-frontend' => [
Expand Down
3 changes: 3 additions & 0 deletions includes/REST/StoreSettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public function get_settings( $request ) {
$vendor = $this->get_vendor();
$response = dokan_get_store_info( $vendor->id );

$response['bank_payment_required_fields'] = dokan_bank_payment_required_fields();
$response['active_payment_methods'] = dokan_withdraw_get_active_methods();

return rest_ensure_response( $response );
}

Expand Down
Loading