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

Enhance: dokan plugin header logo banner icon enhancement #2513

Merged
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
28 changes: 14 additions & 14 deletions assets/src/less/admin.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,37 @@
margin-right: 24px;
flex: 1;
.version-tag {

border-radius: 20px;
font-size: 1rem;
line-height: 20px;
font-weight: 400;
padding: 0.5rem 1rem;
max-height: 2rem;
font-size: 12px;
line-height: 16px;
font-weight: 500;
height: 30px;
box-sizing: border-box;
&.lite {
background: #FF9B5366;
color: #7B4E2E;
display: flex;
align-items: center;
padding: 0 12px;
}

&.pro {
background: #D8D8FE;
color: @dokan-color;
display: flex;
align-items: center;
gap: 8px;
text-transform: capitalize;
font-weight: 450;
padding: 5px 9px 5px 5px;
gap: 6px;
& .version-tag-pro-badge{
background: @dokan-color;
color: white;
border-radius: 28px;
display: inline-flex;
align-items: center;
padding: 3px 9px;
font-size: 16px;
margin: -10px 0 -10px -10px;
padding: 3px 8px;
font-size: 12px;
gap: 3px;
}
}
}
Expand Down Expand Up @@ -148,7 +148,7 @@
.dropdown {
opacity: 1;
visibility: visible;
top: 42px;
top: 50px;
}
}

Expand All @@ -162,7 +162,7 @@
padding: 20px;
border-radius: 3px;
border: 1px solid #e2e2e2;
box-shadow: 0 6px 12px rgb(129 129 129 / 6%);
box-shadow: 0 8px 10px #ccc;
min-width: 255px;
max-width: 255px;
opacity: 0;
Expand Down Expand Up @@ -199,7 +199,7 @@

.list-item {
margin-top: 13px;

list-style-type: none;
a {
display: flex;
align-items: center;
Expand Down
8 changes: 8 additions & 0 deletions assets/src/less/global-admin.less
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,11 @@
}
}
}



// wp dokan logo styles

#adminmenu #toplevel_page_dokan .wp-menu-image.svg {
background-size: 17px;
}
13 changes: 11 additions & 2 deletions includes/Admin/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,17 @@ public function add_admin_menu() {
// translators: %s: withdraw count
$withdraw_text = sprintf( __( 'Withdraw %s', 'dokan-lite' ), '<span class="awaiting-mod count-1"><span class="pending-count">' . $withdraw['pending'] . '</span></span>' );
}

$dashboard = add_menu_page( __( 'Dokan', 'dokan-lite' ), __( 'Dokan', 'dokan-lite' ), $capability, $slug, [ $this, 'dashboard' ], 'data:image/svg+xml;base64,' . base64_encode( '<svg xmlns="http://www.w3.org/2000/svg" width="52" height="62" fill="#fff"><path opacity=".5" d="M36.265 29.552c-.043 10.6-4.597 21.543-14.007 26.521C15.64 59.592 0 62.295 0 50.837V8.181C0 1.83 5.371-.273 10.742.028c7.992.429 15.64 4.163 20.281 11.029 2.965 4.377 4.597 9.656 5.113 14.977.043 1.201.129 2.36.129 3.519z"/><path d="M51.088 25.819c-.902-8.754-6.273-16.093-13.707-20.513-4.287-2.569-9.511-3.458-12.924.218-1.104 1.189-1.818 2.742-2.593 4.168L1.332 47.404c-1.89 3.478-1.46 6.352.258 8.712 2.578 3.519 7.691 5.107 11.859 5.536 3.867.429 7.777 0 11.515-.858 11.3-2.575 21.312-10.256 24.706-21.414 1.332-4.377 1.891-8.969 1.418-13.561z"/></svg>' ), $menu_position );
$menu_icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNSAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xMC41NDU4IDguNjA0NjVDMTAuNTMzMyAxMS42OTA5IDkuMjA4ODMgMTQuODc3MiA2LjQ3MjQyIDE2LjMyNjZDNC41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MzMgMTEuNjkxMiAxMC41NDU3IDguNjE3NDFDMTAuNTQ1NyA4LjI4MDA1IDEwLjUzMzMgNy45NDI2OCAxMC40OTU4IDcuNjA1MzJDMTAuMzU4MyA2LjA1NTkzIDkuODcxMDIgNC41MTkwNCA5LjAwODg2IDMuMjQ0NTVDOC41MzQwNSAyLjUzMjMzIDcuOTQ2NzggMS45NDUwNyA3LjI4NDU0IDEuNDU3NzZDNy4wNzIxMyAxLjY0NTE5IDYuODcyMjEgMS44OTUwOSA2LjcwOTc3IDIuMjA3NDdDNi43MDk3NyAyLjIxOTk2IDAuMzk5Nzg0IDEzLjgxNTMgMC4zOTk3ODQgMTMuODE1M0MtMC4wMTI1NTI1IDE0LjU2NSAtMC4wMzc1NDQ4IDE1LjIyNzMgMC4xNzQ4NzEgMTUuODAyMUMwLjE3NDg3MSAxNS44MTQ2IDAuMTg3MzY2IDE1LjgyNyAwLjE4NzM2NiAxNS44Mzk1QzAuMTk5ODYyIDE1Ljg2NDUgMC4yMTIzNTUgMTUuOTAyIDAuMjI0ODUgMTUuOTI3QzAuMjM3MzQ1IDE1Ljk1MiAwLjIzNzM0NyAxNS45NjQ1IDAuMjQ5ODQyIDE1Ljk4OTVDMC4yNDk4NDIgMTYuMDAyIDAuMjYyMzM3IDE2LjAxNDUgMC4yNjIzMzcgMTYuMDE0NUMxLjI0OTQ0IDE3LjkxMzcgNC44MjMwMiAxNy4yMTQgNi40NzIzNyAxNi4zMzkzWiIgZmlsbD0iIzlFQTNBOCIvPgogICAgPC9zdmc+';

$dashboard = add_menu_page(
__( 'Dokan', 'dokan-lite' ),
__( 'Dokan', 'dokan-lite' ),
$capability,
$slug,
[ $this, 'dashboard' ],
$menu_icon,
$menu_position
);

if ( current_user_can( $capability ) ) {
$submenu[ $slug ][] = [ __( 'Dashboard', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/' ];
Expand Down
6 changes: 3 additions & 3 deletions src/admin/pages/ChangeLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="dokan-notice">
<h2></h2>
<AdminNotice></AdminNotice>
<UpgradeBanner v-if="! hasPro"></UpgradeBanner>
<!-- <UpgradeBanner v-if="! hasPro"></UpgradeBanner>-->
</div>
<div class="change-log" :class="hasPro ? 'pro-change-log' : 'lite-change-log'" id="change-log">
<h3>{{ __( 'Dokan Changelog', 'dokan-lite' ) }}</h3>
Expand Down Expand Up @@ -98,14 +98,14 @@ let Loading = dokan_get_lib('Loading');
let AdminNotice = dokan_get_lib('AdminNotice');

import $ from 'jquery';
import UpgradeBanner from "admin/components/UpgradeBanner.vue";
// import UpgradeBanner from "admin/components/UpgradeBanner.vue";

export default {
name: 'ChangeLog',

components: {
Loading,
UpgradeBanner,
// UpgradeBanner,
AdminNotice,
},

Expand Down
6 changes: 3 additions & 3 deletions src/admin/pages/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="dokan-dashboard">
<h1>{{ __( 'Dashboard', 'dokan-lite' ) }}</h1>
<AdminNotice></AdminNotice>
<UpgradeBanner v-if="! hasPro"></UpgradeBanner>
<!-- <UpgradeBanner v-if="! hasPro"></UpgradeBanner>-->

<div class="widgets-wrapper">

Expand Down Expand Up @@ -125,7 +125,7 @@ let Currency = dokan_get_lib('Currency');
let AdminNotice = dokan_get_lib('AdminNotice');

import Chart from "admin/components/Chart.vue"
import UpgradeBanner from "admin/components/UpgradeBanner.vue"
// import UpgradeBanner from "admin/components/UpgradeBanner.vue"

export default {

Expand All @@ -136,7 +136,7 @@ export default {
Loading,
Chart,
Currency,
UpgradeBanner,
// UpgradeBanner,
AdminNotice,
},

Expand Down
6 changes: 3 additions & 3 deletions src/admin/pages/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="dokan-help-page">
<h1>{{ __( 'Help', 'dokan-lite' ) }}</h1>
<AdminNotice></AdminNotice>
<UpgradeBanner v-if="! hasPro"></UpgradeBanner>
<!-- <UpgradeBanner v-if="! hasPro"></UpgradeBanner>-->

<div class="section-wrapper" v-if="docs !== null">
<postbox v-for="(section, index) in docs" :title="section.title" :key="index">
Expand All @@ -25,7 +25,7 @@ let Postbox = dokan_get_lib('Postbox');
let Loading = dokan_get_lib('Loading');
let AdminNotice = dokan_get_lib('AdminNotice');

import UpgradeBanner from "admin/components/UpgradeBanner.vue";
// import UpgradeBanner from "admin/components/UpgradeBanner.vue";

export default {

Expand All @@ -34,7 +34,7 @@ export default {
components: {
Postbox,
Loading,
UpgradeBanner,
// UpgradeBanner,
AdminNotice
},

Expand Down
6 changes: 3 additions & 3 deletions src/admin/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="dokan-settings">
<h1 style="margin-bottom: 15px;">{{ __( 'Settings', 'dokan-lite' ) }}</h1>
<AdminNotice></AdminNotice>
<UpgradeBanner v-if="! hasPro"></UpgradeBanner>
<!-- <UpgradeBanner v-if="! hasPro"></UpgradeBanner>-->

<div id="setting-message_updated" class="settings-error notice is-dismissible" :class="{ 'updated' : isUpdated, 'error' : !isUpdated }" v-if="isSaved">
<p><strong v-html="message"></strong></p>
Expand Down Expand Up @@ -209,7 +209,7 @@

import Fields from "admin/components/Fields.vue"
import SettingsBanner from "admin/components/SettingsBanner.vue";
import UpgradeBanner from "admin/components/UpgradeBanner.vue";
// import UpgradeBanner from "admin/components/UpgradeBanner.vue";
import MobileSettingsDrawer from "admin/components/Settings/MobileSettingsList.vue";

export default {
Expand All @@ -222,7 +222,7 @@
Fields,
Loading,
SettingsBanner,
UpgradeBanner,
// UpgradeBanner,
AdminNotice,
},

Expand Down
6 changes: 3 additions & 3 deletions src/admin/pages/Vendors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<AdminNotice></AdminNotice>

<UpgradeBanner v-if="! hasPro"></UpgradeBanner>
<!-- <UpgradeBanner v-if="! hasPro"></UpgradeBanner>-->

<hr class="wp-header-end">

Expand Down Expand Up @@ -100,7 +100,7 @@

<script>
import AddVendor from './AddVendor.vue'
import UpgradeBanner from "admin/components/UpgradeBanner.vue";
// import UpgradeBanner from "admin/components/UpgradeBanner.vue";

let ListTable = dokan_get_lib('ListTable');
let Switches = dokan_get_lib('Switches');
Expand All @@ -116,7 +116,7 @@ export default {
Switches,
Search,
AddVendor,
UpgradeBanner,
// UpgradeBanner,
AdminNotice,
},

Expand Down
6 changes: 3 additions & 3 deletions src/admin/pages/Withdraw.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="withdraw-requests">
<h1>{{ __( 'Withdraw Requests', 'dokan-lite' ) }}</h1>
<AdminNotice></AdminNotice>
<UpgradeBanner v-if="! hasPro"></UpgradeBanner>
<!-- <UpgradeBanner v-if="! hasPro"></UpgradeBanner>-->

<modal
:title="__( 'Update Note', 'dokan-lite' )"
Expand Down Expand Up @@ -161,7 +161,7 @@ let AdminNotice = dokan_get_lib('AdminNotice');
const DateRangePicker = dokan_get_lib('DateRangePicker');

import $ from 'jquery';
import UpgradeBanner from "admin/components/UpgradeBanner.vue";
// import UpgradeBanner from "admin/components/UpgradeBanner.vue";

export default {

Expand All @@ -171,7 +171,7 @@ export default {
ListTable,
Modal,
Currency,
UpgradeBanner,
// UpgradeBanner,
AdminNotice,
DateRangePicker,
},
Expand Down
4 changes: 2 additions & 2 deletions templates/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
dokan_get_template_part(
'svg-icons/pro-award', null,
[
'width' => 20,
'height' => 20,
'width' => 16,
'height' => 16,
]
);
?>
Expand Down
Loading