diff options
Diffstat (limited to 'recipes/nextcloud-calendar')
-rw-r--r-- | recipes/nextcloud-calendar/index.js | 6 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/package.json | 11 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/service.css | 34 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/webview.js | 9 |
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 @@ | |||
1 | module.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 |
2 | Calendar */ | 2 | Calendar */ |
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 | ||
9 | links 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 */ |
6 | settings 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 |
20 | notifications */ | 38 | notifications */ |
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 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
4 | 6 | ||
5 | module.exports = Ferdium => { | 7 | module.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 | }; |