feat: disable inputs in realtime and graphql connections when active (#1870)
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
focus-visible:bg-transparent focus-visible:border-dividerDark
|
focus-visible:bg-transparent focus-visible:border-dividerDark
|
||||||
"
|
"
|
||||||
:placeholder="$t('request.url')"
|
:placeholder="$t('request.url')"
|
||||||
|
:disabled="connected"
|
||||||
@keyup.enter="onConnectClick"
|
@keyup.enter="onConnectClick"
|
||||||
/>
|
/>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
focus-visible:border-dividerDark
|
focus-visible:border-dividerDark
|
||||||
"
|
"
|
||||||
:placeholder="$t('mqtt.url')"
|
:placeholder="$t('mqtt.url')"
|
||||||
|
:disabled="connectionState"
|
||||||
/>
|
/>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
id="connect"
|
id="connect"
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"
|
"
|
||||||
:value="`Client ${clientVersion}`"
|
:value="`Client ${clientVersion}`"
|
||||||
readonly
|
readonly
|
||||||
|
:disabled="connectionState"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
focus-visible:border-dividerDark
|
focus-visible:border-dividerDark
|
||||||
"
|
"
|
||||||
:placeholder="$t('socketio.url')"
|
:placeholder="$t('socketio.url')"
|
||||||
|
:disabled="connectionState"
|
||||||
@keyup.enter="urlValid ? toggleConnection() : null"
|
@keyup.enter="urlValid ? toggleConnection() : null"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
@@ -97,6 +99,7 @@
|
|||||||
focus-visible:border-dividerDark
|
focus-visible:border-dividerDark
|
||||||
"
|
"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
|
:disabled="connectionState"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
@@ -261,6 +264,10 @@ export default defineComponent({
|
|||||||
url() {
|
url() {
|
||||||
this.debouncer()
|
this.debouncer()
|
||||||
},
|
},
|
||||||
|
connectionState(connected) {
|
||||||
|
if (connected) this.$refs.versionOptions.tippy().disable()
|
||||||
|
else this.$refs.versionOptions.tippy().enable()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (process.browser) {
|
if (process.browser) {
|
||||||
|
|||||||
@@ -28,10 +28,11 @@
|
|||||||
focus-visible:bg-transparent focus-visible:border-dividerDark
|
focus-visible:bg-transparent focus-visible:border-dividerDark
|
||||||
"
|
"
|
||||||
:placeholder="$t('sse.url')"
|
:placeholder="$t('sse.url')"
|
||||||
|
:disabled="connectionSSEState"
|
||||||
@keyup.enter="serverValid ? toggleSSEConnection() : null"
|
@keyup.enter="serverValid ? toggleSSEConnection() : null"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
for="url"
|
for="event-type"
|
||||||
class="
|
class="
|
||||||
bg-primaryLight
|
bg-primaryLight
|
||||||
border-t border-b border-divider
|
border-t border-b border-divider
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
focus-visible:bg-transparent focus-visible:border-dividerDark
|
focus-visible:bg-transparent focus-visible:border-dividerDark
|
||||||
"
|
"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
|
:disabled="connectionSSEState"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
:class="{ error: !urlValid }"
|
:class="{ error: !urlValid }"
|
||||||
:placeholder="$t('websocket.url')"
|
:placeholder="$t('websocket.url')"
|
||||||
|
:disabled="connectionState"
|
||||||
@keyup.enter="urlValid ? toggleConnection() : null"
|
@keyup.enter="urlValid ? toggleConnection() : null"
|
||||||
/>
|
/>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
|
|||||||
Reference in New Issue
Block a user