-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds possible conflicts tab which reports the most common probl…
…ems that Optimole might have with various plugins
- Loading branch information
Showing
15 changed files
with
368 additions
and
159 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<div class="notification" :class="conflictClass( item.severity )"> | ||
<div v-html="item.message"></div> | ||
|
||
<a :class="is_loading ? 'is-loading' : '' " | ||
class="is-pulled-right button optml-conflict-done is-small is-link is-inverted is-outlined" | ||
v-on:click="dismissConflict( item.id )"><span v-if="!is_loading" class="dashicons dashicons-yes"></span>{{strings.conflict_close}}</a> | ||
<div class=" is-clearfix"></div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "conflict-item", | ||
props: { | ||
item:{ | ||
type: Object | ||
}, | ||
is_loading:{ | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
data() { | ||
return { | ||
home_url: optimoleDashboardApp.home_url, | ||
strings: optimoleDashboardApp.strings.conflicts, | ||
} | ||
}, | ||
methods: { | ||
conflictClass(type) { | ||
if (type === 'high') { | ||
return 'is-danger'; | ||
} | ||
if (type === 'medium') { | ||
return 'is-info'; | ||
} | ||
return 'is-primary'; | ||
}, | ||
dismissConflict(conflictID) { | ||
this.is_loading = true; | ||
this.$store.dispatch('dismissConflict', {conflictID: conflictID, component: this}); | ||
} | ||
} | ||
} | ||
</script> | ||
<style scoped> | ||
#optimole-app .optml-conflict-done.button.is-link.is-outlined.is-loading::after { | ||
border-color: transparent transparent #fff #fff !important; | ||
} | ||
.optml-conflict-done:hover { | ||
background-color: transparent !important; | ||
color: #fff !important; | ||
border-color: transparent !important; | ||
} | ||
</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
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
Oops, something went wrong.