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

App should correctly show fullscreen #814

Merged
merged 4 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions src/components/rmrk/Gallery/EmotionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="columns is-mobile is-multiline is-gapless nft-emotion__main mb-4" v-show="emoji">
<div
class="column nft-emotion__column"
v-for="emoji in emojis"
v-for="emoji in emotes"
:key="emoji.key"
>
<b-tag id="emoji-box" type="is-dark is-large">
Expand Down Expand Up @@ -30,11 +30,10 @@ interface Emoji {
}

@Component
export default class extends Vue {
private value2: any;
export default class EmotionList extends Vue {
@Prop() public emotions!: GroupedEmotion;

get emojis(): Emoji[] {
get emotes(): Emoji[] {
return Object.entries(this.emotions).map(([key, emotions]) => ({
key,
count: emotions.length,
Expand Down
13 changes: 10 additions & 3 deletions src/components/rmrk/Gallery/GalleryItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="columns">
<div class="image-wrapper">
<button id="theatre-view" @click="toggleView" v-if="!isLoading && imageVisible">{{ viewMode === 'default' ? $t('theatre') : $t('default') }} {{$t('view')}}</button>
<div class="column" :class="{ 'is-12': viewMode === 'theatre', 'is-6 is-offset-3': viewMode === 'default'}">
<div class="column" :class="{ 'is-12 is-theatre': viewMode === 'theatre', 'is-6 is-offset-3': viewMode === 'default'}">
<div class="image-preview has-text-centered" :class="{fullscreen: isFullScreenView}">
<b-image
v-if="!isLoading && imageVisible && !meta.animation_url"
Expand Down Expand Up @@ -229,6 +229,10 @@ export default class GalleryItem extends Vue {
this.isLoading = false;
}

onImageError(e: any) {
console.warn('Image error',e)
}

public async fetchMetadata() {
// console.log(this.nft);

Expand Down Expand Up @@ -342,6 +346,7 @@ hr.comment-divider {
display: none;
}


.image-preview {
&.fullscreen {
position: fixed;
Expand All @@ -354,13 +359,15 @@ hr.comment-divider {

img.fullscreen-image {
display: block;
width: 100% !important;
height: auto !important;
object-fit: contain;
width: 100%;
height: 100%;
overflow:auto;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, 0);
overflow-y: hidden;
}

.image {
Expand Down
3 changes: 2 additions & 1 deletion src/components/rmrk/Gallery/PriceChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import { LineChart } from 'echarts/charts';
import { UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
import { TooltipComponent } from 'echarts/components';
import { DataZoomComponent } from 'echarts/components';

ECharts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition, TooltipComponent]);
ECharts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition, TooltipComponent, DataZoomComponent]);

// type EChartsOption = ECharts.ComposeOption<
// GridComponentOption | LineSeriesOption
Expand Down
18 changes: 13 additions & 5 deletions src/components/rmrk/Media/ImageMedia.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<b-image
:src="src"
:alt="mimeType"
ratio="1by1"
></b-image>
<figure class="image is-square nft-image">
<img class="image-media__image" :src="src" :alt="mimeType" />
</figure>
</template>

<script lang="ts" >
Expand All @@ -14,3 +12,13 @@ export default class ImageMedia extends Vue {
@Prop() public mimeType!: string;
}
</script>

<style scoped>
figure > img.image-media__image {
object-fit: cover;
}

.is-theatre .image-media__image {
object-fit: contain;
}
</style>