Skip to content

Commit

Permalink
fix default order of templates
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Feb 26, 2024
1 parent 9fc32fb commit 67ca02a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/copy-paster/background/default-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { Storage } from 'webextension-polyfill'
import { Template } from '../types'
import CopyPasterBackground from '.'
import { ImageSupportInterface } from 'src/image-support/background/types'
import { DEFAULT_SPACE_BETWEEN } from '@worldbrain/memex-common/lib/utils/item-ordering'

export const PERFORMED_STORAGE_FLAG = '@TextExport-default_templates_inserted_1'

export const JUST_URL: Template = {
id: 1,
title: 'Page URL',
isFavourite: false,
order: 1000000000,
order: DEFAULT_SPACE_BETWEEN * 1,
outputFormat: 'markdown',
code: `{{{PageUrl}}}`,
}
Expand All @@ -19,7 +20,7 @@ export const URL_AND_TITLE: Template = {
id: 2,
title: 'Page URL & Title',
isFavourite: false,
order: 2000000000,
order: DEFAULT_SPACE_BETWEEN * 2,
outputFormat: 'markdown',
code: `{{{PageTitle}}}
{{{PageUrl}}}`,
Expand All @@ -29,7 +30,7 @@ export const ROAM_MD_TEMPLATE: Template = {
id: 3,
title: 'Roam Template',
isFavourite: false,
order: 3000000000,
order: DEFAULT_SPACE_BETWEEN * 3,
outputFormat: 'rich-text',
code: `[[{{{PageTitle}}}]]
- url:: {{{PageUrl}}}
Expand Down Expand Up @@ -57,7 +58,7 @@ export const TANA_PASTE_TEMPLATE: Template = {
id: 4,
title: 'Tana Paste Template',
isFavourite: false,
order: 4000000000,
order: DEFAULT_SPACE_BETWEEN * 4,
outputFormat: 'markdown',
code: `%%tana%%
- {{{PageTitle}}}
Expand All @@ -83,7 +84,7 @@ export const NOTION_MD_TEMPLATE: Template = {
id: 5,
title: 'Notion Template',
isFavourite: false,
order: 5000000000,
order: DEFAULT_SPACE_BETWEEN * 5,
outputFormat: 'markdown',
code: `
[{{{PageTitle}}}]({{{PageUrl}}})
Expand All @@ -110,7 +111,7 @@ export const OBSIDIAN_MD_TEMPLATE: Template = {
id: 6,
title: 'Obsidian Template',
isFavourite: false,
order: 6000000000,
order: DEFAULT_SPACE_BETWEEN * 6,
outputFormat: 'rich-text',
code: `
- [[{{{PageTitle}}}]]
Expand Down Expand Up @@ -138,7 +139,7 @@ export const LOGSEQ_MD_TEMPLATE: Template = {
id: 7,
title: 'Logseq Template',
isFavourite: false,
order: 7000000000,
order: DEFAULT_SPACE_BETWEEN * 7,
outputFormat: 'markdown',
code: `[[{{{PageTitle}}}]]
- url:: {{{PageUrl}}}
Expand Down Expand Up @@ -166,7 +167,7 @@ export const HTML_TEMPLATE: Template = {
id: 8,
title: 'HTML',
isFavourite: false,
order: 8000000000,
order: DEFAULT_SPACE_BETWEEN * 8,
outputFormat: 'markdown',
code: `<a target="_blank" href="{{{PageUrl}}}">{{{PageTitle}}}</a>
<ul>
Expand Down

0 comments on commit 67ca02a

Please sign in to comment.