From c57b57c89d9455d6a14d47d7e749ac4217890e8c Mon Sep 17 00:00:00 2001 From: Richard Beumer Date: Mon, 10 Jun 2024 20:25:09 +0200 Subject: [PATCH 1/4] add parro --- recipes/parro/README.md | 7 + recipes/parro/darkmode.css | 151 +++ recipes/parro/icon.svg | 2505 ++++++++++++++++++++++++++++++++++++ recipes/parro/index.js | 3 + recipes/parro/package.json | 11 + recipes/parro/service.css | 151 +++ recipes/parro/webview.js | 22 + 7 files changed, 2850 insertions(+) create mode 100644 recipes/parro/README.md create mode 100644 recipes/parro/darkmode.css create mode 100644 recipes/parro/icon.svg create mode 100644 recipes/parro/index.js create mode 100644 recipes/parro/package.json create mode 100644 recipes/parro/service.css create mode 100644 recipes/parro/webview.js diff --git a/recipes/parro/README.md b/recipes/parro/README.md new file mode 100644 index 000000000..42d8c4aa8 --- /dev/null +++ b/recipes/parro/README.md @@ -0,0 +1,7 @@ +# Parro for Ferdium +This is the official Ferdium recipe for Parro. + +Parro is a dutch communication application for parents to communicate with their kids teachers. + +### How to create your own Ferdium recipes: +* [Read the documentation](https://github.com/ferdium/ferdium-recipes/blob/main/docs/integration.md) diff --git a/recipes/parro/darkmode.css b/recipes/parro/darkmode.css new file mode 100644 index 000000000..69291a15e --- /dev/null +++ b/recipes/parro/darkmode.css @@ -0,0 +1,151 @@ +.tg_head_split { + max-width: 100% !important; +} + +.im_page_wrap { + max-width: 100% !important; +} + +.im_dialogs_col_wrap { + width: 320px !important; +} + +.im_history_col_wrap { + width: calc(100% - 320px) !important; +} + +.im_message_wrap { + max-width: inherit !important; +} + +.im_message_body { + max-width: 580px !important; +} + +body.darkTheme, +.darkTheme .modal-content { + color: #bbb !important; + background: #252525 !important; +} +.darkTheme a.tg_checkbox { + color: #bbb !important; +} +.darkTheme .im_page_wrap { + /*background color of contentwrapper under header*/ + + background-color: #303030 !important; + border-left: 1px solid #4d4d4d !important; + border-right: 1px solid #4d4d4d !important; + border-bottom: 1px solid #4d4d4d !important; + box-shadow: none; +} +.darkTheme .im_message_body, +.darkTheme .im_attach, +.darkTheme .im_media_attach, +.darkTheme .im_record, +.darkTheme .im_message_document_thumbed { + background: inherit !important; +} +.darkTheme .im_dialog_peer { + /*peer nickname unselected*/ + + color: #bbb !important; +} +.darkTheme .contacts_modal_members_list a.contacts_modal_contact { + /*nicknames in contactlist via hamburger menu*/ + + color: #bbb; +} +.darkTheme .active a.im_dialog { + /*selected peer */ + + background-color: #4d4d4d !important; +} +.darkTheme .tg_head_split, +.darkTheme .md_modal_head { + /*page header block*/ + + background-color: #4d4d4d !important; +} +.darkTheme .dropdown.open .tg_head_btn, +.darkTheme .tg_head_btn:hover { + background: #4d4d4d !important; +} +.darkTheme .form-control { + /*input field*/ + + background-color: #0e0e0e !important; + color: #bbb !important; +} +.darkTheme .composer_rich_textarea { + background: #303030 !important; + border-color: #bbb !important; +} +.darkTheme .im_dialogs_col_wrap { + /*contactlist right border*/ + + border-right: 2px solid #4d4d4d; +} +.darkTheme .im_dialogs_col .nano > .nano-pane > .nano-slider { + /*scrollbarbutton when hover*/ + + background-color: #4d4d4d !important; +} +.darkTheme .tg_head_split { + background-color: #151515; +} +.darkTheme .im_submit { + color: #4d4d4d; +} +.darkTheme .im_message_mymention { + background: #1d1d1d; +} +.darkTheme .im_message_focus .im_message_outer_wrap { + background-color: #4d4d4d; +} +.darkTheme .im_message_selected .im_message_outer_wrap { + background: #4d4d4d; +} +.darkTheme a:hover { + background-color: #282828 !important; +} +.darkTheme .im_message_unread_split { + background: #4d4d4d; +} +@keyframes im_message_focus_fade { + 0% { + background-color: #2d2d2d; + } +} +.darkTheme .btn-primary { + background-color: #4d4d4d; +} +.darkTheme .im_history_select_active .im_message_outer_wrap:hover { + background: #4d4d4d; +} +.darkTheme .im_dialog_chat_from_wrap, +.darkTheme .im_dialog_message_service { + color: #6ac; +} +.darkTheme .composer_rich_textarea, +.darkTheme .composer_textarea { + box-shadow: 0px 3px 1px #ddd; +} +.darkTheme .composer_rich_textarea:focus { + box-shadow: 0px 3px 1px #ddd !important; +} +.darkTheme .tg_head_logo_dropdown .dropdown-menu > li > a { + color: #ddd; +} +.darkTheme .btn-primary.disabled, +.darkTheme .btn-primary[disabled] { + background: #4d4d4d none repeat scroll 0% 0%; +} +/*emoji*/ + +.darkTheme .composer_emoji_tooltip, +.darkTheme .icon-tooltip-tail, +.darkTheme .dropdown-menu { + background-color: #4d4d4d !important; + border-color: #5d5d5d; +} diff --git a/recipes/parro/icon.svg b/recipes/parro/icon.svg new file mode 100644 index 000000000..a674ca926 --- /dev/null +++ b/recipes/parro/icon.svg @@ -0,0 +1,2505 @@ + + + + diff --git a/recipes/parro/index.js b/recipes/parro/index.js new file mode 100644 index 000000000..13da9a579 --- /dev/null +++ b/recipes/parro/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = Ferdium => Ferdium; diff --git a/recipes/parro/package.json b/recipes/parro/package.json new file mode 100644 index 000000000..3ed3f209d --- /dev/null +++ b/recipes/parro/package.json @@ -0,0 +1,11 @@ +{ + "id": "parro", + "name": "Parro", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://talk.parro.com/", + "hasDirectMessages": true, + "hasNotificationSound": true + } +} diff --git a/recipes/parro/service.css b/recipes/parro/service.css new file mode 100644 index 000000000..69291a15e --- /dev/null +++ b/recipes/parro/service.css @@ -0,0 +1,151 @@ +.tg_head_split { + max-width: 100% !important; +} + +.im_page_wrap { + max-width: 100% !important; +} + +.im_dialogs_col_wrap { + width: 320px !important; +} + +.im_history_col_wrap { + width: calc(100% - 320px) !important; +} + +.im_message_wrap { + max-width: inherit !important; +} + +.im_message_body { + max-width: 580px !important; +} + +body.darkTheme, +.darkTheme .modal-content { + color: #bbb !important; + background: #252525 !important; +} +.darkTheme a.tg_checkbox { + color: #bbb !important; +} +.darkTheme .im_page_wrap { + /*background color of contentwrapper under header*/ + + background-color: #303030 !important; + border-left: 1px solid #4d4d4d !important; + border-right: 1px solid #4d4d4d !important; + border-bottom: 1px solid #4d4d4d !important; + box-shadow: none; +} +.darkTheme .im_message_body, +.darkTheme .im_attach, +.darkTheme .im_media_attach, +.darkTheme .im_record, +.darkTheme .im_message_document_thumbed { + background: inherit !important; +} +.darkTheme .im_dialog_peer { + /*peer nickname unselected*/ + + color: #bbb !important; +} +.darkTheme .contacts_modal_members_list a.contacts_modal_contact { + /*nicknames in contactlist via hamburger menu*/ + + color: #bbb; +} +.darkTheme .active a.im_dialog { + /*selected peer */ + + background-color: #4d4d4d !important; +} +.darkTheme .tg_head_split, +.darkTheme .md_modal_head { + /*page header block*/ + + background-color: #4d4d4d !important; +} +.darkTheme .dropdown.open .tg_head_btn, +.darkTheme .tg_head_btn:hover { + background: #4d4d4d !important; +} +.darkTheme .form-control { + /*input field*/ + + background-color: #0e0e0e !important; + color: #bbb !important; +} +.darkTheme .composer_rich_textarea { + background: #303030 !important; + border-color: #bbb !important; +} +.darkTheme .im_dialogs_col_wrap { + /*contactlist right border*/ + + border-right: 2px solid #4d4d4d; +} +.darkTheme .im_dialogs_col .nano > .nano-pane > .nano-slider { + /*scrollbarbutton when hover*/ + + background-color: #4d4d4d !important; +} +.darkTheme .tg_head_split { + background-color: #151515; +} +.darkTheme .im_submit { + color: #4d4d4d; +} +.darkTheme .im_message_mymention { + background: #1d1d1d; +} +.darkTheme .im_message_focus .im_message_outer_wrap { + background-color: #4d4d4d; +} +.darkTheme .im_message_selected .im_message_outer_wrap { + background: #4d4d4d; +} +.darkTheme a:hover { + background-color: #282828 !important; +} +.darkTheme .im_message_unread_split { + background: #4d4d4d; +} +@keyframes im_message_focus_fade { + 0% { + background-color: #2d2d2d; + } +} +.darkTheme .btn-primary { + background-color: #4d4d4d; +} +.darkTheme .im_history_select_active .im_message_outer_wrap:hover { + background: #4d4d4d; +} +.darkTheme .im_dialog_chat_from_wrap, +.darkTheme .im_dialog_message_service { + color: #6ac; +} +.darkTheme .composer_rich_textarea, +.darkTheme .composer_textarea { + box-shadow: 0px 3px 1px #ddd; +} +.darkTheme .composer_rich_textarea:focus { + box-shadow: 0px 3px 1px #ddd !important; +} +.darkTheme .tg_head_logo_dropdown .dropdown-menu > li > a { + color: #ddd; +} +.darkTheme .btn-primary.disabled, +.darkTheme .btn-primary[disabled] { + background: #4d4d4d none repeat scroll 0% 0%; +} +/*emoji*/ + +.darkTheme .composer_emoji_tooltip, +.darkTheme .icon-tooltip-tail, +.darkTheme .dropdown-menu { + background-color: #4d4d4d !important; + border-color: #5d5d5d; +} diff --git a/recipes/parro/webview.js b/recipes/parro/webview.js new file mode 100644 index 000000000..9cb6218d3 --- /dev/null +++ b/recipes/parro/webview.js @@ -0,0 +1,22 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + function getMessages() { + let direct = 0; + let indirect = 0; + const FerdiumData = document.querySelector('#FerdiumMessages').dataset; + if (FerdiumData) { + direct = FerdiumData.direct; + indirect = FerdiumData.indirect; + } + + Ferdium.setBadge(direct, indirect); + } + + Ferdium.injectCSS(_path.join(__dirname, 'darkmode.css')); + Ferdium.loop(getMessages); +}; From 6ade1189d4f6585b8e6944dd8d7f550744430ee0 Mon Sep 17 00:00:00 2001 From: Richard Beumer Date: Thu, 4 Jul 2024 11:01:39 +0200 Subject: [PATCH 2/4] remove darkmode --- recipes/parro/darkmode.css | 151 ------------------------------------- recipes/parro/webview.js | 1 - 2 files changed, 152 deletions(-) delete mode 100644 recipes/parro/darkmode.css diff --git a/recipes/parro/darkmode.css b/recipes/parro/darkmode.css deleted file mode 100644 index 69291a15e..000000000 --- a/recipes/parro/darkmode.css +++ /dev/null @@ -1,151 +0,0 @@ -.tg_head_split { - max-width: 100% !important; -} - -.im_page_wrap { - max-width: 100% !important; -} - -.im_dialogs_col_wrap { - width: 320px !important; -} - -.im_history_col_wrap { - width: calc(100% - 320px) !important; -} - -.im_message_wrap { - max-width: inherit !important; -} - -.im_message_body { - max-width: 580px !important; -} - -body.darkTheme, -.darkTheme .modal-content { - color: #bbb !important; - background: #252525 !important; -} -.darkTheme a.tg_checkbox { - color: #bbb !important; -} -.darkTheme .im_page_wrap { - /*background color of contentwrapper under header*/ - - background-color: #303030 !important; - border-left: 1px solid #4d4d4d !important; - border-right: 1px solid #4d4d4d !important; - border-bottom: 1px solid #4d4d4d !important; - box-shadow: none; -} -.darkTheme .im_message_body, -.darkTheme .im_attach, -.darkTheme .im_media_attach, -.darkTheme .im_record, -.darkTheme .im_message_document_thumbed { - background: inherit !important; -} -.darkTheme .im_dialog_peer { - /*peer nickname unselected*/ - - color: #bbb !important; -} -.darkTheme .contacts_modal_members_list a.contacts_modal_contact { - /*nicknames in contactlist via hamburger menu*/ - - color: #bbb; -} -.darkTheme .active a.im_dialog { - /*selected peer */ - - background-color: #4d4d4d !important; -} -.darkTheme .tg_head_split, -.darkTheme .md_modal_head { - /*page header block*/ - - background-color: #4d4d4d !important; -} -.darkTheme .dropdown.open .tg_head_btn, -.darkTheme .tg_head_btn:hover { - background: #4d4d4d !important; -} -.darkTheme .form-control { - /*input field*/ - - background-color: #0e0e0e !important; - color: #bbb !important; -} -.darkTheme .composer_rich_textarea { - background: #303030 !important; - border-color: #bbb !important; -} -.darkTheme .im_dialogs_col_wrap { - /*contactlist right border*/ - - border-right: 2px solid #4d4d4d; -} -.darkTheme .im_dialogs_col .nano > .nano-pane > .nano-slider { - /*scrollbarbutton when hover*/ - - background-color: #4d4d4d !important; -} -.darkTheme .tg_head_split { - background-color: #151515; -} -.darkTheme .im_submit { - color: #4d4d4d; -} -.darkTheme .im_message_mymention { - background: #1d1d1d; -} -.darkTheme .im_message_focus .im_message_outer_wrap { - background-color: #4d4d4d; -} -.darkTheme .im_message_selected .im_message_outer_wrap { - background: #4d4d4d; -} -.darkTheme a:hover { - background-color: #282828 !important; -} -.darkTheme .im_message_unread_split { - background: #4d4d4d; -} -@keyframes im_message_focus_fade { - 0% { - background-color: #2d2d2d; - } -} -.darkTheme .btn-primary { - background-color: #4d4d4d; -} -.darkTheme .im_history_select_active .im_message_outer_wrap:hover { - background: #4d4d4d; -} -.darkTheme .im_dialog_chat_from_wrap, -.darkTheme .im_dialog_message_service { - color: #6ac; -} -.darkTheme .composer_rich_textarea, -.darkTheme .composer_textarea { - box-shadow: 0px 3px 1px #ddd; -} -.darkTheme .composer_rich_textarea:focus { - box-shadow: 0px 3px 1px #ddd !important; -} -.darkTheme .tg_head_logo_dropdown .dropdown-menu > li > a { - color: #ddd; -} -.darkTheme .btn-primary.disabled, -.darkTheme .btn-primary[disabled] { - background: #4d4d4d none repeat scroll 0% 0%; -} -/*emoji*/ - -.darkTheme .composer_emoji_tooltip, -.darkTheme .icon-tooltip-tail, -.darkTheme .dropdown-menu { - background-color: #4d4d4d !important; - border-color: #5d5d5d; -} diff --git a/recipes/parro/webview.js b/recipes/parro/webview.js index 9cb6218d3..e2798c39b 100644 --- a/recipes/parro/webview.js +++ b/recipes/parro/webview.js @@ -17,6 +17,5 @@ module.exports = Ferdium => { Ferdium.setBadge(direct, indirect); } - Ferdium.injectCSS(_path.join(__dirname, 'darkmode.css')); Ferdium.loop(getMessages); }; From bb2f406d8a4db60b97825262184713b23645d13b Mon Sep 17 00:00:00 2001 From: Richard Beumer Date: Thu, 4 Jul 2024 11:02:52 +0200 Subject: [PATCH 3/4] remove darkmode --- recipes/parro/package.json | 2 +- recipes/parro/webview.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/recipes/parro/package.json b/recipes/parro/package.json index 3ed3f209d..38fda0a5c 100644 --- a/recipes/parro/package.json +++ b/recipes/parro/package.json @@ -1,7 +1,7 @@ { "id": "parro", "name": "Parro", - "version": "1.0.0", + "version": "1.0.1", "license": "MIT", "config": { "serviceURL": "https://talk.parro.com/", diff --git a/recipes/parro/webview.js b/recipes/parro/webview.js index e2798c39b..7b7d66544 100644 --- a/recipes/parro/webview.js +++ b/recipes/parro/webview.js @@ -1,9 +1,3 @@ -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} - -const _path = _interopRequireDefault(require('path')); - module.exports = Ferdium => { function getMessages() { let direct = 0; From 4567efb02e03fce87315ec9d9df77521294ac144 Mon Sep 17 00:00:00 2001 From: Richard Beumer Date: Thu, 4 Jul 2024 17:16:33 +0200 Subject: [PATCH 4/4] fix .css; remove readme.md --- recipes/parro/README.md | 7 ------- recipes/parro/package.json | 2 +- recipes/parro/webview.js | 7 +++++++ 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 recipes/parro/README.md diff --git a/recipes/parro/README.md b/recipes/parro/README.md deleted file mode 100644 index 42d8c4aa8..000000000 --- a/recipes/parro/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Parro for Ferdium -This is the official Ferdium recipe for Parro. - -Parro is a dutch communication application for parents to communicate with their kids teachers. - -### How to create your own Ferdium recipes: -* [Read the documentation](https://github.com/ferdium/ferdium-recipes/blob/main/docs/integration.md) diff --git a/recipes/parro/package.json b/recipes/parro/package.json index 38fda0a5c..3ed3f209d 100644 --- a/recipes/parro/package.json +++ b/recipes/parro/package.json @@ -1,7 +1,7 @@ { "id": "parro", "name": "Parro", - "version": "1.0.1", + "version": "1.0.0", "license": "MIT", "config": { "serviceURL": "https://talk.parro.com/", diff --git a/recipes/parro/webview.js b/recipes/parro/webview.js index 7b7d66544..df9b9fdac 100644 --- a/recipes/parro/webview.js +++ b/recipes/parro/webview.js @@ -1,3 +1,9 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + module.exports = Ferdium => { function getMessages() { let direct = 0; @@ -11,5 +17,6 @@ module.exports = Ferdium => { Ferdium.setBadge(direct, indirect); } + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); Ferdium.loop(getMessages); };