geer-builder 1.2.548 → 1.2.549

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <div class="video-management">
3
+ <div v-if="user_info">
4
+ <div class="row vids-container" style="text-align: center;">
5
+ <div class="col-6" v-for="data in table_data" :key="data.id">
6
+ <div style="padding:10px;" v-if="content_type == 'Video' && data.video_type == 'Youtube'">
7
+ <div>{{data.title}}</div>
8
+ <!-- <youtube style="height:300px;width:100%" :video-id="getId(data.url)" ref="youtube" @playing="playing"></youtube> -->
9
+ <iframe width="100%" height="300"
10
+ :src="`https://www.youtube.com/embed/`+getId(data.url)"
11
+ title="YouTube video player"
12
+ frameborder="0"
13
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
14
+ allowfullscreen>
15
+ </iframe>
16
+ </div>
17
+ <div style="padding:10px;" v-if="content_type == 'Video' && data.video_type == 'Vimeo'">
18
+ <div>{{data.title}}</div>
19
+ <!-- <vimeo-player ref="player" :video-id="getVimeoID(data.url)" :options="vimeo_options"></vimeo-player> -->
20
+ <iframe class="vim-iframe" width="100%" height="400px;" :src="`//player.vimeo.com/video/`+getVimeoID(data.url)" frameborder="0" allowfullscreen :onload="setStyle()"></iframe>
21
+ </div>
22
+ <div style="padding:10px;" v-if="content_type == 'Google Drive'">
23
+ <div><b>{{data.title}}</b></div>
24
+ <a :href="data.url">Google Drive Link</a>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+
30
+ </div>
31
+
32
+
33
+ </template>
34
+
35
+ <script>
36
+ import GlobalMixins from '../../mixins/global_mixins';
37
+ import DB_CONTENT_MANAGEMENT from '../../models/DB_CONTENT_MANAGEMENT';
38
+
39
+ import Vue from 'vue'
40
+ import VueYoutube from 'vue-youtube';
41
+ import { getIdFromUrl } from 'vue-youtube';
42
+ import { Youtube } from 'vue-youtube';
43
+
44
+ Vue.use(VueYoutube)
45
+
46
+ export default
47
+ {
48
+ mixins: [GlobalMixins],
49
+ components: { },
50
+ props:{
51
+ content_type: String
52
+ },
53
+ data:() =>
54
+ ({
55
+ db_content_management: new DB_CONTENT_MANAGEMENT(),
56
+ loading_table: true,
57
+ table_data: [],
58
+ vimeo_options:{height:'100%',width:"400px"}
59
+ }),
60
+ mounted()
61
+ {
62
+ this.getList();
63
+ },
64
+ computed:
65
+ {
66
+ },
67
+ methods:
68
+ {
69
+ async getList()
70
+ {
71
+ if(this.content_type == "Video")
72
+ {
73
+ await this.$bind('table_data', this.db_content_management.collection().where("type","==","Video").where("show","==",true).where("archive","==",false).orderBy('created_date', 'desc'));
74
+ }
75
+ else if(this.content_type == "Google Drive")
76
+ {
77
+ await this.$bind('table_data', this.db_content_management.collection().where("type","==","Google Drive").where("show","==",true).where("archive","==",false).orderBy('created_date', 'desc'));
78
+ }
79
+ this.loading_table = false;
80
+ },
81
+ getId(url)
82
+ {
83
+ var video_id = url.split('v=')[1];
84
+ var ampersandPosition = video_id.indexOf('&');
85
+ if(ampersandPosition != -1)
86
+ {
87
+ video_id = video_id.substring(0, ampersandPosition);
88
+ }
89
+
90
+ return video_id;
91
+ // return this.$youtube.getIdFromUrl(url)
92
+ },
93
+ playing()
94
+ {
95
+
96
+ },
97
+ getVimeoID(url)
98
+ {
99
+ var regExp = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/;
100
+
101
+ var match = url.match(regExp);
102
+
103
+ if (match)
104
+ {
105
+ return match[5];
106
+ }
107
+ else
108
+ {
109
+ return "error";
110
+ }
111
+
112
+ },
113
+ setStyle()
114
+ {
115
+
116
+ }
117
+ },
118
+ }
119
+ </script>
120
+
121
+ <style lang="scss">
122
+ .vids-container
123
+ {
124
+ // position: relative;
125
+ // overflow: hidden;
126
+ // width: 100%;
127
+ // padding-top: 56.25%;
128
+
129
+ .vimeo_container
130
+ {
131
+ iframe
132
+ {
133
+ width: 100%;
134
+ height: 400px;
135
+ }
136
+ }
137
+ }
138
+ </style>
@@ -0,0 +1,9 @@
1
+ import MODEL from './MODEL';
2
+
3
+ export default class DB_CONTENT_MANAGEMENT extends MODEL
4
+ {
5
+ constructor()
6
+ {
7
+ super(`content_management`);
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.548",
3
+ "version": "1.2.549",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {