UI data loading finally working! hallelluja

This commit is contained in:
Ryan Breen
2023-01-15 23:01:02 -05:00
parent b84be8c351
commit 3315e2ee3c
3 changed files with 116 additions and 87 deletions

View File

@@ -8,8 +8,8 @@
<body x-data="popup">
<div class="profiles">
<label for="profile">Profile</label>
<select x-model="profileIndex" name="profile" id="profile" @change="setProfileIndex()">
<template x-for="(prof, index) in profiles">
<select x-model.number="profileIndex" name="profile" id="profile">
<template x-for="(prof, index) in profileNames" :key="index">
<option x-text="prof" :value="index"></option>
</template>
</select>
@@ -18,17 +18,18 @@
<div class="profile-name">
<label for="profile-name">Profile Name</label>
<input type="text" id="profile-name" x-model="activeProfile.name">
<input type="text" id="profile-name" x-model="name">
</div>
<div class="key">
<label for="priv-key">Private Key</label>
<input id="priv-key" x-model="activeProfile.privKey" :type="visibleKey ? 'text' : 'password'">
<input id="priv-key" x-model="privKey" :type="visibleKey ? 'text' : 'password'">
</div>
<div class="buttons">
<button @click="visibleKey = !visibleKey" x-text="visibleKey ? 'Hide' : 'Show'"></button>
<button @click="saveKey()">Save</button>
<button @click="profileIndex = 1">Profile Index</button>
</div>
<div x-show="hasValidPubKey">