Ver código fonte

build bug fix

ali 3 anos atrás
pai
commit
e6c2265fe1

+ 2 - 2
package.json

@@ -50,11 +50,11 @@
     "postcss-rtlcss": "^4.0.4",
     "process": "^0.11.10",
     "quasar": "^2.12.0",
-    "quasar-app-extension-q-page-builder": "^0.1.44",
+    "quasar-app-extension-q-page-builder": "^0.1.49",
     "quasar-crud": "^0.3.31",
     "quasar-form-builder": "^0.1.98",
     "quasar-template-builder": "^1.0.23",
-    "quasar-ui-q-page-builder": "^0.1.44",
+    "quasar-ui-q-page-builder": "^0.1.49",
     "socket.io-client": "^4.6.1",
     "sticky-sidebar-v2": "^1.1.1",
     "video.js": "^8.3.0",

+ 2 - 2
src/components/VideoPlayer.vue

@@ -51,7 +51,7 @@ import 'videojs-hls-quality-selector'
 import videojsBrand from 'videojs-brand'
 import fa from 'video.js/dist/lang/fa.json'
 import { APIGateway } from 'src/api/APIGateway.js'
-import { mixinAbrisham } from 'src/mixin/Mixins.js'
+// import { mixinAbrisham } from 'src/mixin/Mixins.js'
 import { PlayerSourceList } from 'src/models/PlayerSource.js'
 import videoJsResolutionSwitcher from 'src/assets/js/videoJsResolutionSwitcher.js'
 
@@ -60,7 +60,7 @@ import videoJsResolutionSwitcher from 'src/assets/js/videoJsResolutionSwitcher.j
 
 export default {
   name: 'VideoPlayer',
-  mixins: [mixinAbrisham],
+  // mixins: [mixinAbrisham],
   props: {
     hasVast: {
       type: Boolean,

+ 92 - 3
src/components/Widgets/ImageWidget/ImageWidget.vue

@@ -3,6 +3,7 @@
              :to="localOptions.action.route"
              :class="options.className"
              :href="localOptions.action.route"
+             class="ImageWidget"
              @click="onClickLink">
     <q-img :ref="imageRef"
            :src="getImageSource(options)"
@@ -63,11 +64,63 @@ export default {
           height: null,
           width: null,
           src: null
+        },
+        borderStyle: {
+          borderCssString: '',
+          borderRadiusCssString: ''
+        },
+        boxShadows: [],
+        cssHoverEffects: {
+          boxShadows: [],
+          borderStyle: {
+            borderCssString: '',
+            borderRadiusCssString: ''
+          },
+          transition: {
+            time: 0
+          },
+          transform: {
+            rotate: 0,
+            scaleX: 1,
+            scaleY: 1,
+            skewX: 0,
+            skewY: 0,
+            translateX: 0,
+            translateY: 0
+          }
         }
       }
     }
   },
   computed: {
+    shadows () {
+      const shadows = []
+      this.localOptions.boxShadows.forEach(shadow => {
+        shadows.push(shadow.cssString)
+      })
+
+      return shadows.join(', ')
+    },
+    hoverShadows () {
+      const shadows = []
+      if (!Array.isArray(this.localOptions.cssHoverEffects?.boxShadows)) {
+        return ''
+      }
+      this.localOptions.cssHoverEffects.boxShadows.forEach(shadow => {
+        shadows.push(shadow.cssString)
+      })
+
+      return shadows.join(', ')
+    },
+    cssHoverEffectsBorderStyle () {
+      const borderCssString = this.localOptions.cssHoverEffects?.borderStyle?.borderCssString ? this.localOptions.cssHoverEffects?.borderStyle?.borderCssString : ''
+      const borderRadiusCssString = this.localOptions.cssHoverEffects?.borderStyle?.borderRadiusCssString ? this.localOptions.cssHoverEffects?.borderStyle?.borderRadiusCssString : ''
+
+      return {
+        borderCssString,
+        borderRadiusCssString
+      }
+    },
     parentComponent() {
       if (this.localOptions.action.route) {
         if (this.isExternal(this.localOptions.action.route)) {
@@ -230,8 +283,44 @@ export default {
 }
 </script>
 
-<style>
-.cursor-pointer {
-  cursor: pointer;
+<style lang="scss" scoped>
+$shadows: v-bind('shadows');
+$hoverShadows: v-bind('hoverShadows');
+$border: v-bind('localOptions.borderStyle.borderCssString');
+$borderRadius: v-bind('localOptions.borderStyle.borderRadiusCssString');
+$hoverBorder: v-bind('cssHoverEffectsBorderStyle.borderCssString');
+$hoverBorderRadius: v-bind('cssHoverEffectsBorderStyle.borderRadiusCssString');
+$skewX: v-bind('localOptions.cssHoverEffects.transform.skewX');
+$skewY: v-bind('localOptions.cssHoverEffects.transform.skewY');
+$rotate: v-bind('localOptions.cssHoverEffects.transform.rotate');
+$scaleX: v-bind('localOptions.cssHoverEffects.transform.scaleX');
+$scaleY: v-bind('localOptions.cssHoverEffects.transform.scaleY');
+$translateX: v-bind('localOptions.cssHoverEffects.transform.translateX');
+$translateY: v-bind('localOptions.cssHoverEffects.transform.translateY');
+$transitionTime: v-bind('localOptions.cssHoverEffects.transition.time');
+
+.ImageWidget {
+  .q-img {
+    box-shadow: $shadows;
+    -webkit-box-shadow: $shadows;
+    -moz-box-shadow: $shadows;
+    -webkit-border-radius: $borderRadius;
+    -moz-border-radius: $borderRadius;
+    border: $border;
+  }
+  &:hover .q-img {
+    transform: rotate(calc(#{$rotate} * 1deg)) translate(calc(#{$translateX} * 1px), calc(#{$translateY} * 1px)) scale($scaleX, $scaleY) skew(calc(#{$skewX} * 1deg), calc(#{$skewY} * 1deg));
+    transition: all calc(#{$transitionTime} * 1s);
+    box-shadow: $hoverShadows;
+    -webkit-box-shadow: $hoverShadows;
+    -moz-box-shadow: $hoverShadows;
+    border-radius: $hoverBorderRadius;
+    -webkit-border-radius: $hoverBorderRadius;
+    -moz-border-radius: $hoverBorderRadius;
+    border: $hoverBorder;
+  }
+  .cursor-pointer {
+    cursor: pointer;
+  }
 }
 </style>

+ 25 - 1
src/components/Widgets/ImageWidget/OptionPanel.vue

@@ -1,5 +1,8 @@
 <template>
-  <option-panel-tabs v-model:options="localOptions">
+  <option-panel-tabs v-model:options="localOptions"
+                     :show-hover-effects-tab="true"
+                     :show-box-shadows-tab="true"
+                     :show-border-style-tab="true">
     <template #main-tab>
       <div class="option-panel-container">
         <div class="row q-col-gutter-md">
@@ -156,6 +159,27 @@ export default defineComponent({
           height: null,
           width: null,
           src: null
+        },
+        borderStyle: {},
+        boxShadows: [],
+        cssHoverEffects: {
+          boxShadows: [],
+          borderStyle: {
+            borderCssString: '',
+            borderRadiusCssString: ''
+          },
+          transition: {
+            time: 0
+          },
+          transform: {
+            rotate: 0,
+            scaleX: 1,
+            scaleY: 1,
+            skewX: 0,
+            skewY: 0,
+            translateX: 0,
+            translateY: 0
+          }
         }
       }
     }

+ 1 - 1
src/components/Widgets/Other/AllClassrooms/AllClassrooms.vue

@@ -576,7 +576,7 @@ export default {
       .RegisteredSign {
         display: none;
       }
-      ::v-deep(img) {
+      :deep(img) {
         border-radius: 10px;
       }
     }

+ 4 - 4
src/components/Widgets/Other/ClassroomCarousel/ClassroomCarousel.vue

@@ -283,8 +283,8 @@ export default {
     justify-content: space-between;
     padding-bottom: 33px;
   }
-  ::v-deep(.carousel__prev),
-  ::v-deep(.carousel__next) {
+  :deep(.carousel__prev),
+  :deep(.carousel__next) {
     width: 48px;
     height: 48px;
     background-color: #475F4A;
@@ -298,12 +298,12 @@ export default {
       //display: none;
     }
   }
-  ::v-deep(.carousel__prev) {
+  :deep(.carousel__prev) {
     right: auto;
     left: 0;
     transform: translate(-100%, -50%);
   }
-  ::v-deep(.carousel__next) {
+  :deep(.carousel__next) {
     left: auto;
     right: 0;
     transform: translate(100%, -50%);

+ 0 - 513
src/components/Widgets/UserSchedule/UserSchedule.vue

@@ -1,513 +0,0 @@
-<template>
-  <div class="schedule-page">
-    <!--   --------------------------------- chip group ------------------------- -->
-    <div class="row items-center">
-      <div ref="schedule" />
-      <div class="col-lg-4 col-md-5 col-12 text-md-right text-center d-flex flex-column justify-center header-label">
-        نمایش محتوا بر اساس برنامه مطالعاتی
-      </div>
-      <div class="d-flex col-lg-4 col-md-7 col-12 justify-center">
-        <chip-group v-model:value="currentMajorId"
-                    :items="majors.list"
-                    :loading="majors.loading"
-                    chip-title="رشته: " />
-      </div>
-    </div>
-    <!--   --------------------------------- video box &&  content list item ------------------------- -->
-    <div class="row q-col-gutter-md q-mb-lg">
-      <div class="col-12 col-md-8">
-        <!--        @has_watched="watched"-->
-        <video-box :content="watchingContent"
-                   @favorite="toggleFavor"
-                   @bookmarkTimestamp="bookmarkPostIsFavored" />
-        <div class="mobile-view">
-          <div class="current-content-title"
-               v-text="watchingContent.title" />
-          <comment-box v-model="watchingContent.comment"
-                       :doesnt-have-content="contentsIsEmpty"
-                       @input="saveComment" />
-        </div>
-      </div>
-      <div class="col-12 col-md-4">
-        <!--        <date-picker-->
-        <!--          v-model="dateValue"-->
-        <!--          element="null"-->
-        <!--          input-format="YYYY-MM-DD"-->
-        <!--          format="YYYY/MM/DD"-->
-        <!--          :show="datePickerVisibility"-->
-        <!--          @close="closeDatePicker"-->
-        <!--          @change="changeDate"-->
-        <!--        />-->
-        <content-list-component v-model="watchingContent"
-                                :loading="contents.loading"
-                                :afterLoad="contentsIsEmpty"
-                                :contents="contentsOfMajor"
-                                :header="{ title: currentDate, button: { title: 'روزهای دیگر' }}"
-                                type="video"
-                                @input="changeContent($event.id)"
-                                @headerAction="openDatePicker" />
-      </div>
-    </div>
-    <!--   --------------------------------- comment box &&  content list item ------------------------- -->
-    <div class="row q-col-gutter-md">
-      <div class="col-md-8 col-12">
-        <div class="desktop-view">
-          <div class="current-content-title"
-               v-text="watchingContent.title" />
-          <comment-box v-model="watchingContent.comment"
-                       :doesnt-have-content="contentsIsEmpty"
-                       @input="saveComment" />
-        </div>
-      </div>
-      <div class="col-md-4 col-12">
-        <content-list-component :header="{ title: 'جزوه ها' }"
-                                :loading="contents.loading"
-                                :afterLoad="contentsIsEmpty"
-                                :contents="contentsOfMajor"
-                                type="pamphlet"
-                                @input="changeContent($event.id)" />
-      </div>
-    </div>
-    <!--   --------------------------------- study plan ------------------------- -->
-    <study-plan-group v-model:value="currentMajorId"
-                      :majors="majors"
-                      class="q-mt-lg"
-                      :current-date="dateValue"
-                      @contentClicked="contentClicked"
-                      @scrollIsMoved="scrollIsMoved" />
-  </div>
-</template>
-
-<script>
-import moment from 'moment-jalaali'
-import { MajorList } from 'src/models/Major.js'
-import { mixinAbrisham } from 'src/mixin/Mixins.js'
-import { Content, ContentList } from 'src/models/Content.js'
-import chipGroup from 'components/DashboardAbrisham/chipGroup.vue'
-import videoBox from 'src/components/DashboardAbrisham/videoBox.vue'
-import CommentBox from 'src/components/DashboardAbrisham/CommentBox.vue'
-import ContentListComponent from 'components/DashboardAbrisham/ContentListComponent.vue'
-import StudyPlanGroup from 'src/components/DashboardAbrisham/studyPlanGroup/StudyPlanGroup.vue'
-// import VuePersianDatetimePicker from 'vue-persian-datetime-picker'
-
-export default {
-  name: 'UserSchedule',
-
-  components: {
-    StudyPlanGroup,
-    ContentListComponent,
-    CommentBox,
-    chipGroup,
-    videoBox
-    // datePicker: VuePersianDatetimePicker
-  },
-
-  mixins: [mixinAbrisham],
-
-  data() {
-    return {
-      majors: new MajorList(),
-      currentMajorId: null,
-      datePickerVisibility: false,
-      dateValue: '',
-      contents: new ContentList(),
-      watchingContent: new Content()
-    }
-  },
-
-  computed: {
-    datePickerInShamsi () {
-      const shamsi = moment(this.dateValue).format('jYYYY/jMM/jDD')
-      return shamsi
-    },
-
-    contentsOfMajor () {
-      if (!this.contents.list) return
-      return new ContentList(this.contents.list.filter(content => {
-        const selectedMajor = this.majors.list.find(major => major.id === this.currentMajorId)
-        return selectedMajor ? content.major.id === selectedMajor.id : content.major.id === this.currentMajorId
-      }))
-    },
-
-    currentDate () {
-      let string = 'فیلم های '
-      if (!this.dateValue) {
-        string = string.concat('امروز')
-      } else {
-        string = string.concat(this.datePickerInShamsi)
-      }
-      return string
-    },
-
-    contentsIsEmpty () {
-      return !this.contents.list.length && !this.contentsOfMajor.list.length
-    }
-  },
-
-  watch: {
-    currentMajorId() {
-      this.changeMajor()
-    }
-  },
-
-  created() {
-    this.loadInitialData()
-  },
-
-  methods: {
-
-    loadInitialData () {
-      this.loadMajors()
-      this.loadContents()
-    },
-
-    // getDataFromCache (cacheKey) {
-    //   return Assist.getAjaxCache(cacheKey)
-    // },
-
-    async loadMajors () {
-      this.majors.loading = true
-      const majors = await this.$apiGateway.abrisham.requestToGetMajors()
-      this.setMajors(majors)
-      this.loadCurrentMajor(majors)
-      this.setMajorsColor()
-    },
-
-    setMajors (majors) {
-      this.majors = new MajorList(majors)
-    },
-
-    loadCurrentMajor (majors) {
-      let selectedMajorId = null
-
-      majors.forEach(major => {
-        if (major.id === this.currentMajorId) {
-          selectedMajorId = major.id
-        }
-      })
-
-      if (!selectedMajorId) {
-        this.setCurrentMajor(majors[0].id)
-        return
-      }
-
-      this.setCurrentMajor(selectedMajorId)
-
-      this.majors.loading = false
-    },
-
-    setMajorsColor () {
-      this.majors.list.forEach(major => {
-        major.color = '#ff8f00'
-      })
-    },
-
-    setCurrentMajor (id) {
-      this.currentMajorId = id
-    },
-
-    // requestToGetMajors () {
-    //   return this.$axios.get('/api/v2/abrisham/majors')
-    // },
-
-    changeMajor () {
-      this.changeContentsList()
-    },
-
-    changeContentsList () {
-      this.loadWatchingContent()
-    },
-
-    async loadContents (params) {
-      this.contents.loading = true
-      const data = {
-        date: '',
-        content: null
-      }
-      Object.assign(data, params)
-      const response = await this.requestToGetContents()
-      const contents = response.data.data
-      this.SetContents(contents)
-      await this.loadContentsColor()
-      this.loadWatchingContent(data.content)
-    },
-
-    requestToGetContents (date) {
-      // return this.$axios.get('/api/v2/abrisham/whereIsKarvan', { params: { date } })
-      return this.$apiGateway.abrisham.whereIsKarvan({ params: { date } }) // 500 mide
-
-      // return {
-      //   data: {
-      //     data: [
-      //       {
-      //         id: 28960,
-      //         redirect_url: null,
-      //         type: 8,
-      //         section: {
-      //           id: 1,
-      //           name: 'تابلو راهنما'
-      //         },
-      //         title: 'جلسه صفر، معرفی دوره',
-      //         file: null,
-      //         duration: 181,
-      //         photo: 'https://nodes.alaatv.com/media/thumbnails/1128/1128000chiz.jpg',
-      //         is_free: 0,
-      //         order: 0,
-      //         major: {
-      //           id: 1,
-      //           name: 'ریاضی',
-      //           title: 'ریاضی',
-      //           selected: false
-      //         },
-      //         updated_at: '2021-11-20 14:44:23',
-      //         url: {
-      //           web: 'https://alaatv.com/c/28960',
-      //           api: 'https://alaatv.com/api/v2/c/28960'
-      //         },
-      //         redirect_code: null,
-      //         comments: [],
-      //         short_title: 'جلسه 0 پیله راه ابریشم زبان ',
-      //         has_watched: false,
-      //         content_type: {
-      //           id: 8,
-      //           display_name: 'فیلم',
-      //           name: 'video',
-      //           enable: null,
-      //           description: 'فیلم',
-      //           created_at: '2018-03-04 17:39:17',
-      //           updated_at: '2018-03-04 17:39:17'
-      //         },
-      //         is_favored: false,
-      //         author: {
-      //           id: 1210950,
-      //           first_name: 'مهدی',
-      //           last_name: 'چیذری',
-      //           photo: 'https://nodes.alaatv.com/upload/images/profile/1641631685_7539.jpg'
-      //         },
-      //         can_see: 0,
-      //         timepoints: null
-      //       },
-      //       {
-      //         id: 28961,
-      //         redirect_url: null,
-      //         type: 8,
-      //         section: {
-      //           id: 6,
-      //           name: 'درسنامه'
-      //         },
-      //         title: 'درسنامه پیله (قسمت اول)، زمان حال ساده و زمان حال استمراری',
-      //         file: null,
-      //         duration: 2005,
-      //         photo: 'https://nodes.alaatv.com/media/thumbnails/1128/1128001toto.jpg',
-      //         is_free: 0,
-      //         order: 1,
-      //         major: {
-      //           id: 2,
-      //           name: 'تجربی',
-      //           title: 'تجربی',
-      //           selected: false
-      //         },
-      //         updated_at: '2021-11-20 14:44:23',
-      //         url: {
-      //           web: 'https://alaatv.com/c/28961',
-      //           api: 'https://alaatv.com/api/v2/c/28961'
-      //         },
-      //         redirect_code: null,
-      //         comments: [],
-      //         short_title: 'جلسه 1 پیله راه ابریشم زبان ',
-      //         has_watched: false,
-      //         content_type: {
-      //           id: 8,
-      //           display_name: 'فیلم',
-      //           name: 'video',
-      //           enable: null,
-      //           description: 'فیلم',
-      //           created_at: '2018-03-04 17:39:17',
-      //           updated_at: '2018-03-04 17:39:17'
-      //         },
-      //         is_favored: false,
-      //         author: {
-      //           id: 1210950,
-      //           first_name: 'مهدی',
-      //           last_name: 'چیذری',
-      //           photo: 'https://nodes.alaatv.com/upload/images/profile/1641631685_7539.jpg'
-      //         },
-      //         can_see: 0,
-      //         timepoints: null
-      //       }
-      //     ]
-      //   }
-      // }
-    },
-
-    SetContents (contents) {
-      this.contents = new ContentList(contents)
-    },
-
-    async loadContentsColor () {
-      const lessonGroups = await this.$apiGateway.abrisham.getLessons().map((item) => {
-        return {
-          title: item.title,
-          lessons: item.lessons.list
-        }
-      })
-      this.setContentsColor(this.contents, lessonGroups)
-    },
-
-    setContentsColor (contents, lessonGroups) {
-      contents.list.forEach(content => {
-        lessonGroups.forEach(lessonGroup => {
-          if (lessonGroup.lessons) {
-            // const lesson = lessonGroup.lessons.find(lesson => lesson.title === content.inputData?.lesson_name)
-
-            // if (lessonGroup.lessons && lesson) {
-            //   content.color = lesson.color
-            //   return
-            // }
-
-            content.color = 'red'
-          }
-        })
-      })
-    },
-
-    loadWatchingContent (content) {
-      if (!content) {
-        content = this.getCurrentContent()
-      }
-
-      this.setWatchingContent(content)
-      this.contents.loading = false
-    },
-
-    setWatchingContent (content) {
-      this.watchingContent = new Content(content)
-    },
-
-    getCurrentContent () {
-      const currentContent = this.contentsOfMajor.list.find(content => content.is_current)
-      if (!currentContent) {
-        return this.contentsOfMajor.list[0]
-      }
-
-      return currentContent
-    },
-
-    getWatchingContent () {
-      return this.watchingContent
-    },
-
-    // requestToGetLessonsOfEachMajor () {
-    //   return this.$axios.get('/api/v2/abrisham/lessons')
-    // },
-
-    changeContent (id, content) {
-      const currentContent = this.findContent(id)
-      this.loadWatchingContent(currentContent)
-    },
-
-    findContent (id) {
-      return this.contents.list.find(content => parseInt(content.id) === parseInt(id))
-    },
-
-    async changeDate () {
-      await this.loadContents({ date: this.dateValue })
-    },
-
-    scrollIsMoved (val) {
-      if (val) {
-        this.$nextTick(() => {
-          this.$refs.schedule.scrollIntoView({ alignToTop: true, block: 'end', inline: 'start' })
-        })
-      }
-    },
-
-    async contentClicked (data) {
-      // const content = this.findContent(data.content.id)
-      const customData = {
-        date: data.date,
-        content: data.content
-      }
-      this.dateValue = data.date
-      this.$vuetify.goTo('.schedule-page')
-      await this.loadContents(customData)
-    },
-
-    closeDatePicker () {
-      this.datePickerVisibility = false
-    },
-
-    openDatePicker () {
-      this.datePickerVisibility = true
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.schedule-page {
-  margin: 0 60px;
-  @media screen and (max-width: 1904px) {
-    margin: 0 10px;
-  }
-  @media screen and (max-width: 960px) {
-    margin: 0;
-  }
-
-  .header-label {
-    font-size: 20px;
-    color: #3e5480;
-    font-weight: 500;
-    padding-right: 20px;
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    @media screen and (max-width: 1904px) {
-      padding-bottom: 15px !important;
-    }
-    @media screen and (max-width: 960px) {
-      padding-bottom: 10px !important;
-    }
-    @media screen and (max-width: 768px) {
-      padding-bottom: 20px !important;
-    }
-    @media screen and (max-width: 600px) {
-      padding-bottom: 15px !important;
-      font-size: 16px;
-    }
-  }
-
-  .current-content-title {
-    font-size: 20px;
-    font-weight: 500;
-    color: #3e5480;
-    margin-bottom: 21px;
-    @media screen and (max-width: 1920px) {
-      margin-bottom: 15px;
-    }
-    @media screen and (max-width: 768px) {
-      margin-bottom: 20px;
-    }
-    @media screen and (max-width: 576px) {
-      font-size: 16px;
-      margin-bottom: 10px;
-    }
-    @media screen and (max-width: 350px) {
-      margin-bottom: 5px;
-    }
-  }
-
-  .desktop-view {
-    display: block;
-    @media screen and (max-width: 959px) {
-      display: none;
-    }
-  }
-
-  .mobile-view {
-    display: none;
-    @media screen and (max-width: 959px) {
-      display: block;
-    }
-  }
-}
-</style>

+ 9 - 0
src/css/Theme/Widgets/banner.scss

@@ -0,0 +1,9 @@
+.q-banner {
+  background: transparent;
+  border-left: solid 4px #EAC38A;
+  padding-right: 8px;
+  min-height: 26px;
+  .q-banner__content {
+    font-size: 18px;
+  }
+}

+ 61 - 0
src/models/Banner.js

@@ -0,0 +1,61 @@
+import { Model, Collection } from 'js-abstract-model'
+
+class Banner extends Model {
+  constructor (data) {
+    super(data, [
+      { key: 'id' },
+      { key: 'title' },
+      { key: 'body' },
+      { key: 'photo' },
+      {
+        key: 'features',
+        default: {
+          xl: {
+            src: '',
+            width: '',
+            height: ''
+          },
+          lg: {
+            src: '',
+            width: '',
+            height: ''
+          },
+          md: {
+            src: '',
+            width: '',
+            height: ''
+          },
+          sm: {
+            src: '',
+            width: '',
+            height: ''
+          },
+          xs: {
+            src: '',
+            width: '',
+            height: ''
+          }
+        }
+      },
+      { key: 'link' },
+      { key: 'order' },
+      { key: 'ratio' },
+      { key: 'useAEEEvent' },
+      {
+        key: 'AEEEventBody',
+        default: {
+          id: '-',
+          name: '-',
+          creative: null,
+          position: null
+        }
+      }
+    ])
+  }
+}
+class BannerList extends Collection {
+  model () {
+    return Banner
+  }
+}
+export { Banner, BannerList }

+ 51 - 0
src/models/PlayerSource.js

@@ -0,0 +1,51 @@
+import { Model, Collection } from 'js-abstract-model'
+
+class PlayerSource extends Model {
+  constructor (data) {
+    super(data, [
+      {
+        key: 'src',
+        default: ''
+      },
+      {
+        key: 'type',
+        default: 'video/mp4'
+      },
+      {
+        key: 'label',
+        default: ''
+      },
+      {
+        key: 'caption',
+        default: ''
+      },
+      {
+        key: 'link',
+        default: ''
+      },
+      {
+        key: 'res',
+        default: ''
+      },
+      {
+        key: 'selected',
+        default: false
+      }
+    ])
+
+    if (!this.label && this.res) {
+      this.label = this.res
+    }
+    if (!this.src && this.link) {
+      this.src = this.link
+    }
+  }
+}
+
+class PlayerSourceList extends Collection {
+  model () {
+    return PlayerSource
+  }
+}
+
+export { PlayerSource, PlayerSourceList }

+ 9 - 9
yarn.lock

@@ -5394,12 +5394,12 @@ qs@6.11.0:
   dependencies:
     side-channel "^1.0.4"
 
-quasar-app-extension-q-page-builder@^0.1.44:
-  version "0.1.44"
-  resolved "https://registry.yarnpkg.com/quasar-app-extension-q-page-builder/-/quasar-app-extension-q-page-builder-0.1.44.tgz#3985de802f58a6fcf77ef3c12f4e179ac9776069"
-  integrity sha512-JtIwyyZzeGW7YCnxJ/VuEgticql94CjxC06DKIlQCfd6TpcPJseSWIpt9Itm0owDa6aZNM+0ymovjiCuRfRqgQ==
+quasar-app-extension-q-page-builder@^0.1.49:
+  version "0.1.49"
+  resolved "https://registry.yarnpkg.com/quasar-app-extension-q-page-builder/-/quasar-app-extension-q-page-builder-0.1.49.tgz#0a4cb3fce33869cc4aa32dbdda72d99c65fef85b"
+  integrity sha512-so4AnnXMXrty4dbgjZfp3+N35KqCah2iLRog9/ldajSurlWh9XG+msr0L3NGgjA+MSdekbsfRU7/exnIA/c6FQ==
   dependencies:
-    quasar-ui-q-page-builder "^0.1.44"
+    quasar-ui-q-page-builder "^0.1.49"
 
 quasar-crud@^0.3.31:
   version "0.3.31"
@@ -5436,10 +5436,10 @@ quasar-template-builder@^1.0.23:
     vue "^3.2.47"
     vuex "^4.1.0"
 
-quasar-ui-q-page-builder@^0.1.44:
-  version "0.1.44"
-  resolved "https://registry.yarnpkg.com/quasar-ui-q-page-builder/-/quasar-ui-q-page-builder-0.1.44.tgz#64fb4ecfe0931205dd59376782164984fab42502"
-  integrity sha512-2p1IEX2xU5vMUZthBaa0RDUNdW7u51nrTGY7/Jmvd3QiX1NsJ7S9xHMKMo98PczxTnQh7p/IkDJ/jnIeycjfNA==
+quasar-ui-q-page-builder@^0.1.49:
+  version "0.1.49"
+  resolved "https://registry.yarnpkg.com/quasar-ui-q-page-builder/-/quasar-ui-q-page-builder-0.1.49.tgz#c1e7a20f5ade493e0a6f76beee998a34f9307b93"
+  integrity sha512-RHTbh+cEn/Rh6FB3cy5Al+QhxOWmHuunwBYvVbje2rrMDmBZhQw69J2xL7FAjHf5kGFPYhJdxV6eL6sHz70EQw==
   dependencies:
     "@quasar/extras" "^1.16.1"
     "@vue/compiler-sfc" "^3.2.47"