Skip to content

Commit

Permalink
Merge branch 'hotfix/3.13.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Feb 26, 2024
2 parents c590f00 + 67ca02a commit db85fe6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "worldbrain-extension",
"version": "3.13.1",
"version": "3.13.2",
"homepage": "https://memex.garden",
"repository": "https://github.com/WorldBrain/Memex",
"scripts": {
Expand Down
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
2 changes: 1 addition & 1 deletion src/copy-paster/components/TemplateEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default class TemplateEditor extends PureComponent<
: this.props.onClickCancel
}
/>
{!this.props.isNew && !this.isSaveDisabled && (
{!this.isSaveDisabled && (
<PrimaryAction
label={
this.state.confirmDelete ? 'Delete' : 'Save'
Expand Down
4 changes: 2 additions & 2 deletions src/dashboard-refactor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ export class DashboardContainer extends StatefulUIElement<
}

if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
event.stopPropagation()
event.preventDefault()
if (!this.state.focusLockUntilMouseStart) {
document.addEventListener('mousemove', this.releaseLock, {
once: true,
Expand All @@ -198,8 +200,6 @@ export class DashboardContainer extends StatefulUIElement<
this.processEvent('changeFocusItem', {
direction: event.key === 'ArrowUp' ? 'up' : 'down',
})
event.stopPropagation()
event.preventDefault()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export default class PageResultView extends PureComponent<Props> {
if (this.props.isInFocus && !prevProps.isInFocus) {
this.setupKeyListener()
const itemBox = this.itemBoxRef.current
const resultBox = this.props.resultsRef.current
if (itemBox && !this.props.hoverState) {
itemBox.scrollIntoView({ block: 'center' })
}
Expand Down

0 comments on commit db85fe6

Please sign in to comment.