Add description and reset

pull/1/head
Grandschtroumpf 6 years ago committed by François
parent a2fdf12aa6
commit 1cfaf2f942
  1. 38
      src/persmission-handler.js

@ -6,8 +6,17 @@ const modalDialog = require('./app/ui/modaldialog')
const css = csjs` const css = csjs`
.permission h4 { .permission h4 {
text-transform: uppercase;
text-align: center; text-align: center;
} }
.permission h6 {
text-transform: uppercase;
}
.remember {
display: flex;
justify-content: space-between;
align-items: center;
}
.images { .images {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -18,8 +27,8 @@ const css = csjs`
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.images span { .images i {
marign: 0 20px; margin: 0 20px;
} }
` `
@ -41,6 +50,7 @@ export class PermissionHandler {
clear () { clear () {
localStorage.removeItem('plugins/permissions') localStorage.removeItem('plugins/permissions')
addTooltip('All Permissions have been reset')
} }
/** /**
@ -125,14 +135,26 @@ export class PermissionHandler {
<section class="${css.permission}"> <section class="${css.permission}">
<article class="${css.images}"> <article class="${css.images}">
<img src="${from.icon}" /> <img src="${from.icon}" />
<span> ---> </span> <i class="fa fa-arrow-right"></i>
<img src="${to.icon}" /> <img src="${to.icon}" />
</article> </article>
<h4>${message}</h4>
<div class="custom-control custom-checkbox"> <article>
${rememberSwitch} <h4>${message} :</h4>
<label class="custom-control-label" for="remember">Remember this choice</label> <h6>${fromName}</h6>
</div> <p>${from.description || yo`<i>No description Provided</i>`}</p>
<h6>${toName} :</p>
<p>${to.description || yo`<i>No description Provided</i>`}</p>
</article>
<article class="${css.remember}">
<div class="custom-control custom-checkbox">
${rememberSwitch}
<label class="custom-control-label" for="remember">Remember this choice</label>
</div>
<button class="btn btn-sm" onclick="${_ => this.clear()}">Reset all Permissions</button>
</article>
</section> </section>
` `
} }

Loading…
Cancel
Save