added delete profile button

This commit is contained in:
Ryan Breen
2023-01-16 20:21:35 -05:00
parent 579211e6f4
commit 4fee1c9e81
4 changed files with 36 additions and 6 deletions

View File

@@ -9,12 +9,16 @@
<body x-data="popup">
<div class="profiles">
<label for="profile">Profile</label>
<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>
<button @click="newProfile">New</button>
<div class="profile-buttons">
<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>
<button @click="newProfile">New</button>
<button @click="confirmDelete = true" x-show="!confirmDelete" :disabled="profileNames.length <= 1">Delete</button>
<button @click="await deleteProfile()" x-show="confirmDelete">Confirm Delete</button>
</div>
</div>
<div class="profile-name">