diff --git a/.github/workflows/pr-conflicts-tagger.yml b/.github/workflows/pr-conflicts-tagger.yml new file mode 100644 index 00000000..a493f328 --- /dev/null +++ b/.github/workflows/pr-conflicts-tagger.yml @@ -0,0 +1,21 @@ +name: "Pull Requests Merge Conflicts Tagger" +on: + # So that PRs touching the same files as the push are updated + push: + # So that the `dirtyLabel` is removed if conflicts are resolve + # We recommend `pull_request_target` so that github secrets are available. + # In `pull_request` we wouldn't be able to change labels of fork PRs + pull_request_target: + types: [synchronize] + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: check if prs are dirty + uses: eps1lon/actions-label-merge-conflict@v3 + with: + dirtyLabel: "PR: needs rebase" + repoToken: "${{ secrets.GITHUB_TOKEN }}" + commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." +# commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." \ No newline at end of file diff --git a/package.json b/package.json index 5c991cff..c1dbcf90 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "release": "node ./scripts/release.mjs" }, "dependencies": { + "@github/paste-markdown": "^1.5.3", "@it-tools/bip39": "^0.0.4", "@it-tools/oggen": "^1.3.0", "@regexper/render": "^1.0.0", diff --git a/src/tools/index.ts b/src/tools/index.ts index 388cfaf4..f5a7d8b8 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -12,6 +12,7 @@ import { tool as jsonToXml } from './json-to-xml'; import { tool as regexTester } from './regex-tester'; import { tool as regexMemo } from './regex-memo'; import { tool as markdownToHtml } from './markdown-to-html'; +import { tool as pasteAsMarkdown } from './paste-as-markdown'; import { tool as pdfSignatureChecker } from './pdf-signature-checker'; import { tool as numeronymGenerator } from './numeronym-generator'; import { tool as macAddressGenerator } from './mac-address-generator'; @@ -184,6 +185,7 @@ export const toolsByCategory: ToolCategory[] = [ textDiff, numeronymGenerator, asciiTextDrawer, + pasteAsMarkdown, ], }, { diff --git a/src/tools/paste-as-markdown/index.ts b/src/tools/paste-as-markdown/index.ts new file mode 100644 index 00000000..e9394f04 --- /dev/null +++ b/src/tools/paste-as-markdown/index.ts @@ -0,0 +1,12 @@ +import { Markdown } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Paste as Markdown', + path: '/paste-as-markdown', + description: 'Paste cells/tables and links from clipboard content as Markdown', + keywords: ['paste', 'cell', 'table', 'links', 'md', 'markdown'], + component: () => import('./paste-as-markdown.vue'), + icon: Markdown, + createdAt: new Date('2024-07-14'), +}); diff --git a/src/tools/paste-as-markdown/paste-as-markdown.vue b/src/tools/paste-as-markdown/paste-as-markdown.vue new file mode 100644 index 00000000..fecdc70e --- /dev/null +++ b/src/tools/paste-as-markdown/paste-as-markdown.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/ui/c-input-text/c-input-text.vue b/src/ui/c-input-text/c-input-text.vue index b5f423d2..c49fbf53 100644 --- a/src/ui/c-input-text/c-input-text.vue +++ b/src/ui/c-input-text/c-input-text.vue @@ -137,6 +137,8 @@ onMounted(() => { defineExpose({ inputWrapperRef, + textareaRef, + inputRef, focus, blur, });