Working on posts with linked content (hosted files).

This commit is contained in:
Scott Idem
2024-11-13 18:31:44 -05:00
parent 7040578ac5
commit 4fe6194450
9 changed files with 221 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
import type { key_val } from '$lib/ae_stores';
import { api } from '$lib/api';
import { db_posts } from "$lib/db_posts";
import { db_posts } from "$lib/ae_posts/db_posts";
import { load_ae_obj_li__post_comment } from "$lib/ae_posts/ae_posts__post_comment";
@@ -652,18 +652,22 @@ export function db_save_ae_obj_li__post(
topic: obj.topic,
topic_name: obj.topic_name,
title: obj.title,
name: obj.title,
title: obj.title, // Switching to name instead of title
// summary: obj.summary,
content: obj.content,
anonymous: obj.anonymous,
full_name: obj.full_name,
email: obj.email,
notify: obj.notify,
enable_comments: obj.enable_comments,
archive: obj.archive,
archive_on: obj.archive_on,
linked_li_json: obj.linked_li_json,
cfg_json: obj.cfg_json,
enable: obj.enable,

View File

@@ -1,7 +1,7 @@
import type { key_val } from '$lib/ae_stores';
import { api } from '$lib/api';
import { db_posts } from "$lib/db_posts";
import { db_posts } from "$lib/ae_posts/db_posts";
let ae_promises: key_val = {};
@@ -328,15 +328,17 @@ export function db_save_ae_obj_li__post_comment(
external_person_id: obj.external_person_id,
// name: obj.name,
name: obj.name,
title: obj.title, // Switching to name instead of title
// summary: obj.summary,
title: obj.title,
content: obj.content,
anonymous: obj.anonymous,
full_name: obj.full_name,
email: obj.email,
notify: obj.notify,
linked_li_json: obj.linked_li_json,
cfg_json: obj.cfg_json,
enable: obj.enable,

View File

@@ -1,11 +1,11 @@
import Dexie, { type Table } from 'dexie';
import type { key_val } from './ae_stores';
import type { key_val } from '../ae_stores';
// li = list
// kv = key value list
// Updated 2024-09-25
// Updated 2024-11-13
export interface Post {
id: string;
// id_random: string;
@@ -23,20 +23,22 @@ export interface Post {
topic?: string; // or topic_name?
topic_name?: string;
// name: null|string;
// summary?: null|string;
name: null|string;
title: null|string;
// summary?: null|string;
content?: null|string;
anonymous?: null|boolean;
full_name?: null|string;
email?: null|string;
notify?: null|boolean;
enable_comments?: null|boolean;
archive?: null|boolean;
archive_on?: Date;
linked_li_json?: null|string;
cfg_json?: null|key_val;
enable: null|boolean;
@@ -52,7 +54,8 @@ export interface Post {
post_comment_count?: number;
}
// Updated 2024-09-25
// Updated 2024-11-13
export interface Post_Comment {
id: string;
// id_random: string;
@@ -64,15 +67,17 @@ export interface Post_Comment {
external_person_id?: null|string; // For IDAA this is the Novi UUID
// name: null|string;
// summary?: null|string;
name: null|string;
title: null|string;
// summary?: null|string;
content?: null|string;
anonymous?: null|boolean;
full_name?: null|string;
email?: null|string;
notify?: null|boolean;
linked_li_json?: null|string;
cfg_json?: null|key_val;
enable: null|boolean;

View File

@@ -77,6 +77,8 @@ export interface Archive_Content {
content_html?: null|string;
content_json?: null|string;
// linked_li_json?: null|string; // For future use? linked content list instead of one content item
url?: null|string;
url_text?: null|string;