feat: authorize notes for listed (#1823)
This commit is contained in:
@@ -16,6 +16,7 @@ export class SNNote extends DecryptedItem<NoteContent> implements NoteContentSpe
|
||||
public readonly preview_html: string
|
||||
public readonly spellcheck?: boolean
|
||||
public readonly noteType?: NoteType
|
||||
public readonly authorizedForListed: boolean
|
||||
|
||||
/** The package_info.identifier of the editor (not its uuid), such as org.standardnotes.advanced-markdown */
|
||||
public readonly editorIdentifier?: FeatureIdentifier | string
|
||||
@@ -31,6 +32,7 @@ export class SNNote extends DecryptedItem<NoteContent> implements NoteContentSpe
|
||||
this.spellcheck = this.payload.content.spellcheck
|
||||
this.noteType = this.payload.content.noteType
|
||||
this.editorIdentifier = this.payload.content.editorIdentifier
|
||||
this.authorizedForListed = this.payload.content.authorizedForListed || false
|
||||
|
||||
if (!this.noteType) {
|
||||
const prefersPlain = this.getAppDomainValueWithDefault(AppDataField.LegacyPrefersPlainEditor, false)
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface NoteContentSpecialized {
|
||||
spellcheck?: boolean
|
||||
noteType?: NoteType
|
||||
editorIdentifier?: FeatureIdentifier | string
|
||||
authorizedForListed?: boolean
|
||||
}
|
||||
|
||||
export type NoteContent = NoteContentSpecialized & ItemContent
|
||||
|
||||
@@ -39,6 +39,10 @@ export class NoteMutator extends DecryptedItemMutator<NoteContent> {
|
||||
this.mutableContent.editorIdentifier = identifier
|
||||
}
|
||||
|
||||
set authorizedForListed(authorizedForListed: boolean) {
|
||||
this.mutableContent.authorizedForListed = authorizedForListed
|
||||
}
|
||||
|
||||
toggleSpellcheck(): void {
|
||||
if (this.mutableContent.spellcheck == undefined) {
|
||||
this.mutableContent.spellcheck = false
|
||||
|
||||
Reference in New Issue
Block a user