From fd309bf1caea7676e8fc47fc8336efc78d3f4e5f Mon Sep 17 00:00:00 2001 From: osman sufy Date: Thu, 28 Nov 2024 12:17:41 +0600 Subject: [PATCH 01/12] [initialization] --- assets/src/less/admin.less | 123 ++++++++++++++++++++++++++----------- templates/admin-header.php | 48 +++++++++++++-- 2 files changed, 131 insertions(+), 40 deletions(-) diff --git a/assets/src/less/admin.less b/assets/src/less/admin.less index c4514d2783..e85adc029f 100644 --- a/assets/src/less/admin.less +++ b/assets/src/less/admin.less @@ -4,32 +4,75 @@ .dokan-admin-header { background: #fff; - padding: 15px 15px 15px 22px; - margin: 0 0 0 -20px; - box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1); - display: flex; - align-items: center; - justify-content: space-between; + padding: 16px 24px; + margin: 20px 20px 0 2px; + border-radius: 8px; + box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.06); + .dokan-admin-header-content { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + } + .dokan-admin-logo-wrap { + display: flex; .dokan-admin-header-logo { display: flex; align-items: center; img { - height: 25px; + height: 32px; width: auto; margin-right: 12px; } + } - span { - color: #F1634C; - background: #FFF4F2; - padding: 4px 12px; - font-size: 12px; + .dokan-version-tags { + display: flex; + align-items: center; + gap: 12px; + margin: 0 24px; + + .version-tag { + padding: 8px 14px; + border-radius: 16px; + font-size: 13px; + line-height: 20px; font-weight: 500; font-family: "SF Pro Text", sans-serif; - border: 1px solid rgba(241, 99, 76, 0.2); - border-radius: 93px; + + &.lite { + background: #FF9B5366; + color: #995C00; + } + + &.pro { + background: #D8D8FE; + color: @dokan-color; + } + } + } + } + .upgrade-button { + display: flex; + align-items: center; + gap: 8px; + background: #6C5CE7; + color: white; + padding: 8px 16px; + border-radius: 4px; + text-decoration: none; + font-weight: 500; + transition: background-color 0.2s; + + &:hover { + background: #5849c4; + color: white; + } + + svg { + margin-left: 4px; } } @@ -57,21 +100,6 @@ cursor: pointer; transition: all .2s ease; - .notification-count { - position: absolute; - top: -5px; - right: -5px; - width: 15px; - height: 15px; - padding: 1px; - background-color: #ff5a40; - border-radius: 53px; - color: #fff; - display: flex; - align-items: center; - justify-content: center; - } - .whats-new-pointer { position: absolute; top: 0; @@ -81,7 +109,7 @@ background-color: #ff5a40; border-radius: 53px; border: 2px solid #fff; - box-sizing: content-box; + box-sizing: content-box; } &:hover { @@ -137,10 +165,10 @@ } h3 { - margin: 0; - font-weight: bold; - font-size: 18px; - font-family: "SF Pro Text", sans-serif; + margin: 0; + font-weight: bold; + font-size: 18px; + font-family: "SF Pro Text", sans-serif; } .list-item { @@ -158,7 +186,7 @@ margin-bottom: 10px; &:last-child { - margin-bottom: 0; + margin-bottom: 0; } &.active { @@ -201,7 +229,7 @@ background-color: @dokan-light-gray; svg path { - fill:@dokan-color; + fill: @dokan-color; } } } @@ -217,6 +245,29 @@ } } +// Responsive styles +@media screen and (max-width: 782px) { + .dokan-admin-header { + margin: 10px 10px 0 2px; + padding: 12px 16px; + + .dokan-admin-header-content { + flex-direction: column; + gap: 16px; + } + + .dokan-version-tags { + margin: 12px 0; + flex-wrap: wrap; + justify-content: center; + } + + .upgrade-button { + width: 100%; + justify-content: center; + } + } +} .dokan-dashboard { .post-box-container { width: 49%; diff --git a/templates/admin-header.php b/templates/admin-header.php index fd0fcf8c86..7b4dfcee4c 100644 --- a/templates/admin-header.php +++ b/templates/admin-header.php @@ -1,9 +1,48 @@
- +
+ +
+ + + + +
+ + + Lite: + + is_pro_exists() && dokan_pro()->license->is_valid() ) { + $pro_version = DOKAN_PRO_PLUGIN_VERSION; + $license_plan = dokan_pro()->license->get_plan(); + ?> + + Pro : + + + + Upgrade + + + + + + +
+
+
From 6b5629ccd5783c9e30b5a03a2f2a47edb7ab5cdf Mon Sep 17 00:00:00 2001 From: osman sufy Date: Mon, 2 Dec 2024 12:12:04 +0600 Subject: [PATCH 02/12] [design] upgrade --- assets/src/less/admin.less | 44 +++++++++++++++++++++++--------------- templates/admin-header.php | 16 ++++++++------ 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/assets/src/less/admin.less b/assets/src/less/admin.less index e85adc029f..748e5f404f 100644 --- a/assets/src/less/admin.less +++ b/assets/src/less/admin.less @@ -17,6 +17,7 @@ } .dokan-admin-logo-wrap { display: flex; + flex: 1; .dokan-admin-header-logo { display: flex; align-items: center; @@ -32,24 +33,38 @@ display: flex; align-items: center; gap: 12px; - margin: 0 24px; - + margin-right: 24px; + flex: 1; .version-tag { - padding: 8px 14px; - border-radius: 16px; + + border-radius: 20px; font-size: 13px; line-height: 20px; - font-weight: 500; - font-family: "SF Pro Text", sans-serif; - + font-weight: 400; &.lite { + padding: 8px 16px; background: #FF9B5366; color: #995C00; } &.pro { + padding: 8px; background: #D8D8FE; color: @dokan-color; + display: flex; + align-items: center; + gap: 8px; + text-transform: capitalize; + font-weight: 400; + & .version-tag-pro-badge{ + background: @dokan-color; + color: white; + border-radius: 20px; + padding:4px 8px; + display: inline-flex; + align-items: center; + font-size: 12px; + } } } } @@ -58,21 +73,16 @@ display: flex; align-items: center; gap: 8px; - background: #6C5CE7; + background: @dokan-color; color: white; - padding: 8px 16px; - border-radius: 4px; + padding: 10px 20px; + border-radius: 6px; text-decoration: none; font-weight: 500; transition: background-color 0.2s; - + margin-left: auto; &:hover { - background: #5849c4; - color: white; - } - - svg { - margin-left: 4px; + background: @dokan-dark-purple; } } diff --git a/templates/admin-header.php b/templates/admin-header.php index 7b4dfcee4c..091e865041 100644 --- a/templates/admin-header.php +++ b/templates/admin-header.php @@ -23,9 +23,14 @@ $pro_version = DOKAN_PRO_PLUGIN_VERSION; $license_plan = dokan_pro()->license->get_plan(); ?> - - Pro : - +
+ Pro + + + + + : +
Upgrade - - - + + Date: Mon, 2 Dec 2024 12:32:04 +0600 Subject: [PATCH 03/12] [centralized] pro-award svg icon --- assets/src/less/admin.less | 15 ++++++++++++++- templates/admin-header.php | 24 ++++++++++++++++++------ templates/svg-icons/pro-award.php | 13 +++++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 templates/svg-icons/pro-award.php diff --git a/assets/src/less/admin.less b/assets/src/less/admin.less index 748e5f404f..3249356846 100644 --- a/assets/src/less/admin.less +++ b/assets/src/less/admin.less @@ -109,7 +109,20 @@ border-radius: 42px; cursor: pointer; transition: all .2s ease; - + .notification-count { + position: absolute; + top: -5px; + right: -5px; + width: 15px; + height: 15px; + padding: 1px; + background-color: #ff5a40; + border-radius: 53px; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + } .whats-new-pointer { position: absolute; top: 0; diff --git a/templates/admin-header.php b/templates/admin-header.php index 091e865041..933358c843 100644 --- a/templates/admin-header.php +++ b/templates/admin-header.php @@ -25,9 +25,15 @@ ?>
Pro - - - + 20, + 'height' => 20, + ] + ); + ?> :
@@ -38,9 +44,15 @@ ?> Upgrade - - - + 20, + 'height' => 20, + ] + ); + ?> + + + From ab4047142b0794df70d21435ac8aa22d173a572d Mon Sep 17 00:00:00 2001 From: osman sufy Date: Mon, 2 Dec 2024 12:42:52 +0600 Subject: [PATCH 04/12] [refactor] [sanitize] code --- templates/admin-header.php | 2 +- templates/svg-icons/pro-award.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/admin-header.php b/templates/admin-header.php index 933358c843..486d1fc61d 100644 --- a/templates/admin-header.php +++ b/templates/admin-header.php @@ -19,7 +19,7 @@ is_pro_exists() && dokan_pro()->license->is_valid() ) { + if ( dokan()->is_pro_exists() && dokan_pro() && dokan_pro()->license->is_valid() ) { $pro_version = DOKAN_PRO_PLUGIN_VERSION; $license_plan = dokan_pro()->license->get_plan(); ?> diff --git a/templates/svg-icons/pro-award.php b/templates/svg-icons/pro-award.php index 44ce63a0d9..ce36156476 100644 --- a/templates/svg-icons/pro-award.php +++ b/templates/svg-icons/pro-award.php @@ -5,9 +5,12 @@ * @since 3.3.0 */ +$args = $args ?? []; $width = $args['width'] ?? 20; $height = $args['height'] ?? 20; + + ?> - + From e13525088134312b6915b1eb6044728448598aba Mon Sep 17 00:00:00 2001 From: osman sufy Date: Mon, 2 Dec 2024 12:46:55 +0600 Subject: [PATCH 05/12] isset args in award icon --- templates/svg-icons/pro-award.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/svg-icons/pro-award.php b/templates/svg-icons/pro-award.php index ce36156476..4e548e0f9c 100644 --- a/templates/svg-icons/pro-award.php +++ b/templates/svg-icons/pro-award.php @@ -4,8 +4,7 @@ * * @since 3.3.0 */ - -$args = $args ?? []; +$args = isset( $args ) ? $args : []; $width = $args['width'] ?? 20; $height = $args['height'] ?? 20; From 950efc4dd266b658879118c7da93f6d2c75664d3 Mon Sep 17 00:00:00 2001 From: osman sufy Date: Mon, 2 Dec 2024 14:55:59 +0600 Subject: [PATCH 06/12] [refactor] award icon --- templates/svg-icons/pro-award.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/svg-icons/pro-award.php b/templates/svg-icons/pro-award.php index 4e548e0f9c..a725412ca9 100644 --- a/templates/svg-icons/pro-award.php +++ b/templates/svg-icons/pro-award.php @@ -10,6 +10,10 @@ ?> - - - + + + + + From 4b1483a870f9ade4200f844da2d3a9f1c3131886 Mon Sep 17 00:00:00 2001 From: osman sufy Date: Wed, 4 Dec 2024 16:46:33 +0600 Subject: [PATCH 07/12] [update] zoom icon color in VendorCapabilities.vue --- src/admin/pages/VendorCapabilities.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/admin/pages/VendorCapabilities.vue b/src/admin/pages/VendorCapabilities.vue index cc6138a4cf..101365ee6e 100644 --- a/src/admin/pages/VendorCapabilities.vue +++ b/src/admin/pages/VendorCapabilities.vue @@ -157,6 +157,7 @@ export default { +
Lite: - +