Add algo, digits, and seconds fields

This commit is contained in:
Gourav Kumar 2024-07-01 10:56:46 +05:30
parent 24300ca596
commit 1af66916a9

View File

@ -14,6 +14,22 @@
<el-form-item label="Notes"> <el-form-item label="Notes">
<el-input v-model="form.notes" /> <el-input v-model="form.notes" />
</el-form-item> </el-form-item>
<el-form-item label="Algorithm">
<el-select v-model="form.algorithm" placeholder="Select">
<el-option
v-for="item in algorithms"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item label="Digits">
<el-input v-model="form.digits" />
</el-form-item>
<el-form-item label="Seconds">
<el-input v-model="form.seconds" />
</el-form-item>
</el-form> </el-form>
<el-button @click="createSecret" type="primary" v-if="showAddMore" <el-button @click="createSecret" type="primary" v-if="showAddMore"
>Save & Add More</el-button >Save & Add More</el-button
@ -45,9 +61,13 @@ export default {
username: "", username: "",
secret: "", secret: "",
notes: "", notes: "",
algorithm: "SHA1",
digits: 6,
seconds: 30,
}, },
method: "POST", method: "POST",
showAddMore: true, showAddMore: true,
algorithms: ["SHA1", "SHA256", "SHA512"],
}; };
}, },