Skip to content

Commit bc84e15

Browse files
authored
Merge pull request #601 from BrentIO/fix/600
Fix double-click IP input not populating hostname
2 parents feb9c31 + af3e076 commit bc84e15

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Controller/ui/src/views/ControllersView.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<div v-if="!isCloudMode && !sessions[ctrl.id]?.isAuthenticated" class="space-y-2">
7070
<input v-model="ipInputs[ctrl.id]" type="text" placeholder="192.168.1.x"
7171
class="w-full rounded-lg border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-gray-100 px-2 py-1.5 text-base focus:outline-none focus:ring-2 focus:ring-blue-500"
72-
@dblclick="ipInputs[ctrl.id] = window.location.hostname" />
72+
@dblclick="ipInputs[ctrl.id] = pageHostname" />
7373
<div class="flex gap-2">
7474
<input v-model="tokenInputs[ctrl.id]" type="text" placeholder="Visual token" maxlength="6"
7575
class="flex-1 min-w-0 rounded-lg border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-gray-100 px-2 py-1.5 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500" />
@@ -376,6 +376,8 @@ const emptyForm = () => ({ name: '', area: '', product: '', mac: '', uuid: '' })
376376
const form = ref(emptyForm())
377377
const localDexieHash = ref(null)
378378
379+
const pageHostname = window.location.hostname
380+
379381
const ipInputs = reactive({})
380382
const tokenInputs = reactive({})
381383
const sessions = reactive({})

0 commit comments

Comments
 (0)