diff --git a/lib/card.js b/lib/card.js index 4ac6700f..22baf101 100644 --- a/lib/card.js +++ b/lib/card.js @@ -78,36 +78,10 @@ module.exports = function newCard(task, _project, dontParse) { : { ...computed } } - getCardActions() { - // TODO Stop allowing links/actions from card config - // - const links = project.config.cardActions - const allLinks = this.frontMatter.links - ? [...links, ...this.frontMatter.links] - : [...links] - return allLinks.filter(({ display }) => { - if (!display) return true - try { - return display.call({ ...this.data, ...this.desc }) - } catch (e) { - console.error(e) - } - return false - }) - } - initActions() { - this.links = this.getCardActions().map( - ({ pack, icon, title, href }, index) => { - href = this.formatContent(href).content - title = this.formatContent(title).content - const action = JSON.stringify({ index }) - return { pack, icon, title, href, action } // Use index instead of action - } - ) - + this.links = [] if (!pluginManager) return - this.links = [...this.links, ...pluginManager.getCardActions(this)] + this.links = [...pluginManager.getCardActions(this)] } get projectPath() { diff --git a/lib/config.js b/lib/config.js index c2f440bb..34407f97 100644 --- a/lib/config.js +++ b/lib/config.js @@ -123,17 +123,6 @@ class Config { return this.settings.views } - get cardActions() { - return [..._get(this, 'settings.cards.links', [])] - } - - get boardActions() { - const settingsActions = _get(this, 'settings.actions', []).map((action) => { - return { name: action.name, action: action['function'] } - }) - return [...settingsActions] - } - get appendNewCardsTo() { return _get(this, 'settings.appendNewCardsTo', false) } diff --git a/lib/project.js b/lib/project.js index 089a028b..42c31268 100644 --- a/lib/project.js +++ b/lib/project.js @@ -307,12 +307,7 @@ module.exports = class WorkerProject extends Project { } get boardActions() { - // TODO Stop allowing board actions from config - // return [ - ...this.config.boardActions.map((item, index) => { - return { ...item, index } - }), ...this.pluginManager.getBoardActions(), ] }