-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
490 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
npm-debug.log | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"arrowParens": "always", | ||
"semi": true, | ||
"tabWidth": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## 0.1.0 - First Release | ||
|
||
- Every feature added | ||
- Every bug fixed |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"body": { | ||
"ctrl-alt-o": "wiki_links:toggle" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use babel"; | ||
|
||
import WikiLinksMessageDialog from "./wiki_links_message_dialog"; | ||
|
||
module.exports = { | ||
activate() { | ||
inkdrop.components.registerClass(WikiLinksMessageDialog); | ||
inkdrop.layouts.addComponentToLayout("modal", "WikiLinksMessageDialog"); | ||
}, | ||
|
||
deactivate() { | ||
inkdrop.layouts.removeComponentFromLayout( | ||
"modal", | ||
"WikiLinksMessageDialog" | ||
); | ||
inkdrop.components.deleteClass(WikiLinksMessageDialog); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"use babel"; | ||
|
||
import * as React from "react"; | ||
import { CompositeDisposable } from "event-kit"; | ||
|
||
export default class WikiLinksMessageDialog extends React.Component { | ||
componentWillMount() { | ||
// Events subscribed to in Inkdrop's system can be easily cleaned up with a CompositeDisposable | ||
this.subscriptions = new CompositeDisposable(); | ||
|
||
// Register command that toggles this dialog | ||
this.subscriptions.add( | ||
inkdrop.commands.add(document.body, { | ||
"wiki_links:toggle": () => this.toggle(), | ||
}) | ||
); | ||
} | ||
|
||
componentWillUnmount() { | ||
this.subscriptions.dispose(); | ||
} | ||
|
||
render() { | ||
const { MessageDialog } = inkdrop.components.classes; | ||
return ( | ||
<MessageDialog ref="dialog" title="WikiLinks"> | ||
WikiLinks was toggled! | ||
</MessageDialog> | ||
); | ||
} | ||
|
||
toggle() { | ||
console.log("WikiLinks was toggled!"); | ||
const { dialog } = this.refs; | ||
if (!dialog.isShown) { | ||
dialog.showDialog(); | ||
} else { | ||
dialog.dismissDialog(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"context-menu": { | ||
".CodeMirror": [ | ||
{ | ||
"label": "Toggle wiki_links", | ||
"command": "wiki_links:toggle" | ||
} | ||
] | ||
}, | ||
"menu": [ | ||
{ | ||
"label": "Plugins", | ||
"submenu": [ | ||
{ | ||
"label": "wiki_links", | ||
"submenu": [ | ||
{ | ||
"label": "Toggle", | ||
"command": "wiki_links:toggle" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "wiki_links", | ||
"main": "./lib/wiki_links", | ||
"version": "0.1.0", | ||
"description": "Bring wiki style links to Inkdrop.", | ||
"keywords": [], | ||
"repository": "https://github.com/ryanpcmcquen/inkdrop_wiki_links", | ||
"license": "MPL-2.0", | ||
"engines": { | ||
"inkdrop": "^5.x" | ||
}, | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.wiki_links { | ||
} |