Skip to content

Commit 5b0a004

Browse files
Integrates text-security npm module to Secrets component
Prevents shoulder surfing
1 parent 92ba3df commit 5b0a004

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
},
1010
"dependencies": {
1111
"ansi_up": "^3.0.0",
12+
"file-loader": "^4.1.0",
1213
"lodash.throttle": "^4.1.1",
1314
"portal-vue": "^1.5.0",
15+
"text-security": "^1.2.0",
16+
"url-loader": "^2.1.0",
1417
"vue": "^2.5.17",
1518
"vue-click-outside": "^1.0.7",
1619
"vue-i18n": "^8.2.1",

src/components/editable-list/Secrets.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<template slot="fields">
1919
<BaseInput name="secret.name" v-model="secret.name" placeholder="Secret Name" type="text"/>
20-
<BaseTextArea name="secret.data" v-model="secret.data" placeholder="Secret Value"/>
20+
<BaseTextArea name="secret.data" v-model="secret.data" class="hide_secret" placeholder="Secret Value"/>
2121
<BaseCheckbox v-model="secret.pullRequest" style="margin-bottom: 12px;">Allow Pull Requests</BaseCheckbox>
2222
</template>
2323
</EditableList>
@@ -86,6 +86,11 @@ export default {
8686
</script>
8787

8888
<style scoped>
89+
@import "../../../node_modules/text-security/dist/text-security-disc.css";
90+
.hide_secret {
91+
font-family: 'text-security-disc';
92+
}
93+
8994
.icon-secrets-empty {
9095
display: block;
9196
margin: 0 auto 20px;

0 commit comments

Comments
 (0)