Skip to content

Commit

Permalink
show this device by default in http connection page
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Nov 27, 2024
1 parent dd75c48 commit e771339
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/pages/ConnectViaHttpPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@
</div>
</div>

<!-- this device -->
<div class="bg-gray-200 p-2 font-semibold">This Device</div>
<div @click="connect(thisDeviceAddress)" class="flex cursor-pointer bg-white p-2 shadow hover:bg-gray-50 min-h-12">
<div class="my-auto">{{ thisDeviceAddress }}</div>
</div>

<!-- connection history -->
<div v-if="previousHttpConnectionAddresses.length > 0" class="bg-gray-200 p-2 font-semibold">Connection History</div>
<div @click="connect(address)" v-for="address of previousHttpConnectionAddresses" class="flex cursor-pointer bg-white p-2 shadow hover:bg-gray-50">
<div @click="connect(address)" v-for="address of previousHttpConnectionAddresses" class="flex cursor-pointer bg-white p-2 shadow hover:bg-gray-50 min-h-12">
<div class="my-auto mr-auto">{{ address }}</div>
<div class="my-auto">
<IconButton @click.stop="removePreviousHttpConnectionAddress(address)">
Expand Down Expand Up @@ -157,5 +163,10 @@ export default {
},
},
computed: {
thisDeviceAddress() {
return window.location.origin;
},
},
}
</script>

0 comments on commit e771339

Please sign in to comment.