Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--appinfo/app.php21
-rw-r--r--appinfo/info.xml12
-rw-r--r--appinfo/routes.php24
-rw-r--r--css/icons.scss33
-rw-r--r--css/prosemirror.scss206
-rw-r--r--lib/AppInfo/Application.php28
-rw-r--r--lib/Controller/PublicSessionController.php4
7 files changed, 179 insertions, 149 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 935ac66aa..85ed0d5af 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -1,5 +1,26 @@
<?php
declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
+ *
+ * @author Julius Härtl <jus@bitgrid.net>
+ *
+ * @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/>.
+ *
+ */
namespace OCA\Text\AppInfo;
diff --git a/appinfo/info.xml b/appinfo/info.xml
index d43c005e6..a82cb35bb 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -3,9 +3,15 @@
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>text</id>
<name>Text</name>
- <summary>Type together</summary>
- <description>Collaborative text editor</description>
- <version>0.1.0-dev14</version>
+ <summary>📝 Collaborative document editing</summary>
+ <description><![CDATA[** 📝 Collaborative document editing!**
+
+- **📝 Focused writing:** No distractions, only the formatting you need.
+- **🙋 Work together:** Share and collaborate with friends and colleagues, no matter if they use Nextcloud or not!
+- **💾 Open format:** Files are saved as [Markdown](https://en.wikipedia.org/wiki/Markdown), so you can edit them from any other text app too.
+- **✊ Strong foundation:** We use [🐈 tiptap](https://tiptap.scrumpy.io) which is based on [🦉 ProseMirror](https://prosemirror.net) – huge thanks to them!
+ ]]></description>
+ <version>1.0.0-alpha1</version>
<licence>agpl</licence>
<author mail="jus@bitgrid.net">Julius Härtl</author>
<namespace>Text</namespace>
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 4243816c2..299d1181a 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -1,12 +1,31 @@
<?php
declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
+ *
+ * @author Julius Härtl <jus@bitgrid.net>
+ *
+ * @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/>.
+ *
+ */
namespace OCA\Text\AppInfo;
return [
'routes' => [
- ['name' => 'Navigation#navigate', 'url' => '/', 'verb' => 'GET'],
-
['name' => 'Session#create', 'url' => '/session/create', 'verb' => 'GET'],
['name' => 'Session#fetch', 'url' => '/session/fetch', 'verb' => 'GET'],
['name' => 'Session#sync', 'url' => '/session/sync', 'verb' => 'POST'],
@@ -19,6 +38,5 @@ return [
['name' => 'PublicSession#sync', 'url' => '/public/session/sync', 'verb' => 'POST'],
['name' => 'PublicSession#push', 'url' => '/public/session/push', 'verb' => 'POST'],
['name' => 'PublicSession#close', 'url' => '/public/session/close', 'verb' => 'GET'],
-
]
];
diff --git a/css/icons.scss b/css/icons.scss
index c1c62ac15..155944aee 100644
--- a/css/icons.scss
+++ b/css/icons.scss
@@ -1,36 +1,3 @@
-.icon-bold {
- background-image: url('./../../img/icons/bold.svg');
-}
-.icon-italic {
- background-image: url('./../../img/icons/italic.svg');
-}
-.icon-underline {
- background-image: url('./../../img/icons/underline.svg');
-}
-.icon-link {
- background-image: url('./../../img/icons/link.svg');
-}
-.icon-ol {
- background-image: url('./../../img/icons/ol.svg');
-}
-.icon-ul {
- background-image: url('./../../img/icons/ul.svg');
-}
-.icon-hr {
- background-image: url('./../../img/icons/hr.svg');
-}
-.icon-quote {
- background-image: url('./../../img/icons/quote.svg');
-}
-.icon-paragraph {
- background-image: url('./../../img/icons/paragraph.svg');
-}
-.icon-code {
- background-image: url('./../../img/icons/code.svg');
-}
-.icon-image {
- background-image: url('./../../img/icons/image.svg');
-}
@include icon-black-white('undo', 'text', 1);
@include icon-black-white('redo', 'text', 1);
@include icon-black-white('bold', 'text', 1);
diff --git a/css/prosemirror.scss b/css/prosemirror.scss
index 3072cdccb..36833ded5 100644
--- a/css/prosemirror.scss
+++ b/css/prosemirror.scss
@@ -1,5 +1,4 @@
/* Document rendering styles */
-
.ProseMirror {
margin-top: 44px;
height: 100%;
@@ -12,118 +11,125 @@
line-height: 150%;
font-size: 14px;
outline: none;
-}
-.ProseMirror p:first-child,
-.ProseMirror h1:first-child,
-.ProseMirror h2:first-child,
-.ProseMirror h3:first-child,
-.ProseMirror h4:first-child,
-.ProseMirror h5:first-child,
-.ProseMirror h6:first-child {
- margin-top: 10px;
-}
+ p:first-child,
+ h1:first-child,
+ h2:first-child,
+ h3:first-child,
+ h4:first-child,
+ h5:first-child,
+ h6:first-child {
+ margin-top: 10px;
+ }
-.ProseMirror a {
- color: var(--color-primary);
- text-decoration: underline;
- padding: .5em 0;
-}
+ a {
+ color: var(--color-primary);
+ text-decoration: underline;
+ padding: .5em 0;
+ }
-.ProseMirror p {
- margin-bottom: 1em;
- line-height: 150%;
-}
-.ProseMirror em {
- font-style: italic;
-}
+ p {
+ margin-bottom: 1em;
+ line-height: 150%;
+ }
-.ProseMirror h1 {
- font-size: 36px;
-}
-.ProseMirror h2 {
- font-size: 28px;
-}
-.ProseMirror h3 {
- font-size: 24px;
-}
-.ProseMirror h4 {
- font-size: 21px;
-}
-.ProseMirror h5 {
- font-size: 17px;
-}
-.ProseMirror h6 {
- font-size: 14px;
-}
-.ProseMirror h1,
-.ProseMirror h2,
-.ProseMirror h3,
-.ProseMirror h4,
-.ProseMirror h5,
-.ProseMirror h6 {
- font-weight: 600;
- line-height: 120%;
- margin-top: 24px;
- margin-bottom: 12px;
- color: var(--color-main-text);
-}
+ em {
+ font-style: italic;
+ }
-.ProseMirror img {
- cursor: default;
- max-height: 50vh;
- max-width: 100%;
-}
+ h1 {
+ font-size: 36px;
+ }
-.ProseMirror-focused .ProseMirror-gapcursor {
- display: block;
-}
-/* Add space around the hr to make clicking it easier */
+ h2 {
+ font-size: 28px;
+ }
-.ProseMirror hr {
- padding: 2px 0;
- border: none;
- margin: 1em 0;
- width: 100%;
-}
+ h3 {
+ font-size: 24px;
+ }
-.ProseMirror hr:after {
- content: "";
- display: block;
- height: 1px;
- background-color: var(--color-border-dark);
- line-height: 2px;
-}
+ h4 {
+ font-size: 21px;
+ }
-.ProseMirror pre {
- white-space: pre-wrap;
- background-color: var(--color-background-dark);
- border-radius: var(--border-radius);
- padding: 1em 1.3em;
- margin-bottom: 1em;
-}
+ h5 {
+ font-size: 17px;
+ }
-.ProseMirror p code {
- background-color: var(--color-background-dark);
- border-radius: var(--border-radius);
- padding: .1em .3em;
-}
+ h6 {
+ font-size: 14px;
+ }
-.ProseMirror li {
- position: relative;
-}
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-weight: 600;
+ line-height: 120%;
+ margin-top: 24px;
+ margin-bottom: 12px;
+ color: var(--color-main-text);
+ }
-.ProseMirror ul, .ProseMirror ol {
- padding-left: 14px;
-}
+ img {
+ cursor: default;
+ max-height: 50vh;
+ max-width: 100%;
+ }
+
+ hr {
+ padding: 2px 0;
+ border: none;
+ margin: 1em 0;
+ width: 100%;
+ }
+
+ hr:after {
+ content: "";
+ display: block;
+ height: 1px;
+ background-color: var(--color-border-dark);
+ line-height: 2px;
+ }
+
+ pre {
+ white-space: pre-wrap;
+ background-color: var(--color-background-dark);
+ border-radius: var(--border-radius);
+ padding: 1em 1.3em;
+ margin-bottom: 1em;
+ }
+
+ p code {
+ background-color: var(--color-background-dark);
+ border-radius: var(--border-radius);
+ padding: .1em .3em;
+ }
+
+ li {
+ position: relative;
+ }
+
+ ul, ol {
+ padding-left: 14px;
+ }
+
+ ul li {
+ list-style-type: disc;
+ }
+
+ blockquote {
+ padding-left: 1em;
+ border-left: 4px solid var(--color-primary);
+ margin-left: 0;
+ margin-right: 0;
+ }
-.ProseMirror ul li {
- list-style-type: disc;
}
-.ProseMirror blockquote {
- padding-left: 1em;
- border-left: 4px solid var(--color-primary);
- margin-left: 0;
- margin-right: 0;
+.ProseMirror-focused .ProseMirror-gapcursor {
+ display: block;
}
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 9281a67cf..93ba04806 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -1,11 +1,31 @@
<?php
declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
+ *
+ * @author Julius Härtl <jus@bitgrid.net>
+ *
+ * @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/>.
+ *
+ */
namespace OCA\Text\AppInfo;
use OCP\AppFramework\App;
-
class Application extends App {
@@ -19,12 +39,6 @@ class Application extends App {
*/
public function __construct(array $params = []) {
parent::__construct(self::APP_NAME, $params);
-
- // register hook for files
- \OC::$server->getRootFolder()->listen('\OC\Files', 'preWrite', function() {});
- \OC::$server->getRootFolder()->listen('\OC\Files', 'postWrite', function() {});
- \OC::$server->getRootFolder()->listen('\OC\Files', 'preDelete', function() {});
- \OC::$server->getRootFolder()->listen('\OC\Files', 'postDelete', function() {});
}
}
diff --git a/lib/Controller/PublicSessionController.php b/lib/Controller/PublicSessionController.php
index 4aff8d83b..015f5c0a7 100644
--- a/lib/Controller/PublicSessionController.php
+++ b/lib/Controller/PublicSessionController.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*
@@ -21,9 +22,6 @@
*
*/
-declare(strict_types=1);
-
-
namespace OCA\Text\Controller;
use OCA\Text\Service\ApiService;