Skip to content

Commit

Permalink
Fix:Server connect form press enter to submit #1158
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jul 8, 2024
1 parent d80482f commit 03a46de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/connection/ServerConnectForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<ui-text-input v-model="password" type="password" :disabled="processing" :placeholder="$strings.LabelPassword" class="w-full mb-2 text-lg" />

<div class="flex items-center pt-2">
<ui-icon-btn v-if="serverConfig.id" small bg-color="error" icon="delete" @click="removeServerConfigClick" />
<ui-icon-btn v-if="serverConfig.id" small bg-color="error" icon="delete" type="button" @click="removeServerConfigClick" />
<div class="flex-grow" />
<ui-btn :disabled="processing || !networkConnected" type="submit" class="mt-1 h-10">{{ networkConnected ? $strings.ButtonSubmit : $strings.MessageNoNetworkConnection }}</ui-btn>
</div>
Expand Down
8 changes: 6 additions & 2 deletions components/ui/IconBtn.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<button class="icon-btn rounded-md flex items-center justify-center h-9 w-9 relative" @mousedown.prevent :disabled="disabled || loading" :class="className" @click="clickBtn">
<button class="icon-btn rounded-md flex items-center justify-center h-9 w-9 relative" :disabled="disabled || loading" :class="className" :type="type" @mousedown.prevent @click="clickBtn">
<div v-if="loading" class="text-fg absolute top-0 left-0 w-full h-full flex items-center justify-center text-opacity-100">
<svg class="animate-spin" style="width: 24px; height: 24px" viewBox="0 0 24 24">
<path fill="currentColor" d="M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z" />
Expand All @@ -13,6 +13,10 @@
export default {
props: {
icon: String,
type: {
type: String,
default: 'button'
},
disabled: Boolean,
bgColor: {
type: String,
Expand Down Expand Up @@ -77,4 +81,4 @@ button.icon-btn:disabled::before {
button.icon-btn:disabled span {
color: #777;
}
</style>
</style>

0 comments on commit 03a46de

Please sign in to comment.