Skip to content

Commit

Permalink
v2.0.1 release
Browse files Browse the repository at this point in the history
- Fixed string field not being able to type in
- removed old functions from JS
  • Loading branch information
gldrenthe89 committed Oct 29, 2020
1 parent 1051da1 commit a75c3c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 46 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

24 changes: 2 additions & 22 deletions resources/js/components/Form/PasswordGeneratorField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default {
button.value = 'Generated';
setTimeout(function () {
button.value = 'Regenerate'
}, 1500);
}, 750);
},
copyPassword() {
let fieldText = document.getElementById(this.field.attribute);
Expand All @@ -95,7 +95,7 @@ export default {
button.value = "Copied";
setTimeout(function () {
button.value = 'Copy'
}, 1500);
}, 750);
}
},
switchVisibility() {
Expand All @@ -104,26 +104,6 @@ export default {
button.innerHTML = this.passwordFieldType === 'password'
? '<path d="M15 12c0 1.654-1.346 3-3 3s-3-1.346-3-3 1.346-3 3-3 3 1.346 3 3zm9-.449s-4.252 8.449-11.985 8.449c-7.18 0-12.015-8.449-12.015-8.449s4.446-7.551 12.015-7.551c7.694 0 11.985 7.551 11.985 7.551zm-7 .449c0-2.757-2.243-5-5-5s-5 2.243-5 5 2.243 5 5 5 5-2.243 5-5z"/>'
: '<path d="M11.885 14.988l3.104-3.098.011.11c0 1.654-1.346 3-3 3l-.115-.012zm8.048-8.032l-3.274 3.268c.212.554.341 1.149.341 1.776 0 2.757-2.243 5-5 5-.631 0-1.229-.13-1.785-.344l-2.377 2.372c1.276.588 2.671.972 4.177.972 7.733 0 11.985-8.449 11.985-8.449s-1.415-2.478-4.067-4.595zm1.431-3.536l-18.619 18.58-1.382-1.422 3.455-3.447c-3.022-2.45-4.818-5.58-4.818-5.58s4.446-7.551 12.015-7.551c1.825 0 3.456.426 4.886 1.075l3.081-3.075 1.382 1.42zm-13.751 10.922l1.519-1.515c-.077-.264-.132-.538-.132-.827 0-1.654 1.346-3 3-3 .291 0 .567.055.833.134l1.518-1.515c-.704-.382-1.496-.619-2.351-.619-2.757 0-5 2.243-5 5 0 .852.235 1.641.613 2.342z"/>';
},
/*
* Set the initial, internal value for the field.
*/
setInitialValue() {
this.value = this.field.value || ''
},
/**
* Fill the given FormData object with the field's internal value.
*/
fill(formData) {
formData.append(this.field.attribute, this.value || '')
},
/**
* Update the field's internal value.
*/
handleChange(value) {
this.value = value
}
}
}
Expand Down
25 changes: 2 additions & 23 deletions resources/js/components/Form/StringGeneratorField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ export default {
button.value = 'Generated';
setTimeout(function () {
button.value = 'Regenerate'
}, 1500);
this.copyString();
}, 750);
},
copyString() {
let fieldText = document.getElementById(this.field.attribute);
Expand All @@ -123,28 +122,8 @@ export default {
button.value = "Copied";
setTimeout(function () {
button.value = 'Copy'
}, 1500);
}, 750);
}
},
/*
* Set the initial, internal value for the field.
*/
setInitialValue() {
this.value = this.field.value || ''
},
/**
* Fill the given FormData object with the field's internal value.
*/
fill(formData) {
formData.append(this.field.attribute, this.value || '')
},
/**
* Update the field's internal value.
*/
handleChange(value) {
this.value = value
}
}
}
Expand Down

0 comments on commit a75c3c5

Please sign in to comment.