From 5488541def1e82d2c6fea539ec03ec0bc4dd99b6 Mon Sep 17 00:00:00 2001 From: Brent Claessens <34712836+YaMoef@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:00:47 +0200 Subject: [PATCH] feat(affine): add recipe (#593) --- recipes/affine/icon.svg | 1 + recipes/affine/index.js | 1 + recipes/affine/package.json | 10 ++++++++++ recipes/affine/webview.js | 16 ++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 recipes/affine/icon.svg create mode 100644 recipes/affine/index.js create mode 100644 recipes/affine/package.json create mode 100644 recipes/affine/webview.js diff --git a/recipes/affine/icon.svg b/recipes/affine/icon.svg new file mode 100644 index 000000000..8f415a227 --- /dev/null +++ b/recipes/affine/icon.svg @@ -0,0 +1 @@ +Affine Streamline Icon: https://streamlinehq.comAFFiNE \ No newline at end of file diff --git a/recipes/affine/index.js b/recipes/affine/index.js new file mode 100644 index 000000000..2980d0b19 --- /dev/null +++ b/recipes/affine/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Affine extends Ferdium {}; diff --git a/recipes/affine/package.json b/recipes/affine/package.json new file mode 100644 index 000000000..953bd1569 --- /dev/null +++ b/recipes/affine/package.json @@ -0,0 +1,10 @@ +{ + "id": "affine", + "name": "Affine", + "version": "1.0.0", + "license": "MIT", + "config": { + "hasCustomUrl": true, + "serviceURL": "https://{affine}/" + } +} diff --git a/recipes/affine/webview.js b/recipes/affine/webview.js new file mode 100644 index 000000000..2a81dec32 --- /dev/null +++ b/recipes/affine/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +};