Skip to content

Commit

Permalink
wip: rework page and site for draft v1 -d
Browse files Browse the repository at this point in the history
  • Loading branch information
arpowers committed Sep 20, 2024
1 parent 6c4adca commit b84e19d
Show file tree
Hide file tree
Showing 14 changed files with 433 additions and 276 deletions.
4 changes: 2 additions & 2 deletions @fiction/posts/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Post extends FictionObject<PostConfig> {
tags = vue.ref(this.settings.taxonomy?.filter(_ => _.type === 'tag') || [])
categories = vue.ref(this.settings.taxonomy?.filter(_ => _.type === 'category') || [])
authors = vue.ref(this.settings.authors || [])
sites = vue.ref(this.settings.sites || [])
sites = vue.shallowRef(this.settings.sites || [])
dateAt = vue.ref(this.settings.dateAt || new Date().toISOString())
userConfig = vue.ref(this.settings.userConfig || {})
isDirty = vue.ref(false)
Expand Down Expand Up @@ -90,7 +90,7 @@ export class Post extends FictionObject<PostConfig> {

this.saveTimeout = setTimeout(() => {
this.save({ mode: 'draft' }).catch(console.error) // Error handling
}, 2000) // Set a new timeout for 10 seconds
}, 2000) // Set a new timeout for 2 seconds
}

async save(args: { mode: 'publish' | 'draft' | 'schedule', publishAt?: string }) {
Expand Down
Loading

0 comments on commit b84e19d

Please sign in to comment.