Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Use default username/password data from installed app object, not fro…
Browse files Browse the repository at this point in the history
…m the app store object.

Closes #23
  • Loading branch information
nevets963 authored and mayankchhabra committed Oct 15, 2022
1 parent c322ecd commit 4f70299
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/views/AppStore/AppStoreApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@
v-on:click="openApp($event)"
>Open</b-button
>
<div class="mt-2 text-center d-flex justify-content-center" v-if="app.defaultPassword">
<div class="text-left mr-2" v-if="app.defaultUsername">
<div class="mt-2 text-center d-flex justify-content-center" v-if="installedApp.defaultPassword">
<div class="text-left mr-2" v-if="installedApp.defaultUsername">
<small class="text-muted">Default app username</small>
<input-copy
width="140px"
size="sm"
:value="app.defaultUsername"
:value="installedApp.defaultUsername"
class="mt-1"
></input-copy>
</div>
<div :class="app.defaultUsername ? 'text-left': ''">
<div :class="installedApp.defaultUsername ? 'text-left': ''">
<small class="text-muted">Default app password</small>
<input-copy
:width="app.defaultUsername ? '140px' : 'auto'"
:width="installedApp.defaultUsername ? '140px' : 'auto'"
size="sm"
:value="app.defaultPassword"
:value="installedApp.defaultPassword"
class="mt-1"
></input-copy>
</div>
Expand Down Expand Up @@ -331,6 +331,9 @@ export default {
app: function () {
return this.appStore.find((app) => app.id === this.$route.params.id);
},
installedApp: function () {
return this.installedApps.find((app) => app.id === this.$route.params.id);
},
isInstalled: function () {
const installedAppIndex = this.installedApps.findIndex(
(app) => app.id === this.app.id
Expand Down

0 comments on commit 4f70299

Please sign in to comment.