Skip to content
Snippets Groups Projects
Commit 33cfdbdf authored by Alper Çakan's avatar Alper Çakan
Browse files

temp commit

parent 1914ebb1
No related tags found
No related merge requests found
......@@ -17,9 +17,10 @@
:key="medium.id"
class="medium-item"
draggable="true"
@dragstart="handleMediumItemDragStart(medium, index, $event)">
@dragstart="handleMediumItemDragStart(medium, $event)">
<div class="medium-thumbnail-container">
<Thumbnail :url="thumbnailUrls[index]" />
<Thumbnail :url="thumbnailUrls[index]"
:aspectRatio="medium.aspectRatio" />
</div>
<div class="medium-details">
......
......@@ -25,7 +25,7 @@ export default Vue.extend({
...mapState("editor/mediaLibrary", ["media"]),
thumbnailUrls(): string[] {
return this.media.map((x: IMedium) => URL.createObjectURL(x.thumbnail));
return this.media.map((x: IMedium) => x.thumbnail);
},
},
......
export default {
import { IMediaLibraryState } from "./types/media-library-state";
import { IMedium } from "@/store/modules/editor/types/medium";
export default {
getMediumById(state: IMediaLibraryState) {
return (id: string) => state.media.find((medium: IMedium) => medium.id === id);
},
};
......@@ -6,7 +6,97 @@ import mutations from "./mutations";
import { IMediaLibraryState } from "./types/media-library-state";
const state: IMediaLibraryState = {
media: [],
// media: [], TODO
media: [
{
aspectRatio: 16 / 9,
fps: 0,
id: "1",
length: 12312321,
name: "Media File #1",
thumbnail: "https://resmim.net/f/kgYS9A.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "2",
length: 12312321,
name: "Media File #2",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "3",
length: 12312321,
name: "Media File #3",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "4",
length: 12312321,
name: "Media File #4",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "5",
length: 12312321,
name: "Media File #4",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "6",
length: 12312321,
name: "Media File #4",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "7",
length: 12312321,
name: "Alper",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "8",
length: 12312321,
name: "Media File #4",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "9",
length: 12312321,
name: "Media File #4",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "10",
length: 12312321,
name: "Media File #4",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
{
aspectRatio: 16 / 9,
fps: 0,
id: "11",
length: 12312321,
name: "Media File #4",
thumbnail: "https://resmim.net/f/iupmXS.png?nocache",
},
],
};
const mediaLibrary: Module<IMediaLibraryState, IRootState> = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment