Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mint icon #254

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions src/components/MintSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
:active="mint.url == activeMintUrl"
active-class="text-weight-bold text-primary"
clickable
class="q-pb-xs"
class="q-pb-xs q-pl-xs"
>
<q-item-section avatar>
<q-item-section avatar style="min-width: 36px; max-width: 39px">
<q-icon
:color="mint.url == activeMintUrl ? 'primary' : 'grey'"
:name="
Expand All @@ -32,6 +32,13 @@
class="cursor-pointer"
/>
</q-item-section>
<q-avatar
v-if="getMintIconUrl(mint)"
size="32px"
class="q-mr-sm q-mt-xs"
>
<img :src="getMintIconUrl(mint)" alt="Mint Icon" />
</q-avatar>
<q-item-section>
<q-item-label
lines="1"
Expand Down Expand Up @@ -60,7 +67,7 @@
:label="
formatCurrency(mintClass(mint).unitBalance(unit), unit)
"
class="q-mx-xs q-mb-xs"
class="q-mr-xs q-mb-xs"
/>
</q-item-label>
</q-item-section>
Expand All @@ -81,7 +88,7 @@
</q-item-section>
</q-item>

<q-separator spaced inset="item" />
<q-separator spaced style="margin-left: 50px" />
</div>
</q-list>
</div>
Expand Down Expand Up @@ -807,6 +814,17 @@ export default defineComponent({
this.showMintInfoData = mint;
this.showMintInfoDialog = true;
},
getMintIconUrl: function (mint) {
if (mint.info) {
if (mint.info.icon_url) {
return mint.info.icon_url;
} else {
return undefined;
}
} else {
return undefined;
}
},
},
created: function () {},
});
Expand Down
Loading