Skip to content

Commit

Permalink
docs-#239: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Nov 5, 2024
1 parent 23f960d commit 4d35c52
Showing 1 changed file with 37 additions and 30 deletions.
67 changes: 37 additions & 30 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,55 @@
import type {
CloudinaryUploadWidgetError,
CloudinaryUploadWidgetResults,
} from "@cloudinary-util/types";
import type { MediaType } from "../src/runtime/components/CldProductGallery.vue";
} from '@cloudinary-util/types'
import type { MediaType } from '../src/runtime/components/CldProductGallery.vue'
const { url } = useCldImageUrl({ options: { src: "/cld-sample-5.jpg" } });
console.log(url);
const { url } = useCldImageUrl({ options: { src: '/cld-sample-5.jpg' } })
console.log(url)
const { url: videoUrl } = useCldVideoUrl({
options: { src: "videos/mountain-stars" },
});
console.log(videoUrl);
options: { src: 'videos/mountain-stars' },
})
console.log(videoUrl)
const mediaAssets: { tag: string; mediaType?: MediaType }[] = [
{ tag: "electric_car_product_gallery_demo" }, // by default mediaType: "image"
{ tag: "electric_car_product_gallery_demo", mediaType: "video" },
{ tag: "electric_car_360_product_gallery_demo", mediaType: "spin" },
];
const mediaAssets: { tag: string, mediaType?: MediaType }[] = [
{ tag: 'electric_car_product_gallery_demo' }, // by default mediaType: "image"
{ tag: 'electric_car_product_gallery_demo', mediaType: 'video' },
{ tag: 'electric_car_360_product_gallery_demo', mediaType: 'spin' },
]
const buttonId = "open-btn";
const buttonId = 'open-btn'
const cldVideoRef = ref();
const cldVideoRef = ref()
const chapters = {
0: "Chapter 1",
6: "Chapter 2",
9: "Chapter 3",
};
0: 'Chapter 1',
6: 'Chapter 2',
9: 'Chapter 3',
}
const colors = {
accent: "#ff0000",
base: "#00ff00",
text: "#0000ff",
};
accent: '#ff0000',
base: '#00ff00',
text: '#0000ff',
}
const onResult = (results: CloudinaryUploadWidgetResults) => {
console.log("results", results);
};
console.log('results', results)
}
const onError = (
error: CloudinaryUploadWidgetError,
results: CloudinaryUploadWidgetResults
results: CloudinaryUploadWidgetResults,
) => {
console.log("error", error);
console.log("results", results);
};
console.log('error', error)
console.log('results', results)
}
</script>

<template>
<button :id="buttonId">Select Image or Video</button>
<button :id="buttonId">
Select Image or Video
</button>
<CldMediaLibrary
api-key="12345"
:button-id="buttonId"
Expand Down Expand Up @@ -90,7 +92,12 @@ const onError = (
:on-error="onError"
:on-result="onResult"
>
<button type="button" @click="open">Upload an Image</button>
<button
type="button"
@click="open"
>
Upload an Image
</button>
</CldUploadWidget>
<CldUploadButton
upload-preset="nuxt-cloudinary-unsigned"
Expand Down

0 comments on commit 4d35c52

Please sign in to comment.