Getting ready to make the new hosted file management and tools live on dev. Then on prod...
This commit is contained in:
@@ -5,7 +5,7 @@ import { error } from '@sveltejs/kit';
|
||||
import { browser } from '$app/environment';
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
|
||||
export async function load({ params, parent }) { // route
|
||||
export async function load({ params, parent, url }) { // route
|
||||
let log_lvl: number = 0;
|
||||
|
||||
let data = await parent();
|
||||
@@ -24,6 +24,12 @@ export async function load({ params, parent }) { // route
|
||||
|
||||
// ae_acct.slct.account_id = account_id;
|
||||
|
||||
let qry_limit = url.searchParams.get('limit') ?? 19;
|
||||
if (!qry_limit) {
|
||||
console.log(`qry_limit +page.ts: The qry_limit was not found in the params!!!`);
|
||||
}
|
||||
ae_acct.slct.qry_limit = qry_limit;
|
||||
|
||||
if (browser) {
|
||||
let load_hosted_file_obj_li = core_func.load_ae_obj_li__hosted_file({
|
||||
api_cfg: ae_acct.api,
|
||||
@@ -31,7 +37,7 @@ export async function load({ params, parent }) { // route
|
||||
for_obj_id: account_id,
|
||||
enabled: 'enabled',
|
||||
hidden: 'not_hidden',
|
||||
limit: 99,
|
||||
limit: qry_limit,
|
||||
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'},
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
|
||||
@@ -16,6 +16,7 @@ import Comp_hosted_files_clip_video from '$lib/ae_core/ae_comp__hosted_files_cli
|
||||
import Comp_hosted_files_clip_video_li from '$lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte';
|
||||
|
||||
import Element_manage_hosted_file_li_wrap from '$lib/element_manage_hosted_file_li_all.svelte';
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
let log_lvl = 1;
|
||||
@@ -121,10 +122,30 @@ onMount(() => {
|
||||
>
|
||||
|
||||
<div class="border border-gray-200 p-2 rounded-lg">
|
||||
<h1 class="h1">Clip a Video</h1>
|
||||
<p>This AV utility will take an mp4 video file and create a clipped mp4 video file. This process may take a few seconds to a handful of minutes. Re-encoding will take longer. Please be patient while it is processing.</p>
|
||||
<h1 class="h1">Clip and Scale Video Files</h1>
|
||||
<p>This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can easily take a handful of minutes. The scaling option requires that the video be re-encoded. Please be patient while it is processing.</p>
|
||||
|
||||
<h2 class="h2">Step 1: Upload Video File</h2>
|
||||
<h2 class="h2">
|
||||
Step 1: Upload Video File or Select from Hosted Files
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning float-right"
|
||||
title="Toggle between Upload and Select from Hosted Files"
|
||||
onclick={() => {
|
||||
if ($ae_sess.files.add_to_use_files_method == 'upload') {
|
||||
$ae_sess.files.add_to_use_files_method = 'select';
|
||||
} else {
|
||||
$ae_sess.files.add_to_use_files_method = 'upload';
|
||||
}
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-exchange-alt m-1"></span>
|
||||
Upload/Select
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div class:hidden={$ae_sess.files.add_to_use_files_method == 'upload'}>
|
||||
<Comp_hosted_files_upload
|
||||
class_li="border border-gray-300 rounded-md p-2 bg-gray-100 hover:bg-gray-200"
|
||||
link_to_type="account"
|
||||
@@ -148,10 +169,23 @@ onMount(() => {
|
||||
</span>
|
||||
{/snippet}
|
||||
</Comp_hosted_files_upload>
|
||||
</div>
|
||||
|
||||
<div class:hidden={$ae_sess.files.add_to_use_files_method == 'select'}>
|
||||
<Element_manage_hosted_file_li_wrap
|
||||
link_to_type={'account'}
|
||||
link_to_id={$ae_loc?.account_id}
|
||||
allow_basic={true}
|
||||
allow_moderator={true}
|
||||
class_li={''}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 class="h2">
|
||||
Step 2: Clip Video
|
||||
|
||||
<h2 class="h2">Step 2: Clip Video</h2>
|
||||
{#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0}
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
@@ -162,6 +196,8 @@ onMount(() => {
|
||||
<span class="fas fa-broom m-1"></span>
|
||||
Clear Upload History
|
||||
</button>
|
||||
</h2>
|
||||
{#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0}
|
||||
<Comp_hosted_files_clip_video
|
||||
class_li="border border-gray-300 rounded-md p-2 bg-gray-100 hover:bg-gray-200"
|
||||
link_to_type="account"
|
||||
@@ -178,8 +214,9 @@ onMount(() => {
|
||||
{/if}
|
||||
|
||||
|
||||
<h2 class="h2">Step 3: Download Video Clips</h2>
|
||||
{#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0}
|
||||
<h2 class="h2">
|
||||
Step 3: Download Recently Processed Video Clips
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
@@ -190,6 +227,8 @@ onMount(() => {
|
||||
<span class="fas fa-broom m-1"></span>
|
||||
Clear Clip History
|
||||
</button>
|
||||
</h2>
|
||||
{#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0}
|
||||
<Comp_hosted_files_clip_video_li
|
||||
class_li="border border-gray-300 rounded-md p-2 bg-gray-100 hover:bg-gray-200"
|
||||
link_to_type="account"
|
||||
@@ -308,15 +347,15 @@ onMount(() => {
|
||||
|
||||
|
||||
|
||||
<h2 class="h2">Step X: Manage Files</h2>
|
||||
<!-- <h2 class="h2">Step X: Manage Hosted Files</h2> -->
|
||||
<!-- Show files for this account -->
|
||||
<Element_manage_hosted_file_li_wrap
|
||||
<!-- <Element_manage_hosted_file_li_wrap
|
||||
link_to_type={'account'}
|
||||
link_to_id={$ae_loc?.account_id}
|
||||
allow_basic={true}
|
||||
allow_moderator={true}
|
||||
container_class_li={''}
|
||||
/>
|
||||
/> -->
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user