-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance : Admin Notice Show gloablly & extand API (#2446)
* [refactor] [readable] state checking logic * [change] [filter] admin notices * [replace] args of notice api * [replace] scope to context * [refactor] app js code * [refactor] [readable] state checking logic * [change] context to scope * fix: pr review to control scope-wise admin notices * fix: global admin notice is not working * update: filter admin notices by scope * update: ensure notice scope before scope wise filtering * update: simplify the scope validation * fix: Clicking on upgrader button doesn't work if notice is set to global scope * update: data update notice description as per pm message --------- Co-authored-by: Al Amin Ahamed <[email protected]>
- Loading branch information
1 parent
c449b9f
commit 9b8e9c2
Showing
7 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup> | ||
import AdminNotice from "admin/components/AdminNotice.vue"; | ||
</script> | ||
|
||
<template> | ||
<AdminNotice | ||
scope="global" | ||
:interval="10000" | ||
endpoint="admin" | ||
/> | ||
|
||
</template> | ||
|
||
<style scoped lang="less"> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Vue from 'vue'; | ||
import App from './App.vue'; | ||
import Mixin from '../../utils/Mixin'; | ||
|
||
const { jQuery: $ } = window; | ||
|
||
if ( $( '#dokan-admin-notices' ).length ) { | ||
Vue.mixin( Mixin ); | ||
|
||
new Vue( { | ||
el: '#dokan-admin-notices', | ||
render: ( h ) => h( App ), | ||
} ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters