Skip to content

Commit

Permalink
#3 make User ID input field password type
Browse files Browse the repository at this point in the history
  • Loading branch information
motorina0 committed May 31, 2021
1 parent decfc27 commit 1e72e82
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/Connect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,27 @@
<q-card-section>
<div class="q-gutter-md">
<q-input
:disable="hasActiveUser"
:readonly="hasActiveUser"
filled
dense
v-model.trim="serverUrl"
type="text"
label="LNbits Server URL *"
></q-input>
<q-input
:disable="hasActiveUser"
:readonly="hasActiveUser"
:type="showUserId ? 'text' : 'password'"
filled
dense
v-model.trim="userId"
type="text"
label="User ID (optional)"
>
<template v-slot:append>
<q-icon
:name="showUserId ? 'visibility' : 'visibility_off'"
class="cursor-pointer"
@click="showUserId = !showUserId"
/> </template
></q-input>
<q-expansion-item
v-if="requestDisconnect"
Expand Down Expand Up @@ -123,6 +130,7 @@ export default {
data() {
return {
userId: '',
showUserId: false,
userData: {},
serverUrl: '',
error: '',
Expand Down Expand Up @@ -156,13 +164,7 @@ export default {
},
computed: {
hasActiveUser() {
console.log('this.userId', this.userId)
console.log('this.userData', this.userData)
console.log('this.userData.id', this.userData.id)
const x = !!((this.userId && this.userId.length) || (this.userData && this.userData.id))
console.log('x', x)
return !!(this.userData && this.userData.id)
// return false
},
},
methods: {
Expand Down

0 comments on commit 1e72e82

Please sign in to comment.