aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud-calendar
diff options
context:
space:
mode:
authorLibravatar Carlos SolĂ­s <csolisr@gmail.com>2022-06-21 09:39:54 -0600
committerLibravatar GitHub <noreply@github.com>2022-06-21 15:39:54 +0000
commit08a7af9ef2bb0030fd1876674d53b719e91f13e2 (patch)
treeda71d5f5d17e90faaf0af07fd0e97936b8820aff /recipes/nextcloud-calendar
parentdocs: add dqos as a contributor for code (#72) [skip ci] (diff)
downloadferdium-recipes-08a7af9ef2bb0030fd1876674d53b719e91f13e2.tar.gz
ferdium-recipes-08a7af9ef2bb0030fd1876674d53b719e91f13e2.tar.zst
ferdium-recipes-08a7af9ef2bb0030fd1876674d53b719e91f13e2.zip
Add fixes for Nextcloud-related webapps (#66)
Diffstat (limited to 'recipes/nextcloud-calendar')
-rw-r--r--recipes/nextcloud-calendar/index.js6
-rw-r--r--recipes/nextcloud-calendar/package.json11
-rw-r--r--recipes/nextcloud-calendar/service.css34
-rw-r--r--recipes/nextcloud-calendar/webview.js9
4 files changed, 40 insertions, 20 deletions
diff --git a/recipes/nextcloud-calendar/index.js b/recipes/nextcloud-calendar/index.js
index 8d77048..dd41f72 100644
--- a/recipes/nextcloud-calendar/index.js
+++ b/recipes/nextcloud-calendar/index.js
@@ -1,5 +1 @@
1module.exports = Ferdium => class NextcloudCarnet extends Ferdium { module.exports = Ferdium => Ferdium;
2 buildUrl(url) {
3 return `${url}/apps/calendar/`;
4 }
5};
diff --git a/recipes/nextcloud-calendar/package.json b/recipes/nextcloud-calendar/package.json
index fa8b3d9..027ea9b 100644
--- a/recipes/nextcloud-calendar/package.json
+++ b/recipes/nextcloud-calendar/package.json
@@ -1,13 +1,14 @@
1{ 1{
2 "id": "nextcloud-calendar", 2 "id": "nextcloud-calendar",
3 "name": "Nextcloud Calendar", 3 "name": "Nextcloud Calendar",
4 "version": "1.2.0", 4 "version": "1.2.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-calendar", 6 "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-calendar/",
7 "config": { 7 "config": {
8 "hasNotificationSound": true, 8 "hasNotificationSound": true,
9 "hasIndirectMessages": true, 9 "hasTeamId": true,
10 "hasCustomUrl": true, 10 "urlInputPrefix": "https://",
11 "serviceURL": "https://{nextcloud}/apps/calendar/" 11 "urlInputSuffix": "/apps/calendar/",
12 "serviceURL": "https://{teamId}/apps/calendar/"
12 } 13 }
13} 14}
diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css
index a0016ae..6e04c63 100644
--- a/recipes/nextcloud-calendar/service.css
+++ b/recipes/nextcloud-calendar/service.css
@@ -1,15 +1,33 @@
1/* Hide all app links and contacts menu link in the top menu except for 1/* Hide all app links and contacts menu link in the top menu except for
2Calendar */ 2Calendar */
3#appmenu li:not([data-id="calendar"]), #contactsmenu {display: none;} 3#appmenu li:not([data-id="calendar"]),
4#contactsmenu {
5 display: none;
6}
7
8/* Change the cursor to default for top menu Nextcloud home and Calendar
9links and disable them */
10#nextcloud,
11#appmenu li[data-id="calendar"] a {
12 cursor:default;
13 pointer-events: none;
14}
4 15
5/* Change the cursor to default for top menu Nextcloud home, Calendar and 16/* Hide all settings options, except the option to log out */
6settings links and disable them */ 17#settings #expanddiv li:not([data-id='logout']) {
7#nextcloud, #appmenu li[data-id="calendar"] a, #settings { 18 display: none;
8 cursor:default; pointer-events: none; 19}
20
21/* Fix the margin of the dropdown */
22#settings #expanddiv,
23#settings #expanddiv > ul {
24 min-height: 0;
9} 25}
10 26
11/* Hide "More" link in the top menu */ 27/* Hide "More" link in the top menu */
12#more-apps {display: none !important;} 28#more-apps {
29 display: none !important;
30}
13 31
14/* Hide notifications that are not related to calendar */ 32/* Hide notifications that are not related to calendar */
15.notifications .notification-wrapper .notification:not([object_type="dav"]) { 33.notifications .notification-wrapper .notification:not([object_type="dav"]) {
@@ -18,4 +36,6 @@ settings links and disable them */
18 36
19/* Hide "Dismiss all notifications" as this action will dismiss also hidden 37/* Hide "Dismiss all notifications" as this action will dismiss also hidden
20notifications */ 38notifications */
21.notification-wrapper .dismiss-all {display: none;} 39.notification-wrapper .dismiss-all {
40 display: none;
41}
diff --git a/recipes/nextcloud-calendar/webview.js b/recipes/nextcloud-calendar/webview.js
index 84c55f2..49ed705 100644
--- a/recipes/nextcloud-calendar/webview.js
+++ b/recipes/nextcloud-calendar/webview.js
@@ -1,12 +1,15 @@
1const _path = _interopRequireDefault(require('path')); 1const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
4 6
5module.exports = Ferdium => { 7module.exports = Ferdium => {
6 const getMessages = () => { 8 const getMessages = () => {
7 const direct = document.querySelectorAll( 9 const directSelector = document.querySelectorAll(
8 '.notifications .notification-wrapper .notification[object_type="dav"]', 10 '.notifications .notification-wrapper .notification[object_type="dav"]',
9 ).length; 11 );
12 const direct = directSelector ? Ferdium.safeParseInt(selector.length) : 0;
10 13
11 Ferdium.setBadge(direct); 14 Ferdium.setBadge(direct);
12 }; 15 };