forked from nextcloud/calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic components, fc, router & store
Signed-off-by: Thomas Citharel <[email protected]>
- Loading branch information
1 parent
8fa7f4a
commit c4559d0
Showing
15 changed files
with
709 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div class="editor"> | ||
<!-- title --> | ||
<!-- timepicker --> | ||
<!-- details --> | ||
<!-- invitees-list --> | ||
<!-- invitees-list-new --> | ||
<!-- invitees-list-item --> | ||
<!-- alarm-list --> | ||
<!-- alarm-list-new --> | ||
<!-- alarm-list-item --> | ||
<!-- repeat --> | ||
<!-- eventual other apps modules --> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'Edit', | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template> | ||
<div class="sidebar"> | ||
<!-- Datepicker --> | ||
<!-- View buttons --> | ||
<!-- Today button --> | ||
<!-- Calendar list --> | ||
<!-- calendar-list-new --> | ||
<!-- calendar-list-item --> | ||
<!-- colorpicker --> | ||
<!-- subscription-list --> | ||
<!-- subscription-list-new --> | ||
<!-- subscription-list-item --> | ||
<!-- colorpicker --> | ||
<!-- Settings --> | ||
<!-- import-progressbar (similar to contacts) --> | ||
|
||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'Sidebar', | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div class="view"> | ||
<!-- Full calendar --> | ||
<div ref="fullcalendar" class="fullcalendar-wrapper" /> | ||
<!-- Edit modal --> | ||
<router-view /> | ||
</div> | ||
</template> | ||
<script> | ||
import { Calendar } from 'fullcalendar' | ||
import '../../node_modules/fullcalendar/dist/fullcalendar.css' | ||
export default { | ||
name: 'View', | ||
// props: { | ||
// view: { | ||
// type: String, | ||
// required: true, | ||
// }, | ||
// firstday: { | ||
// type: String, | ||
// required: true, | ||
// } | ||
// }, | ||
data() { | ||
return { | ||
calendar: null | ||
} | ||
}, | ||
mounted() { | ||
this.calendar = new Calendar(this.$refs.fullcalendar) | ||
this.calendar.render() | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default class { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import Vue from 'vue' | ||
import Router from 'vue-router' | ||
import View from './components/View' | ||
import Edit from './components/Edit' | ||
|
||
Vue.use(Router) | ||
|
||
const router = new Router({ | ||
mode: 'history', | ||
base: OC.generateUrl('/apps/calendar'), | ||
routes: [ | ||
{ | ||
path: '/', | ||
name: 'Root', | ||
component: View, | ||
// redirect: { | ||
// name: 'View', | ||
// params: { | ||
// view: 'now', | ||
// firstday: 'now' | ||
// }, | ||
// } | ||
}, | ||
{ | ||
path: '/{view}/{firstday}', | ||
props: true, | ||
children: [ | ||
{ | ||
path: '/', | ||
name: 'View', | ||
component: View, | ||
props: true | ||
}, | ||
{ | ||
path: '/edit/{mode}/{object}/{recurrence}', | ||
name: 'Edit', | ||
component: Edit, | ||
props: true | ||
}, | ||
{ | ||
path: '/new/{mode}/{recurrence}', | ||
name: 'Edit', | ||
component: Edit, | ||
props: true, | ||
}, | ||
], | ||
}, | ||
], | ||
}) | ||
|
||
export default router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* @copyright Copyright (c) 2018 John Molakvoæ <[email protected]> | ||
* | ||
* @author John Molakvoæ <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
import DavClient from 'cdav-library' | ||
|
||
function xhrProvider() { | ||
var headers = { | ||
'X-Requested-With': 'XMLHttpRequest', | ||
'requesttoken': OC.requestToken | ||
} | ||
var xhr = new XMLHttpRequest() | ||
var oldOpen = xhr.open | ||
|
||
// override open() method to add headers | ||
xhr.open = function() { | ||
var result = oldOpen.apply(this, arguments) | ||
for (let name in headers) { | ||
xhr.setRequestHeader(name, headers[name]) | ||
} | ||
return result | ||
} | ||
OC.registerXHRForErrorProcessing(xhr) | ||
return xhr | ||
} | ||
|
||
export default new DavClient({ | ||
rootUrl: OC.linkToRemote('dav') | ||
}, xhrProvider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function(ics, calendar) { | ||
|
||
} |
Oops, something went wrong.