Bug fix for Archive Content sorting. This should be applied everywhere.... fun. Also slight improvement to the IDAA media player. Now with Play and View text. and a new icon in the button.
This commit is contained in:
@@ -625,8 +625,8 @@ export async function process_ae_obj__archive_content_props({
|
|||||||
updated_on: obj.updated_on,
|
updated_on: obj.updated_on,
|
||||||
|
|
||||||
// Generated fields for sorting locally only
|
// Generated fields for sorting locally only
|
||||||
tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`,
|
tmp_sort_1: `${obj.original_datetime ?? ''}_${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${obj.sort?.toString().padStart(2, '0') ?? ''}`,
|
||||||
tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`,
|
tmp_sort_2: `${obj.group ?? ''}_${obj.original_datetime ?? ''}_${obj.priority ? '1' : '0'}_${obj.sort?.toString().padStart(2, '0') ?? ''}`,
|
||||||
// tmp_sort_a: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on ?? obj.created_on}`,
|
// tmp_sort_a: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on ?? obj.created_on}`,
|
||||||
// tmp_sort_b: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on}_${obj.created_on}`,
|
// tmp_sort_b: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on}_${obj.created_on}`,
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { run } from 'svelte/legacy';
|
|
||||||
|
|
||||||
// *** Import Svelte core
|
// *** Import Svelte core
|
||||||
import { onMount } from 'svelte';
|
|
||||||
import { fade } from 'svelte/transition';
|
import { fade } from 'svelte/transition';
|
||||||
|
|
||||||
// *** Import Aether core variables and functions
|
// *** Import Aether core variables and functions
|
||||||
|
|||||||
@@ -19,6 +19,34 @@ let ae_promises: key_val = $state({});
|
|||||||
// let ae_tmp: key_val = {};
|
// let ae_tmp: key_val = {};
|
||||||
// let ae_triggers: key_val = {};
|
// let ae_triggers: key_val = {};
|
||||||
|
|
||||||
|
// This should be moved to a better location. Turn into a function?
|
||||||
|
let file_icons:any = $state({})
|
||||||
|
file_icons['ac3'] = 'file-audio';
|
||||||
|
file_icons['aac'] = 'file-audio';
|
||||||
|
file_icons['csv'] = 'file-csv';
|
||||||
|
file_icons['doc'] = 'file-word';
|
||||||
|
file_icons['docx'] = 'file-word';
|
||||||
|
file_icons['gif'] = 'file-image';
|
||||||
|
file_icons['htm'] = 'file-code';
|
||||||
|
file_icons['html'] = 'file-code';
|
||||||
|
file_icons['jpeg'] = 'file-image';
|
||||||
|
file_icons['jpg'] = 'file-image';
|
||||||
|
file_icons['key'] = 'file-powerpoint';
|
||||||
|
file_icons['m4a'] = 'file-audio';
|
||||||
|
file_icons['mkv'] = 'file-video';
|
||||||
|
file_icons['mov'] = 'file-video';
|
||||||
|
file_icons['mp3'] = 'file-audio';
|
||||||
|
file_icons['mp4'] = 'file-video';
|
||||||
|
file_icons['pdf'] = 'file-pdf';
|
||||||
|
file_icons['png'] = 'file-image';
|
||||||
|
file_icons['ppt'] = 'file-powerpoint';
|
||||||
|
file_icons['pptx'] = 'file-powerpoint';
|
||||||
|
file_icons['txt'] = 'file-alt';
|
||||||
|
file_icons['wav'] = 'file-audio';
|
||||||
|
file_icons['webp'] = 'file-image';
|
||||||
|
file_icons['xls'] = 'file-excel';
|
||||||
|
file_icons['xlsx'] = 'file-excel';
|
||||||
|
file_icons['zip'] = 'file-archive';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@@ -122,10 +150,15 @@ let ae_promises: key_val = $state({});
|
|||||||
$idaa_sess.archives.show__modal_edit__archive_content_id = false;
|
$idaa_sess.archives.show__modal_edit__archive_content_id = false;
|
||||||
}}
|
}}
|
||||||
class="novi_btn btn btn-md btn-secondary preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500 transition"
|
class="novi_btn btn btn-md btn-secondary preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500 transition"
|
||||||
title={`View: ${idaa_archive_content_obj?.name}`}
|
title={`Play/View: ${idaa_archive_content_obj?.name}`}
|
||||||
>
|
>
|
||||||
<span class="fas fa-play m-1 text-neutral-800/80"></span>
|
<span class="fas fa-play m-1 text-neutral-800/80"></span>
|
||||||
Play/View
|
{#if (file_icons[idaa_archive_content_obj.file_extension] == 'file-audio' || file_icons[idaa_archive_content_obj.file_extension] == 'file-video')}
|
||||||
|
Play
|
||||||
|
{:else}
|
||||||
|
View
|
||||||
|
{/if}
|
||||||
|
<span class="fas fa-{ae_util.file_extension_icon(idaa_archive_content_obj?.file_extension)}"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access && idaa_archive_content_obj?.hosted_file_id}
|
{#if $ae_loc.trusted_access && idaa_archive_content_obj?.hosted_file_id}
|
||||||
@@ -139,7 +172,6 @@ let ae_promises: key_val = $state({});
|
|||||||
return_file: true,
|
return_file: true,
|
||||||
filename: idaa_archive_content_obj.filename,
|
filename: idaa_archive_content_obj.filename,
|
||||||
auto_download: true,
|
auto_download: true,
|
||||||
log_lvl: 0
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// window.postMessage({ type: 'download_event_file', hosted_file_id: idaa_archive_content_obj.hosted_file_id, filename: idaa_archive_content_obj.filename, auto_download: true }, '*');
|
// window.postMessage({ type: 'download_event_file', hosted_file_id: idaa_archive_content_obj.hosted_file_id, filename: idaa_archive_content_obj.filename, auto_download: true }, '*');
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ interface Props {
|
|||||||
|
|
||||||
let { lq__archive_content_obj }: Props = $props();
|
let { lq__archive_content_obj }: Props = $props();
|
||||||
|
|
||||||
|
// This should be moved to a better location. Turn into a function?
|
||||||
let file_icons:any = $state({})
|
let file_icons:any = $state({})
|
||||||
file_icons['ac3'] = 'file-audio';
|
file_icons['ac3'] = 'file-audio';
|
||||||
file_icons['aac'] = 'file-audio';
|
file_icons['aac'] = 'file-audio';
|
||||||
|
|||||||
Reference in New Issue
Block a user