-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tim Schmidt <tim@launchbadge.com> fix: reformat Signed-off-by: Tim Schmidt <tim@launchbadge.com> fix: nftdetails page organization, fix filter, probably broke pause/play Signed-off-by: Tim Schmidt <tim@launchbadge.com> fix: fix the play/pause button Signed-off-by: Tim Schmidt <tim@launchbadge.com> feat: fix filter options, don't display none values, make ipfs metadata a link Signed-off-by: Tim Schmidt <tim@launchbadge.com> feat: add decoded url links, fix test Signed-off-by: Tim Schmidt <tim@launchbadge.com> feat: add nft list and links from balances Signed-off-by: Tim Schmidt <tim@launchbadge.com>
- Loading branch information
1 parent
3530b2c
commit feae6a6
Showing
16 changed files
with
1,219 additions
and
1,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<!-- | ||
- | ||
- Hedera Mirror Node Explorer | ||
- | ||
- Copyright (C) 2021 - 2023 Hedera Hashgraph, LLC | ||
- | ||
- Licensed under the Apache License, Version 2.0 (the "License"); | ||
- you may not use this file except in compliance with the License. | ||
- You may obtain a copy of the License at | ||
- | ||
- http://www.apache.org/licenses/LICENSE-2.0 | ||
- | ||
- Unless required by applicable law or agreed to in writing, software | ||
- distributed under the License is distributed on an "AS IS" BASIS, | ||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
- See the License for the specific language governing permissions and | ||
- limitations under the License. | ||
- | ||
--> | ||
|
||
<!-- --------------------------------------------------------------------------------------------------------------- --> | ||
<!-- TEMPLATE --> | ||
<!-- --------------------------------------------------------------------------------------------------------------- --> | ||
|
||
<template> | ||
|
||
<o-table | ||
:data="nfts" | ||
:hoverable="true" | ||
:paginated="!isTouchDevice" | ||
:per-page="isMediumScreen ? pageSize : 5" | ||
:striped="true" | ||
:v-model:current-page="currentPage" | ||
:mobile-breakpoint="ORUGA_MOBILE_BREAKPOINT" | ||
aria-current-label="Current page" | ||
aria-next-label="Next page" | ||
aria-page-label="Page" | ||
aria-previous-label="Previous page" | ||
@cell-click="handleClick" | ||
> | ||
<o-table-column v-slot="props" field="token_id" label="Token"> | ||
<TokenLink | ||
v-bind:show-extra="true" | ||
v-bind:token-id="props.row.token_id" | ||
v-bind:no-anchor="true" | ||
/> | ||
</o-table-column> | ||
|
||
<o-table-column v-slot="props" field="serial" label="Serial Number" position="right"> | ||
{{props.row.serial_number}} | ||
</o-table-column> | ||
|
||
</o-table> | ||
|
||
<EmptyTable v-if="!nfts.length"/> | ||
|
||
</template> | ||
|
||
<!-- --------------------------------------------------------------------------------------------------------------- --> | ||
<!-- SCRIPT --> | ||
<!-- --------------------------------------------------------------------------------------------------------------- --> | ||
|
||
<script lang="ts"> | ||
import {defineComponent, inject, PropType, ref} from 'vue'; | ||
import { Nft, TokenBalance } from "@/schemas/HederaSchemas"; | ||
import TokenLink from "@/components/values/TokenLink.vue"; | ||
import TokenAmount from "@/components/values/TokenAmount.vue"; | ||
import {ORUGA_MOBILE_BREAKPOINT} from '@/App.vue'; | ||
import EmptyTable from "@/components/EmptyTable.vue"; | ||
import {routeManager} from "@/router"; | ||
export default defineComponent({ | ||
name: 'NftsTable', | ||
components: { | ||
EmptyTable, | ||
TokenLink, | ||
// TokenAmount | ||
}, | ||
props: { | ||
nfts: { | ||
type: Array as PropType<Array<Nft>>, | ||
default: () => [] | ||
}, | ||
nbItems: Number, | ||
}, | ||
setup(props) { | ||
const isTouchDevice = inject('isTouchDevice', false) | ||
const isMediumScreen = inject('isMediumScreen', true) | ||
const DEFAULT_PAGE_SIZE = 15 | ||
const pageSize = props.nbItems ?? DEFAULT_PAGE_SIZE | ||
const handleClick = (nft: Nft, c: unknown, i: number, ci: number, event: MouseEvent) => { | ||
if (nft.token_id && nft.serial_number) { | ||
routeManager.routeToSerial(nft.token_id, nft.serial_number, event.ctrlKey || event.metaKey) | ||
} | ||
} | ||
let currentPage = ref(1) | ||
return { | ||
isTouchDevice, | ||
isMediumScreen, | ||
pageSize, | ||
handleClick, | ||
currentPage, | ||
ORUGA_MOBILE_BREAKPOINT | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<!-- --------------------------------------------------------------------------------------------------------------- --> | ||
<!-- STYLE --> | ||
<!-- --------------------------------------------------------------------------------------------------------------- --> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.