Skip to content

Commit

Permalink
fix: file upload input not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed May 10, 2022
1 parent e0f85f4 commit 58611bf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/renderer/components/BaseUploadInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
</template>

<script>
import { uidGen } from 'common/libs/uidGen';
export default {
name: 'BaseUploadInput',
props: {
Expand All @@ -38,12 +40,9 @@ export default {
emits: ['change', 'clear'],
data () {
return {
id: null
id: uidGen()
};
},
mounted () {
this.id = this._uid;
},
methods: {
clear () {
this.$emit('clear');
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/FakerSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
>
<BaseUploadInput
v-else-if="inputProps().type === 'file'"
:value="selectedValue"
:model-value="selectedValue"
:message="$t('word.browse')"
@clear="clearValue"
@change="filesChange($event)"
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/WorkspaceAddConnectionPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.databasePath"
:model-value="connection.databasePath"
:message="$t('word.browse')"
@clear="pathClear('databasePath')"
@change="pathSelection($event, 'databasePath')"
Expand Down Expand Up @@ -211,7 +211,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.key"
:model-value="connection.key"
:message="$t('word.browse')"
@clear="pathClear('key')"
@change="pathSelection($event, 'key')"
Expand All @@ -224,7 +224,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.cert"
:model-value="connection.cert"
:message="$t('word.browse')"
@clear="pathClear('cert')"
@change="pathSelection($event, 'cert')"
Expand All @@ -237,7 +237,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.ca"
:model-value="connection.ca"
:message="$t('word.browse')"
@clear="pathClear('ca')"
@change="pathSelection($event, 'ca')"
Expand Down Expand Up @@ -342,7 +342,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.sshKey"
:model-value="connection.sshKey"
:message="$t('word.browse')"
@clear="pathClear('sshKey')"
@change="pathSelection($event, 'sshKey')"
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/WorkspaceEditConnectionPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.databasePath"
:model-value="localConnection.databasePath"
:message="$t('word.browse')"
@clear="pathClear('databasePath')"
@change="pathSelection($event, 'databasePath')"
Expand Down Expand Up @@ -207,7 +207,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.key"
:model-value="localConnection.key"
:message="$t('word.browse')"
@clear="pathClear('key')"
@change="pathSelection($event, 'key')"
Expand All @@ -220,7 +220,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.cert"
:model-value="localConnection.cert"
:message="$t('word.browse')"
@clear="pathClear('cert')"
@change="pathSelection($event, 'cert')"
Expand All @@ -233,7 +233,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.ca"
:model-value="localConnection.ca"
:message="$t('word.browse')"
@clear="pathClear('ca')"
@change="pathSelection($event, 'ca')"
Expand Down Expand Up @@ -330,7 +330,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.sshKey"
:model-value="localConnection.sshKey"
:message="$t('word.browse')"
@clear="pathClear('sshKey')"
@change="pathSelection($event, 'sshKey')"
Expand Down

0 comments on commit 58611bf

Please sign in to comment.