Skip to content

Commit

Permalink
Modifications on UI to support auto drive letter
Browse files Browse the repository at this point in the history
  • Loading branch information
evsar3 committed Apr 27, 2021
1 parent 41e5783 commit 0244699
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/renderer/components/MainWindow/ConnectionItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<div class="details">
<span class="local-path">
{{conn.mountPoint}}
{{mountPointLabel}}
</span>

<span class="sep">•</span>
Expand All @@ -26,7 +26,7 @@
</div>

<div class="controls">
<button v-show="isConnected" @click="$emit('open', conn.mountPoint)">
<button v-show="isConnected" @click="$emit('open', conn.mountPoint === 'auto' ? conn.preferredMountPoint : conn.mountPoint)">
<Icon icon="openFolder"/>
</button>

Expand Down Expand Up @@ -101,6 +101,16 @@ export default {
showDeleteButton () {
return this.mode === 'delete' && !this.isConnected && !this.isConnectingOrDisconnecting
},
mountPointLabel () {
if (this.isConnected && this.conn.mountPoint === 'auto') {
return `Auto (${this.conn.preferredMountPoint})`
} else if (this.conn.mountPoint === 'auto') {
return 'Auto'
} else {
return this.conn.mountPoint
}
}
}
}
Expand Down

0 comments on commit 0244699

Please sign in to comment.