@christianriedl/media 1.0.160 → 1.0.161

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.160",
3
+ "version": "1.0.161",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch, StyleValue } from 'vue';
3
+ import type { ComponentPublicInstance } from 'vue';
3
4
  import { useRouter } from 'vue-router';
4
5
  import { IAppState, Helper, EDevice, EScope, appStateSymbol, IAppConfig, appConfigSymbol } from '@christianriedl/utils';
5
6
  import { Authorize, authorizeSymbol } from '@christianriedl/rest';
@@ -42,7 +43,7 @@
42
43
  const downloadVisible = computed(() => playingTrackUrl.value && !isMobile);
43
44
  const audio = ref<HTMLAudioElement | null>(null);
44
45
  const paused = ref(false);
45
- const listhead = ref<any>(null);
46
+ const listhead = ref<ComponentPublicInstance | null>(null);
46
47
  const positionText = computed(() => {
47
48
  if (playingTrack.value) {
48
49
  if (playingTrack.value.duration > 0)
@@ -102,8 +103,8 @@
102
103
  function computeListHeight() {
103
104
  nextTick(() => {
104
105
  let height = appState.bodyHeight.value;
105
- if (listhead.value && listhead.value._.vnode && listhead.value._.vnode.el) {
106
- height = height - listhead.value._.vnode.el.clientHeight;
106
+ if (listhead.value) {
107
+ height = height - (listhead.value.$el as HTMLElement).clientHeight;
107
108
  }
108
109
  listHeight.value = height;
109
110
  })
@@ -34,7 +34,7 @@
34
34
  const downloadFolder = ref<IMediaFolder | null>(null);
35
35
  const selectedYear = ref<number | undefined>(undefined);
36
36
  const selectedName = ref<string | undefined>(undefined);
37
- const scrollElement = ref<any | null>(null);
37
+ const scrollElement = ref<ComponentPublicInstance | null>(null);
38
38
 
39
39
  window.addEventListener('popstate', onPopState);
40
40
  function onPopState(event: any) {
@@ -72,7 +72,7 @@
72
72
  if (scrollTop > 0 && scrollElement.value) {
73
73
  nextTick(() => {
74
74
  // Scoll to this position
75
- const el = scrollElement.value?._?.vnode?.el;
75
+ const el = scrollElement.value.$el as HTMLElement;
76
76
  el?.scrollTo(0, scrollTop);
77
77
  });
78
78
  }
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { inject, ref, reactive, computed, onMounted, onUnmounted, nextTick, watch, StyleValue } from 'vue';
3
+ import type { ComponentPublicInstance } from 'vue';
3
4
  import { useRouter } from 'vue-router';
4
5
  import { IAppState, EDevice, EScope, appStateSymbol, appConfigSymbol, IValueText } from '@christianriedl/utils';
5
6
  import { Authorize, authorizeSymbol } from '@christianriedl/rest';
@@ -30,7 +31,7 @@
30
31
  const itemIndex = ref(0);
31
32
  const selected = ref<IMediaItem>({ name: 'Root', itemType: EItemType.Root } as IMediaFolder);
32
33
  const listHeight = ref(0);
33
- const listhead = ref<any>(null);
34
+ const listhead = ref<ComponentPublicInstance | null>(null);
34
35
  const dialog = ref(false);
35
36
  const showItem = ref<IVideoFile|null>(null);
36
37
  const uploadVisible = ref(false);
@@ -86,8 +87,8 @@
86
87
  function computeListHeight() {
87
88
  nextTick(() => {
88
89
  let height = appState.bodyHeight.value;
89
- if (listhead.value && listhead.value._.vnode && listhead.value._.vnode.el) {
90
- height = height - listhead.value._.vnode.el.clientHeight;
90
+ if (listhead.value) {
91
+ height = height - (listhead.value.$el as HTMLElement).clientHeight;
91
92
  }
92
93
  listHeight.value = height;
93
94
  })