This repository was archived by the owner on Dec 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 4646 />
4747 </div >
4848
49- <button @click =" nextStep" class =" my-2 w-full bg-[#fcec03] text-black p-2 rounded-full active:bg-yellow-300" >Next</button >
49+ <!-- Disable the button unless both inputs are filled -->
50+ <button
51+ @click =" nextStep"
52+ :disabled =" !canProceedToPinCreation"
53+ class =" my-2 w-full bg-[#fcec03] text-black p-2 rounded-full active:bg-yellow-300 disabled:opacity-50"
54+ >
55+ Next
56+ </button >
57+
5058 <button @click =" previousStep" class =" my-2 w-full bg-gray-500 text-white p-2 rounded-full active:bg-gray-600" >Previous</button >
5159 </div >
5260 </div >
5967
6068 <!-- PinInput Component -->
6169 <PinInput
62- class =" my-4" v-model:pin =" pin" :length =" 6" :mask =" false" />
70+ class =" my-4" v-model:pin =" pin" :length =" 6" :mask =" false"
71+ />
6372
6473 <!-- Next button is disabled until pin is obtained -->
6574 <button
6978 >
7079 Finish
7180 </button >
81+
7282 <button @click =" previousStep" class =" my-2 w-full bg-gray-500 text-white p-2 rounded-full active:bg-gray-600" >Previous</button >
7383 </div >
7484 </div >
90100
91101<script setup lang="ts">
92102import { ProfileManager } from ' ../ProfileManager' ;
93- import { ref } from ' vue' ;
103+ import { ref , computed } from ' vue' ;
94104import PinInput from ' ./PinInput.vue' ;
95105
96106// Used for displaying debug info
@@ -102,6 +112,8 @@ const currentStep = ref(1);
102112// Step 2 inputs
103113const profileName = ref (' ' );
104114const dwnEndpoint = ref (' https://dwn.tbddev.org/beta' );
115+ // Computed property to check if both profileName and dwnEndpoint are filled
116+ const canProceedToPinCreation = computed (() => profileName .value .trim () !== ' ' && dwnEndpoint .value .trim () !== ' ' );
105117
106118// Step 3 inputs
107119const pin = ref (' ' );
Original file line number Diff line number Diff line change 11<template >
22 <div class =" flex flex-col h-screen" >
3- <!-- Top Header -->
4- <div class =" bg-[#fcec03] p-4 flex items-center justify-between" >
3+ <!-- Top Header with space for the mobile status bar (time, battery, etc.) -->
4+ <div class =" bg-[#fcec03] p-4 flex items-center justify-between pt-24 " >
55 <p class =" text-4xl font-bold" >Profiles</p >
66 </div >
77
You can’t perform that action at this time.
0 commit comments