web-api-manager/config/js/components/logging-settings.vue.js

32 lines
970 B
JavaScript
Raw Normal View History

/*jslint es6: true, this: true*/
/*global window, Vue*/
(function () {
"use strict";
Vue.component("logging-settings", {
props: ["shouldLog"],
template: `
<div class="logging-settings">
<div class="checkbox">
<label>
<input type="checkbox"
v-model="shouldLog"
@change="shouldLogChanged">
Log blocked functionality?
<p class="help-block">
Enabling logging will print information about each
blocked method to the console, for each domain.
</p>
</label>
</div>
</div>
`,
methods: {
shouldLogChanged: function () {
this.$root.$data.setShouldLog(this.shouldLog);
}
}
});
}());