add display of my own offers

This commit is contained in:
2024-02-03 18:56:09 -07:00
parent e140da081f
commit a76df55224
7 changed files with 439 additions and 154 deletions

View File

@@ -216,7 +216,7 @@
</span>
<span v-if="offer.amount" class="whitespace-nowrap">
<fa
:icon="iconForUnitCode(offer.unit)"
:icon="libsUtil.iconForUnitCode(offer.unit)"
class="fa-fw text-slate-400"
/>{{ offer.amount }}
</span>
@@ -274,7 +274,7 @@
</span>
<span v-if="give.amount" class="whitespace-nowrap">
<fa
:icon="iconForUnitCode(give.unit)"
:icon="libsUtil.iconForUnitCode(give.unit)"
class="fa-fw text-slate-400"
/>{{ give.amount }}
</span>
@@ -755,25 +755,6 @@ export default class ProjectViewView extends Vue {
(this.$refs.customGiveDialog as GiftedDialog).open(giver, offer.handleId);
}
UNIT_CODES: Record<string, Record<string, string>> = {
BTC: {
name: "Bitcoin",
faIcon: "bitcoin-sign",
},
HUR: {
name: "hours",
faIcon: "clock",
},
USD: {
name: "US Dollars",
faIcon: "dollar",
},
};
iconForUnitCode(unitCode: string) {
return this.UNIT_CODES[unitCode]?.faIcon || "question";
}
// return an HTTPS URL if it's not a global URL
addScheme(url: string) {
if (!libsUtil.isGlobalUri(url)) {