Lots of clean up to get Sponsorships working. Need to add the edit next.
This commit is contained in:
58
src/main.ts
58
src/main.ts
@@ -1,9 +1,7 @@
|
||||
import { ae } from 'aether_npm_lib';
|
||||
import './app.css';
|
||||
import App from './App.svelte';
|
||||
import Archives from './0_archives__main.svelte';
|
||||
import Events from './0_events__main.svelte';
|
||||
import Posts from './0_posts__main.svelte';
|
||||
// import App from './App.svelte';
|
||||
import Sponsorships from './0_sponsorships__main.svelte';
|
||||
|
||||
let url_params = ae.util.get_url_params();
|
||||
// console.log(url_params);
|
||||
@@ -15,50 +13,18 @@ if (document.getElementById('app')) {
|
||||
});
|
||||
}
|
||||
|
||||
if (document.querySelector('.svelte_target.idaa_archives_main')) {
|
||||
const archives_main_app = new Archives({
|
||||
target: document.querySelector('.svelte_target.idaa_archives_main'),
|
||||
props: {
|
||||
'archive_id': url_params.archive_id,
|
||||
'novi_uuid': (url_params.uuid ? url_params.uuid : false),
|
||||
'novi_email': decodeURIComponent(url_params.email), // decodeURIComponent() is needed because the email is passed in as a url param. Should this be takenc are of by the ae.util.get_url_params() function?
|
||||
'novi_full_name': decodeURIComponent(url_params.full_name),
|
||||
'novi_admin_li': ['2b078deb-b4e7-4203-99da-9f7cd62159a5'],
|
||||
'novi_trusted_li': ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'],
|
||||
'results_limit_administrator': 75,
|
||||
'results_limit_trusted': 50,
|
||||
'results_limit_authenticated': 25,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (document.querySelector('.svelte_target.idaa_events_main')) {
|
||||
const events_main_app = new Events({
|
||||
target: document.querySelector('.svelte_target.idaa_events_main'),
|
||||
if (document.querySelector('.svelte_target.ae_sponsorships_main')) {
|
||||
const sponsorships_main_app = new Sponsorships({
|
||||
target: document.querySelector('.svelte_target.ae_sponsorships_main'),
|
||||
props: {
|
||||
'event_id': url_params.event_id,
|
||||
'novi_uuid': (url_params.uuid ? url_params.uuid : false),
|
||||
'novi_email': decodeURIComponent(url_params.email), // decodeURIComponent() is needed because the email is passed in as a url param. Should this be takenc are of by the ae.util.get_url_params() function?
|
||||
'novi_full_name': decodeURIComponent(url_params.full_name),
|
||||
'novi_admin_li': ['2b078deb-b4e7-4203-99da-9f7cd62159a5'],
|
||||
'novi_trusted_li': ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'],
|
||||
'results_limit_administrator': 75,
|
||||
'results_limit_trusted': 50,
|
||||
'results_limit_authenticated': 25,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (document.querySelector('.svelte_target.idaa_posts_main')) {
|
||||
const posts_main_app = new Posts({
|
||||
target: document.querySelector('.svelte_target.idaa_posts_main'),
|
||||
props: {
|
||||
'post_id': url_params.post_id,
|
||||
'novi_uuid': (url_params.uuid ? url_params.uuid : false),
|
||||
'novi_email': url_params.email,
|
||||
'novi_full_name': url_params.full_name,
|
||||
'novi_admin_li': ['2b078deb-b4e7-4203-99da-9f7cd62159a5'],
|
||||
'novi_trusted_li': ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'],
|
||||
// NOTE: decodeURIComponent() is needed because the value is passed in as a url param. Should this be taken care of by the ae.util.get_url_params() function?
|
||||
'sponsorship_id': url_params.sponsorship_id,
|
||||
'user': decodeURIComponent(url_params.email),
|
||||
'key': (url_params.key ? url_params.key : false),
|
||||
// 'results_limit_administrator': 75,
|
||||
// 'results_limit_trusted': 50,
|
||||
// 'results_limit_authenticated': 25,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user