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

Removing dependencies #2001

Merged
merged 6 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
46 changes: 0 additions & 46 deletions components/rmrk/Gallery/Collections.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import { Component, mixins, Vue, Watch } from 'nuxt-property-decorator'

import { CollectionWithMeta, Collection, Metadata } from '../service/scheme'
import { fetchCollectionMetadata, sanitizeIpfsUrl } from '../utils'
import Freezeframe from 'freezeframe'
import 'lazysizes'

import collectionListWithSearch from '@/queries/unique/collectionListWithSearch.graphql'
Expand Down Expand Up @@ -220,24 +219,6 @@ export default class Collections extends mixins(PrefixMixin) {
return this.collections as CollectionWithMeta[]
}

setFreezeframe() {
document.addEventListener('lazybeforeunveil', async (e) => {
const target = e.target as Image
const type = target.dataset.type as string
const isGif = type === 'image/gif'

if (isGif && !target.ffInitialized) {
new Freezeframe(target, {
trigger: false,
overlay: true,
warnings: false,
})

target.ffInitialized = true
}
})
}

onError(e: Event) {
const target = e.target as Image
target.src = this.placeholder
Expand Down Expand Up @@ -271,25 +252,6 @@ export default class Collections extends mixins(PrefixMixin) {
transform: scale(1);
}

.ff-container {
position: absolute;
top: 0;
height: 100%;
overflow: hidden;

.ff-overlay {
z-index: 2;
}

.ff-image,
.ff-canvas {
top: 50%;
height: auto;
transform: translateY(-50%);
transition: all 0.3s !important;
}
}

.has-text-overflow-ellipsis {
overflow: hidden;
white-space: nowrap;
Expand Down Expand Up @@ -324,10 +286,6 @@ export default class Collections extends mixins(PrefixMixin) {
border: 2px solid $primary-light;

&-image {
.ff-canvas {
border-radius: 8px;
}

&__emotes {
position: absolute;
background-color: $primary-light;
Expand Down Expand Up @@ -408,10 +366,6 @@ export default class Collections extends mixins(PrefixMixin) {
transition: transform 0.3s linear;
}

&:hover .ff-canvas {
transform: scale(1.1);
}

&:hover .card-image__emotes {
top: 15px;
right: 15px;
Expand Down
46 changes: 0 additions & 46 deletions components/rmrk/Gallery/Gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import { Component, Vue, mixins } from 'nuxt-property-decorator'

import { NFTWithMeta, NFT, Metadata, NFTMetadata } from '../service/scheme'
import { fetchMetadata, fetchNFTMetadata, getSanitizer } from '../utils'
import Freezeframe from 'freezeframe'
import 'lazysizes'
import { SearchQuery } from './Search/types'

Expand Down Expand Up @@ -289,24 +288,6 @@ export default class Gallery extends mixins(PrefixMixin) {
// return basicAggQuery(expandedFilter(this.searchQuery, this.nfts));
}

setFreezeframe() {
document.addEventListener('lazybeforeunveil', async (e) => {
const target = e.target as Image
const type = target.dataset.type as string
const isGif = type === 'image/gif'

if (isGif && !target.ffInitialized) {
const ff = new Freezeframe(target, {
trigger: false,
overlay: true,
warnings: false,
})

target.ffInitialized = true
}
})
}

onError(e: Event) {
const target = e.target as Image
target.src = this.placeholder
Expand Down Expand Up @@ -344,25 +325,6 @@ export default class Gallery extends mixins(PrefixMixin) {
transform: scale(1);
}

.ff-container {
position: absolute;
top: 0;
height: 100%;
overflow: hidden;

.ff-overlay {
z-index: 2;
}

.ff-image,
.ff-canvas {
top: 50%;
height: auto;
transform: translateY(-50%);
transition: all 0.3s !important;
}
}

.has-text-overflow-ellipsis {
overflow: hidden;
white-space: nowrap;
Expand Down Expand Up @@ -397,10 +359,6 @@ export default class Gallery extends mixins(PrefixMixin) {
border: 2px solid $primary-light;

&-image {
.ff-canvas {
border-radius: 8px;
}

&__emotes {
position: absolute;
background-color: $primary-light;
Expand Down Expand Up @@ -451,10 +409,6 @@ export default class Gallery extends mixins(PrefixMixin) {
transition: transform 0.3s linear;
}

&:hover .ff-canvas {
transform: scale(1.1);
}

&:hover .card-image__emotes {
top: 15px;
right: 15px;
Expand Down
7 changes: 0 additions & 7 deletions components/rmrk/Gallery/GalleryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ export default class GalleryCard extends mixins(AuthMixin) {
}

&__skeleton {
.ff-canvas {
border-radius: 8px;
}
transition: all 0.3s;

.card-image {
Expand Down Expand Up @@ -202,10 +199,6 @@ export default class GalleryCard extends mixins(AuthMixin) {
transform: scale(1.1) translateY(-5%);
}

&:hover .ff-canvas {
transform: scale(1.1) translateY(-50%);
}

&:hover .card-image__emotes {
top: 15px;
right: 15px;
Expand Down
7 changes: 7 additions & 0 deletions deps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ansi-regex
core-js
css-loader
json-schema
jsonpointer
nth-check
ws
12 changes: 1 addition & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,24 @@
"@polkadot/extension-inject": "^0.42.6",
"@polkadot/ui-keyring": "^0.89.2",
"@polkadot/vue-identicon": "^0.89.2",
"@types/file-saver": "^2.0.4",
"@vue-polkadot/minimark": "^0.0.1-rc.3",
"@vue-polkadot/vue-api": "0.0.49-rc.0",
"@vue-polkadot/vue-settings": "0.0.38-rc.10",
"ansi-regex": "^5.0.1",
"apollo-boost": "^0.4.9",
"axios": "^0.24.0",
"buefy": "^0.9.10",
"chart.js": "^3.7.0",
"chartjs-adapter-date-fns": "^2.0.0",
"chartjs-plugin-annotation": "^1.2.1",
"chartjs-plugin-zoom": "^1.1.1",
"core-js": "^3.20.3",
"css-loader": "4.3.0",
"date-fns": "^2.28.0",
"emoji-unicode": "^2.0.1",
"file-saver": "^2.0.5",
"freezeframe": "^5.0.2",
"glob-parent": "^6.0.2",
"graphql": "^15.5.0",
"graphql-tag": "^2.12.5",
"idb-keyval": "^5.1.5",
"json-schema": "^0.4.0",
"jsonpointer": "5.0.0",
"lazysizes": "^5.3.2",
"mingo": "^4.4.1",
"nth-check": "^2.0.1",
"nuxt": "^2.15.8",
"nuxt-buefy": "^0.4.13",
"nuxt-property-decorator": "^2.9.1",
Expand All @@ -96,8 +87,7 @@
"vue-social-sharing": "^3.0.8",
"vue-tippy": "^4.13.0",
"vuex": "^3.6.2",
"vuex-persist": "^3.1.3",
"ws": "^7.4.6"
"vuex-persist": "^3.1.3"
},
"devDependencies": {
"@babel/core": "^7.16.7",
Expand Down
46 changes: 0 additions & 46 deletions pages/rmrk/collections.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import {
sanitizeIpfsUrl,
} from '@/components/rmrk/utils'
import { SearchQuery } from '@/components/rmrk/Gallery/Search/types'
import Freezeframe from 'freezeframe'
import 'lazysizes'

import collectionListWithSearch from '@/queries/collectionListWithSearch.graphql'
Expand Down Expand Up @@ -249,24 +248,6 @@ export default class Collections extends mixins(PrefixMixin) {
return this.collections as CollectionWithMeta[]
}

setFreezeframe() {
document.addEventListener('lazybeforeunveil', async (e) => {
const target = e.target as Image
const type = target.dataset.type as string
const isGif = type === 'image/gif'

if (isGif && !target.ffInitialized) {
new Freezeframe(target, {
trigger: false,
overlay: true,
warnings: false,
})

target.ffInitialized = true
}
})
}

onError(e: Event) {
const target = e.target as Image
target.src = this.placeholder
Expand Down Expand Up @@ -299,25 +280,6 @@ export default class Collections extends mixins(PrefixMixin) {
transform: scale(1);
}

.ff-container {
position: absolute;
top: 0;
height: 100%;
overflow: hidden;

.ff-overlay {
z-index: 2;
}

.ff-image,
.ff-canvas {
top: 50%;
height: auto;
transform: translateY(-50%);
transition: all 0.3s !important;
}
}

.has-text-overflow-ellipsis {
overflow: hidden;
white-space: nowrap;
Expand Down Expand Up @@ -352,10 +314,6 @@ export default class Collections extends mixins(PrefixMixin) {
border: 2px solid $primary-light;

&-image {
.ff-canvas {
border-radius: 8px;
}

&__emotes {
position: absolute;
background-color: $primary-light;
Expand Down Expand Up @@ -436,10 +394,6 @@ export default class Collections extends mixins(PrefixMixin) {
transition: transform 0.3s linear;
}

&:hover .ff-canvas {
transform: scale(1.1);
}

&:hover .card-image__emotes {
top: 15px;
right: 15px;
Expand Down
Loading