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

Massmint - Table + Edit Panel + Dialogs #5765

Merged
merged 58 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
cced80e
✨ basic structure
daiagi Apr 19, 2023
d1aa625
💄 mostly styling
daiagi Apr 19, 2023
75e0b6b
✨ Edit Panel
daiagi Apr 21, 2023
bebef23
Operations, Delete Modal
daiagi Apr 22, 2023
47b925a
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Apr 22, 2023
c84ca97
✨ Missing Info Modal
daiagi Apr 22, 2023
2dd08e1
more modals
daiagi Apr 22, 2023
93e009e
chore: translations
daiagi Apr 22, 2023
cbf52de
💄 image dimensions
daiagi Apr 22, 2023
9974d3f
💄 dark mode
daiagi Apr 22, 2023
54d3eac
🐛 colums on mobile too
daiagi Apr 22, 2023
77d56d2
✨ minting Modal
daiagi Apr 22, 2023
c891224
🔧 leftover translations
daiagi Apr 22, 2023
10a1be1
🔧 bug at close minting modal
daiagi Apr 22, 2023
a6f93c1
💄implement visual feedback
daiagi Apr 23, 2023
30f90a4
🐛 read files from inside folders
daiagi Apr 23, 2023
9ca1126
💄 equel width buttons
daiagi Apr 23, 2023
dd4969b
💄sidebar overlay color
daiagi Apr 23, 2023
2d81cdc
🔧 remove console log
daiagi Apr 23, 2023
a478660
:wrench: remove macos hidden files warning
daiagi Apr 23, 2023
4ee57ea
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Apr 25, 2023
a923b5d
Merge branch 'feature/massmint-overview-table' of https://github.com/…
daiagi Apr 25, 2023
b363420
Update components/massmint/EditPanel.vue
daiagi Apr 25, 2023
934aa6d
NeoButton Icon variant
daiagi Apr 25, 2023
442b3a3
resolve colums overrides
daiagi Apr 26, 2023
cb08277
remove list items
daiagi Apr 26, 2023
c108a52
status translations
daiagi Apr 26, 2023
ad508b2
NeoInput
daiagi Apr 26, 2023
0836465
💄 modals
daiagi Apr 26, 2023
830d21d
🔧 solve vmodel issue
daiagi Apr 26, 2023
7b2585c
prop fixes
daiagi Apr 26, 2023
2b84ab3
💄oruga css in NeoInput
daiagi Apr 27, 2023
2212ac7
🔧 placholder prop
daiagi Apr 27, 2023
2eae912
🔧 use form
daiagi Apr 27, 2023
ba17caf
:recycle: clickable icon => button
daiagi Apr 27, 2023
f7f0e58
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Apr 27, 2023
93a6cd9
remove vuse import
daiagi Apr 27, 2023
376cef7
remove unused import
daiagi Apr 27, 2023
61be9bc
add required
daiagi Apr 27, 2023
0ee40d0
remove eslint disable line
daiagi Apr 27, 2023
008be3a
💄 visual touchups
daiagi Apr 27, 2023
ebf6cd0
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Apr 27, 2023
0db9431
🔥 use new NeoAvatar component
daiagi Apr 27, 2023
b24a630
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi Apr 28, 2023
c68da2f
another round of 💄
daiagi Apr 29, 2023
30bbb2b
Merge branch 'main' into feature/massmint-overview-table
preschian May 3, 2023
ebe8504
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi May 5, 2023
2ea7eff
Merge branch 'main' into feature/massmint-overview-table
daiagi May 8, 2023
02fbe8d
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi May 9, 2023
e633faa
trigger
daiagi May 9, 2023
97d344f
trigger
daiagi May 9, 2023
ff0609b
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi May 10, 2023
e9c4dce
handle error fetching collections
daiagi May 10, 2023
21ab4a9
fix deepSource Issues
daiagi May 10, 2023
f66bfe2
deepSource
daiagi May 10, 2023
4c9a2b8
Merge branch 'main' of https://github.com/kodadot/nft-gallery into fe…
daiagi May 10, 2023
1cff53e
update imports
daiagi May 10, 2023
d5fb4e6
remove duplication
daiagi May 10, 2023
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
5 changes: 3 additions & 2 deletions components/massmint/ChooseCollectionDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ import {
NeoDropdownItem,
NeoIcon,
} from '@kodadot1/brick'
import { MintedCollection, useMassMint } from './useMassMint'
import { MintedCollection } from './types'
import { useCollectionForMint } from './useMassMint'

const { urlPrefix } = usePrefix()
const { isLogIn, accountId } = useAuth()

const { collectionsEntites } = useMassMint()
const { collectionsEntites } = useCollectionForMint()
const isDropdownopen = ref(false)
const selectedCollection = ref<MintedCollection>()
const emit = defineEmits(['selectedCollection'])
Expand Down
150 changes: 150 additions & 0 deletions components/massmint/EditPanel.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<template>
<NeoSidebar
fullheight
right
overlay
class="sidebar-width"
position="fixed"
:open="open"
:can-cancel="true"
:on-cancel="closePanel">
<div
class="border-left theme-background-color navbar-margin p-5 is-flex is-flex-direction-column is-align-items-center is-justify-content-space-between h-full">
<div
class="is-flex w-full is-flex-direction-column is-justify-content-space-between is-align-items-center">
<div class="is-flex w-full">
<div class="is-flex is-justify-content-center is-flex-grow-1">
{{ $t('massmint.edit') }} #{{ nft?.id }}
</div>

<NeoButton
icon="close"
size="medium"
variant="icon"
no-shadow
@click.native="closePanel" />
daiagi marked this conversation as resolved.
Show resolved Hide resolved
</div>
<NeoAvatar
:avatar="nft?.imageUrl"
:name="nft?.name || `${nft?.id}`"
:size="128"
:placeholder="placeholder"
class="my-5" />
<form class="w-full">
<NeoField
:label="$t('massmint.name')"
class="w-full mb-4 placholder-color"
:error="!name">
<NeoInput
v-model="name"
required
:placeholder="'*' + $t('massmint.required')" />
</NeoField>
<NeoField :label="$t('massmint.description')" class="w-full mb-4">
<NeoInput
v-model="description"
type="textarea"
has-counter
maxlength="500"
height="10rem" />
</NeoField>
<NeoField :label="$t('massmint.price')" class="w-full">
<div class="is-flex">
<NeoInput
v-model="price"
type="number"
step="any"
class="is-flex is-flex-grow-2" />
<div
class="border-top border-right border-bottom px-5 is-flex is-flex-grow-1 is-justify-content-center is-align-items-center">
KSM
</div>
</div>
</NeoField>
</form>
</div>
<NeoButton
class="w-full"
:label="$t('massmint.save')"
variant="k-accent"
:disabled="!name"
@click.native="save" />
</div>
</NeoSidebar>
</template>

<script setup lang="ts">
import {
NeoAvatar,
NeoButton,
NeoField,
NeoInput,
NeoSidebar,
} from '@kodadot1/brick'
import { NFT } from './types'
const { placeholder } = useTheme()

const props = defineProps<{
nft?: NFT
open: boolean
}>()

const internalNfT = ref<Partial<NFT>>({})
const name = computed({
get: () => internalNfT.value.name || props.nft?.name || '',
set: (value) => {
internalNfT.value = {
...internalNfT.value,
name: value,
}
},
})
const description = computed({
get: () => internalNfT.value.description || props.nft?.description || '',
set: (value) => {
internalNfT.value = {
...internalNfT.value,
description: value,
}
},
})
const price = computed({
get: () => internalNfT.value.price || props.nft?.price || '',
set: (value) => {
internalNfT.value = {
...internalNfT.value,
price: Number(value),
}
},
})

const emit = defineEmits(['close', 'save'])

const closePanel = () => {
internalNfT.value = {}
emit('close')
}

const save = () => {
const nft = {
...props.nft,
...internalNfT.value,
}
emit('save', nft)
closePanel()
}
</script>

<style lang="scss" scoped>
.navbar-margin {
margin-top: 83px;
}

.cover {
object-fit: cover;
}

.sidebar-width:deep .o-side__content {
width: 30%;
}
</style>
Loading