Initial release

This commit is contained in:
Matias De lellis
2016-05-20 09:46:46 -03:00
commit 886605bc01
35 changed files with 2389 additions and 0 deletions

43
appinfo/app.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
/**
* ownCloud - quicknotes
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Matias De lellis <mati86dl@gmail.com>
* @copyright Matias De lellis 2016
*/
namespace OCA\QuickNotes\AppInfo;
use OCP\AppFramework\App;
require_once __DIR__ . '/autoload.php';
$app = new App('quicknotes');
$container = $app->getContainer();
$container->query('OCP\INavigationManager')->add(function () use ($container) {
$urlGenerator = $container->query('OCP\IURLGenerator');
$l10n = $container->query('OCP\IL10N');
return [
// the string under which your app will be referenced in owncloud
'id' => 'quicknotes',
// sorting weight for the navigation. The higher the number, the higher
// will it be listed in the navigation
'order' => 10,
// the route that will be shown on startup
'href' => $urlGenerator->linkToRoute('quicknotes.page.index'),
// the icon that will be shown in the navigation
// this file needs to exist in img/
'icon' => $urlGenerator->imagePath('quicknotes', 'app.svg'),
// the title of your application. This will be used in the
// navigation or on the settings page of your app
'name' => $l10n->t('Quick Notes'),
];
});

19
appinfo/autoload.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
/**
* ownCloud - quicknotes
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Matias De lellis <mati86dl@gmail.com>
* @copyright Matias De lellis 2016
*/
namespace OCA\QuickNotes\AppInfo;
use OCP\AppFramework\App;
/**
* Additional autoloader registration, e.g. registering composer autoloaders
*/
// require_once __DIR__ . '/../vendor/autoload.php';

84
appinfo/database.xml Normal file
View File

@@ -0,0 +1,84 @@
<database>
<name>*dbname*</name>
<create>true</create>
<overwrite>false</overwrite>
<charset>utf8</charset>
<table>
<name>*dbprefix*quicknotes_notes</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<notnull>true</notnull>
<autoincrement>true</autoincrement>
<unsigned>true</unsigned>
<primary>true</primary>
<length>8</length>
</field>
<field>
<name>user_id</name>
<type>text</type>
<length>200</length>
<default></default>
<notnull>true</notnull>
</field>
<field>
<name>title</name>
<type>text</type>
<length>200</length>
<default></default>
<notnull>true</notnull>
</field>
<field>
<name>content</name>
<type>clob</type>
<default></default>
<notnull>true</notnull>
</field>
<field>
<name>color</name>
<type>text</type>
</field>
</declaration>
</table>
<table>
<name>*dbprefix*quicknotes_tasks</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<notnull>true</notnull>
<autoincrement>true</autoincrement>
<unsigned>true</unsigned>
<primary>true</primary>
<length>8</length>
</field>
<field>
<name>note_id</name>
<type>integer</type>
<notnull>true</notnull>
<unsigned>true</unsigned>
<length>8</length>
</field>
<field>
<name>description</name>
<type>text</type>
<length>200</length>
<default></default>
<notnull>true</notnull>
</field>
<field>
<name>done</name>
<type>boolean</type>
<default>false</default>
<notnull>true</notnull>
</field>
<field>
<name>ordering</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
</field>
</declaration>
</table>
</database>

14
appinfo/info.xml Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<info>
<id>quicknotes</id>
<name>Quick Notes</name>
<description>Quick notes with text, check lists and pictures</description>
<licence>AGPL</licence>
<author>Matias De lellis</author>
<version>0.0.2</version>
<namespace>QuickNotes</namespace>
<category>tool</category>
<dependencies>
<owncloud min-version="9.0" max-version="9.1"/>
</dependencies>
</info>

12
appinfo/routes.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
return [
'resources' => [
'note' => ['url' => '/notes'],
'note_api' => ['url' => '/api/0.1/notes']
],
'routes' => [
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'note_api#preflighted_cors', 'url' => '/api/0.1/{path}',
'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']]
]
];