Compare commits

...

33 Commits

Author SHA1 Message Date
Skylar Ittner c824999c05 Fix #17 3 years ago
Skylar Ittner 2dc815e2ea Fix white screen on launch, update versions and dependencies 4 years ago
Skylar Ittner 0269107830 Add detailed version/build number to appimage and debian package filenames 4 years ago
Skylar Ittner b58e58b35f Add semi-automatic version numbering to debian_build.sh 4 years ago
Skylar Ittner bb13c3a487 Bump version to 1.3.1 4 years ago
Skylar Ittner 2f1379d3ad Fix notes layout columns bug 4 years ago
Skylar Ittner 6c39e5a903 Update readme 4 years ago
Skylar Ittner dc2059ae52 Target Android API 28 (Android 9 Pie) 4 years ago
Skylar Ittner 6192c47840 Maybe get status bar color right the third time? 4 years ago
Skylar Ittner 6009168891 More statusbar changes 4 years ago
Skylar Ittner f0d3b2b4f6 Change statusbar color on dark theme 4 years ago
Skylar Ittner 3ce58c84ce Fix typo 4 years ago
Skylar Ittner 5539240793 Put build scripts in /scripts, add them as Cordova hooks 4 years ago
Skylar Ittner 4159a58cce Remove material icons 4 years ago
Skylar Ittner 0636874e99 Remove easymde, add loading progress indicator during first load, move material icons to npm 4 years ago
Skylar Ittner 360b9d0064 Fix packaging scripts/data 4 years ago
Skylar Ittner 44c1782ddf Move packaging repo into main app repo 4 years ago
Skylar Ittner 024b0c50cd Fix #16 4 years ago
Skylar Ittner b92f57ed26 Improve removebloat.sh 4 years ago
Skylar Ittner b1c2d86d9a Rewrite editor (close #12), fix #11, close #13, close #14, close #15 4 years ago
Skylar Ittner a318a17c9f Adjust note/toolbar margin 5 years ago
Skylar Ittner 978445d551 Fix editor toggle on touchscreens 5 years ago
Skylar Ittner b583022fd7 Bump version to 1.2.0 5 years ago
Skylar Ittner 1b6e731c89 Add alternative/lite Markdown editor 5 years ago
Skylar Ittner 26232618d4 Make Ctrl-S save note in editor 5 years ago
Skylar Ittner cd476b3f6d Fix some Markdown leaking into note titles 5 years ago
Skylar Ittner 41865a9a72 Toast icons 5 years ago
Skylar Ittner 95482c49d1 Prevent notes from being double-created with multiple clicks on Save 5 years ago
Skylar Ittner 265ae7d004 Always reload tray menu in loadNotesToCards(), loadCards() on delete, close #9 5 years ago
Skylar Ittner 673b8fba4f Remove tray menu on restartApplication() (close #10) 5 years ago
Skylar Ittner d31303ff19 Update readme 5 years ago
Skylar Ittner ea2035bf4d Fix cards slightly overlapping sometimes on home screen load 5 years ago
Skylar Ittner 1425e8de56 Refresh cards when making list (close #7) 5 years ago

@ -16,17 +16,18 @@ Tested and should work on:
Not tested but should work on:
* Raspberry Pi (using a custom build of NW.js like
[this one](https://github.com/jalbam/nwjs_rpi))
[this one](https://github.com/LeonardLaszlo/nw.js-armv7-binaries))
* Windows
* MacOS (we don't currently offer Mac builds, see below)
There are no official builds for Mac for a few reasons: we don't own any Mac
computers; Mac builds are about 4x the size of the other builds; and the best
Mac build we could get working on a Linux build server was a ZIP file. If you
want official Mac builds, you'll need to write a working Jenkins build script.
want official Mac builds, you'll need to write a working Jenkins build script
for us to use (build server is running Ubuntu Server 18.04).
If you want an iOS build, donate $100 for an Apple Developer account. The
framework this app uses has an iOS stylesheet, so it'll even look native.
If you want an iOS build, send us $100 for an Apple Developer account and we'll
make it.
Building for NW.js

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.netsyms.NotePostApp" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.netsyms.NotePostApp" version="1.3.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>NotePost</name>
<description>
A cross-platform client app for NotePost.
@ -19,11 +19,11 @@
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<preference name="android-minSdkVersion" value="21" />
<preference name="android-targetSdkVersion" value="27" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="29" />
<allow-intent href="market:*" />
<preference name="HeaderColor" value="#F44336" />
<preference name="StatusBarBackgroundColor" value="#D32F2F" />
<preference name="StatusBarBackgroundColor" value="#E0E0E0" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" />
</edit-config>
@ -51,5 +51,7 @@
<plugin name="cordova-plugin-app-version" spec="^0.1.9" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
<engine name="browser" spec="^5.0.4" />
<engine name="android" spec="^7.1.4" />
<hook src="scripts/yarn_install.sh" type="before_prepare"/>
<hook src="scripts/generate_credits.sh" type="before_prepare"/>
<hook src="scripts/remove_bloat.sh" type="before_prepare"/>
</widget>

File diff suppressed because one or more lines are too long

3460
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
{
"name": "com.netsyms.NotePostApp",
"displayName": "NotePost",
"version": "1.1.0",
"version": "1.3.2",
"description": "A cross-platform client app for NotePost.",
"main": "index.js",
"scripts": {
@ -10,8 +10,9 @@
"author": "Netsyms Technologies",
"license": "MPL-2.0",
"dependencies": {
"cordova-android": "^7.1.4",
"cordova-browser": "^5.0.4",
"cordova": "^10.0.0",
"cordova-android": "^9.0.0",
"cordova-browser": "^6.0.0",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-headercolor": "^1.0.0",
"cordova-plugin-inappbrowser": "^3.0.0",

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>16A323</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>NotePost</string>
<key>CFBundleDocumentTypes</key>
<array/>
<key>CFBundleExecutable</key>
<string>nwjs</string>
<key>CFBundleIconFile</key>
<string>app.icns</string>
<key>CFBundleIdentifier</key>
<string>com.netsyms.NotePostApp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>netsyms-notepost-app</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>Version 1.3.0</string>
<key>CFBundleSignature</key>
<string>NWJS</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Web site URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>http</string>
<string>https</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>FTP site URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>ftp</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>Local file URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>file</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTSDKBuild</key>
<string>10.12</string>
<key>DTSDKName</key>
<string>macosx10.12</string>
<key>DTXcode</key>
<string>0833</string>
<key>DTXcodeBuild</key>
<string>8E3004b</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSHasLocalizedDisplayName</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.9.0</string>
<key>NSAppleScriptEnabled</key>
<true/>
<key>NSPrincipalClass</key>
<string>BrowserCrApplication</string>
<key>NSSupportsAppNap</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>NSUserActivityTypes</key>
<array>
<string>NSUserActivityTypeBrowsingWeb</string>
</array>
<key>NSUserNotificationAlertStyle</key>
<string>banner</string>
<key>OSAScriptingDefinition</key>
<string>scripting.sdef</string>
<key>SCMRevision</key>
<string>2f0eedbae58fc8cfa2f2ff2988c4c1927e1edbac-</string>
<key>UTExportedTypeDeclarations</key>
<array/>
</dict>
</plist>

@ -0,0 +1,5 @@
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
cd $HERE/usr/lib/notepost
./notepost

@ -0,0 +1,11 @@
[Desktop Entry]
Name=NotePost
Version=1.0
Exec=notepost
Comment=Launch NotePost
Icon=notepost
Type=Application
Terminal=false
StartupNotify=true
Categories=Office;Network;
Name[en_US]=NotePost

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/lib/notepost
./notepost

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>notepostapp</id>
<metadata_license>MPL-2.0</metadata_license>
<project_license>MPL-2.0</project_license>
<name>NotePost</name>
<summary>Desktop client for NotePost</summary>
<description>
</description>
<launchable type="desktop-id">notepost.desktop</launchable>
<url type="homepage">https://netsyms.com/apps/notepost</url>
<screenshots>
<screenshot type="default">
<image>https://netsyms.com/files/apps/notepost/app/home_desktop.png</image>
</screenshot>
</screenshots>
<provides>
<id>notepost.desktop</id>
</provides>
</component>

@ -0,0 +1,9 @@
Package: notepost
Version: 1.3.0-1
Maintainer: Netsyms Technologies <opensource@netsyms.com>
Section: web
Homepage: https://netsyms.com/apps/notepost
Priority: optional
Depends: nw.js-normal | nw.js
Description: Desktop client for the NotePost notetaking webapp.
Architecture: all

@ -0,0 +1,359 @@
Copyright (c) 2018-2019 Netsyms Technologies.
Mozilla Public License Version 2.0
==================================
### 1. Definitions
**1.1. “Contributor”**
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
**1.2. “Contributor Version”**
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
**1.3. “Contribution”**
means Covered Software of a particular Contributor.
**1.4. “Covered Software”**
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
**1.5. “Incompatible With Secondary Licenses”**
means
* **(a)** that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
* **(b)** that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
**1.6. “Executable Form”**
means any form of the work other than Source Code Form.
**1.7. “Larger Work”**
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
**1.8. “License”**
means this document.
**1.9. “Licensable”**
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
**1.10. “Modifications”**
means any of the following:
* **(a)** any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
* **(b)** any new file in Source Code Form that contains any Covered
Software.
**1.11. “Patent Claims” of a Contributor**
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
**1.12. “Secondary License”**
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
**1.13. “Source Code Form”**
means the form of the work preferred for making modifications.
**1.14. “You” (or “Your”)**
means an individual or a legal entity exercising rights under this
License. For legal entities, “You” includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, “control” means **(a)** the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or **(b)** ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
### 2. License Grants and Conditions
#### 2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
* **(a)** under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
* **(b)** under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
#### 2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
#### 2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
* **(a)** for any code that a Contributor has removed from Covered Software;
or
* **(b)** for infringements caused by: **(i)** Your and any other third party's
modifications of Covered Software, or **(ii)** the combination of its
Contributions with other software (except as part of its Contributor
Version); or
* **(c)** under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
#### 2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
#### 2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
#### 2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
#### 2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
### 3. Responsibilities
#### 3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
#### 3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
* **(a)** such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
* **(b)** You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
#### 3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
#### 3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
#### 3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
### 4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: **(a)** comply with
the terms of this License to the maximum extent possible; and **(b)**
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
### 5. Termination
**5.1.** The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated **(a)** provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and **(b)** on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
**5.2.** If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
### 6. Disclaimer of Warranty
> Covered Software is provided under this License on an “as is”
> basis, without warranty of any kind, either expressed, implied, or
> statutory, including, without limitation, warranties that the
> Covered Software is free of defects, merchantable, fit for a
> particular purpose or non-infringing. The entire risk as to the
> quality and performance of the Covered Software is with You.
> Should any Covered Software prove defective in any respect, You
> (not any Contributor) assume the cost of any necessary servicing,
> repair, or correction. This disclaimer of warranty constitutes an
> essential part of this License. No use of any Covered Software is
> authorized under this License except under this disclaimer.
### 7. Limitation of Liability
> Under no circumstances and under no legal theory, whether tort
> (including negligence), contract, or otherwise, shall any
> Contributor, or anyone who distributes Covered Software as
> permitted above, be liable to You for any direct, indirect,
> special, incidental, or consequential damages of any character
> including, without limitation, damages for lost profits, loss of
> goodwill, work stoppage, computer failure or malfunction, or any
> and all other commercial damages or losses, even if such party
> shall have been informed of the possibility of such damages. This
> limitation of liability shall not apply to liability for death or
> personal injury resulting from such party's negligence to the
> extent applicable law prohibits such limitation. Some
> jurisdictions do not allow the exclusion or limitation of
> incidental or consequential damages, so this exclusion and
> limitation may not apply to You.
### 8. Litigation
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
### 9. Miscellaneous
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
### 10. Versions of the License
#### 10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
#### 10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
#### 10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
## Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
## Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

@ -0,0 +1,2 @@
#!/bin/sh
nwjs /usr/share/notepost

@ -0,0 +1,11 @@
[Desktop Entry]
Name=NotePost
Version=1.0
Exec=/usr/bin/notepost
Comment=Launch the NotePost client
Icon=/usr/share/notepost/logo.svg
Type=Application
Terminal=false
StartupNotify=true
Encoding=UTF-8
Categories=Office;

@ -0,0 +1,359 @@
Copyright (c) 2018-2019 Netsyms Technologies.
Mozilla Public License Version 2.0
==================================
### 1. Definitions
**1.1. “Contributor”**
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
**1.2. “Contributor Version”**
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
**1.3. “Contribution”**
means Covered Software of a particular Contributor.
**1.4. “Covered Software”**
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
**1.5. “Incompatible With Secondary Licenses”**
means
* **(a)** that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
* **(b)** that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
**1.6. “Executable Form”**
means any form of the work other than Source Code Form.
**1.7. “Larger Work”**
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
**1.8. “License”**
means this document.
**1.9. “Licensable”**
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
**1.10. “Modifications”**
means any of the following:
* **(a)** any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
* **(b)** any new file in Source Code Form that contains any Covered
Software.
**1.11. “Patent Claims” of a Contributor**
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
**1.12. “Secondary License”**
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
**1.13. “Source Code Form”**
means the form of the work preferred for making modifications.
**1.14. “You” (or “Your”)**
means an individual or a legal entity exercising rights under this
License. For legal entities, “You” includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, “control” means **(a)** the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or **(b)** ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
### 2. License Grants and Conditions
#### 2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
* **(a)** under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
* **(b)** under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
#### 2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
#### 2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
* **(a)** for any code that a Contributor has removed from Covered Software;
or
* **(b)** for infringements caused by: **(i)** Your and any other third party's
modifications of Covered Software, or **(ii)** the combination of its
Contributions with other software (except as part of its Contributor
Version); or
* **(c)** under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
#### 2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
#### 2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
#### 2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
#### 2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
### 3. Responsibilities
#### 3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
#### 3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
* **(a)** such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
* **(b)** You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
#### 3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
#### 3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
#### 3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
### 4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: **(a)** comply with
the terms of this License to the maximum extent possible; and **(b)**
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
### 5. Termination
**5.1.** The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated **(a)** provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and **(b)** on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
**5.2.** If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
### 6. Disclaimer of Warranty
> Covered Software is provided under this License on an “as is”
> basis, without warranty of any kind, either expressed, implied, or
> statutory, including, without limitation, warranties that the
> Covered Software is free of defects, merchantable, fit for a
> particular purpose or non-infringing. The entire risk as to the
> quality and performance of the Covered Software is with You.
> Should any Covered Software prove defective in any respect, You
> (not any Contributor) assume the cost of any necessary servicing,
> repair, or correction. This disclaimer of warranty constitutes an
> essential part of this License. No use of any Covered Software is
> authorized under this License except under this disclaimer.
### 7. Limitation of Liability
> Under no circumstances and under no legal theory, whether tort
> (including negligence), contract, or otherwise, shall any
> Contributor, or anyone who distributes Covered Software as
> permitted above, be liable to You for any direct, indirect,
> special, incidental, or consequential damages of any character
> including, without limitation, damages for lost profits, loss of
> goodwill, work stoppage, computer failure or malfunction, or any
> and all other commercial damages or losses, even if such party
> shall have been informed of the possibility of such damages. This
> limitation of liability shall not apply to liability for death or
> personal injury resulting from such party's negligence to the
> extent applicable law prohibits such limitation. Some
> jurisdictions do not allow the exclusion or limitation of
> incidental or consequential damages, so this exclusion and
> limitation may not apply to You.
### 8. Litigation
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
### 9. Miscellaneous
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
### 10. Versions of the License
#### 10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
#### 10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
#### 10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
## Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
## Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>notepostapp</id>
<metadata_license>MPL-2.0</metadata_license>
<project_license>MPL-2.0</project_license>
<name>NotePost</name>
<summary>Desktop client for NotePost</summary>
<description>
</description>
<launchable type="desktop-id">notepost.desktop</launchable>
<url type="homepage">https://netsyms.com/apps/notepost</url>
<screenshots>
<screenshot type="default">
<image>https://netsyms.com/data/uploads/apps/notepost/app/home.png</image>
</screenshot>
</screenshots>
<provides>
<id>notepost.desktop</id>
</provides>
</component>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
version="1.1"
viewBox="0 0 135.47 135.47"
id="svg926"
sodipodi:docname="logo.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
inkscape:export-filename="/home/skylar/Documents/Projects/Assets/NotePost/App/logo.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<metadata
id="metadata932">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs930" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1011"
id="namedview928"
showgrid="false"
inkscape:zoom="1.0413252"
inkscape:cx="229.93784"
inkscape:cy="198.05844"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg926" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458984;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect963"
width="135.47"
height="135.47"
x="-6.1035155e-07"
y="-6.1035155e-07"
rx="26.458984"
ry="26.458984" />
<g
transform="translate(259.75 23.221)"
id="g924">
<g
transform="matrix(.26458 0 0 .26458 -259.75 -166.19)"
id="g922">
<g
transform="translate(9.006 -6.5066)"
id="g920">
<path
d="m60.228 615.52c-8.1253 0-14.666 6.5426-14.666 14.668v190.67c0 8.1253 6.5407 14.666 14.666 14.666h37.861v-59.871c0-8.1253 6.5426-14.666 14.668-14.666h105.37l0.1313-9.0918v-94.41c0-8.1253 6.5426-14.666 14.668-14.666h32.637v-12.627c0-8.1253-6.5407-14.668-14.666-14.668z"
fill="#e57373"
id="path914" />
<path
transform="translate(0 540.36)"
d="m243.09 111.68c-8.1253 0-14.668 6.5407-14.668 14.666v94.41h96.258c8.1253 0 14.666 6.5407 14.666 14.666v96.258h94.41c8.1253 0 14.666-6.5407 14.666-14.666v-190.67c0-8.1253-6.5407-14.666-14.666-14.666z"
fill="#81c784"
id="path916" />
<rect
x="108.26"
y="770.21"
width="220"
height="220"
rx="14.667"
ry="14.667"
fill="#ffee58"
id="rect918" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1,11 @@
#!/bin/bash
# $1 is the binary location, $2 is the arch, $3 is the version
mkdir out
mkdir -p appimage/NotePost.AppDir/usr/lib/notepost
rm -rf appimage/NotePost.AppDir/usr/lib/notepost
mv "$1com.netsyms.NotePostApp" "$1notepost"
rsync -rv "$1" appimage/NotePost.AppDir/usr/lib/notepost
chmod +x appimage/NotePost.AppDir/AppRun
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
./appimagetool appimage/NotePost.AppDir "out/NotePost_$2_$3.AppImage"

@ -0,0 +1,11 @@
#!/bin/bash
# $1 is the app source location, $2 is the svg icon, $3 is the app version code, $4 is the build number
mkdir -p out
rm -rf debian/usr/share/notepost
mkdir -p debian/usr/share/notepost
mkdir -p debian/usr/share/doc/notepost
rsync -rv "$1" debian/usr/share/notepost
cp debian/DEBIAN/copyright debian/usr/share/doc/notepost/
sed -i "s/Version:\s[0-9.\-]\+/Version: $3+b$4/" debian/DEBIAN/control
cp "$2" debian/usr/share/notepost/logo.svg
dpkg-deb -b debian "out/notepost_$3+b${4}_all.deb"

@ -1,38 +0,0 @@
#!/bin/sh
# This script removes some stuff in `www/node_modules` that the app doesn't need to run.
# It removes about 6MB from the build size.
cd www/node_modules
rm -rf array-parallel
rm -rf codemirror
rm -rf codemirror-spell-checker
rm -rf dom7
rm -rf matches-selector
rm -rf path-to-regexp
rm -rf ssr-window
rm -rf template7
rm -rf throttleit
rm -rf tiny-emitter
rm -rf typo-js
cd @fortawesome/fontawesome-free
rm -rf js
rm -rf less
rm -rf scss
rm -rf sprites
rm -rf svgs
cd ../..
cd jquery
rm -rf src
rm -rf external
cd ..
cd framework7
rm -rf components
rm -rf lazy-components
rm -rf less
rm -rf modules
rm -rf utils
echo "Cleanup finished"

@ -0,0 +1,7 @@
cd www
yarn licenses generate-disclaimer > ../license-credits.md
cd ..
yarn licenses generate-disclaimer >> license-credits.md
cp www/pages/credits.template.html www/pages/credits.html
sed -e "/{{credits}}/r license-credits.md" -e "/{{credits}}/d" -i www/pages/credits.html

@ -0,0 +1,69 @@
#!/bin/bash
# This script removes some stuff in `www/node_modules` that the app doesn't need to run.
echo "Removing bloat in node_modules..."
set -e
DIR="$(pwd)/www/node_modules"
cd $DIR
rm -rf array-parallel
rm -rf codemirror
rm -rf codemirror-spell-checker
rm -rf dom7
rm -rf matches-selector
rm -rf path-to-regexp
rm -rf ssr-window
rm -rf template7
rm -rf throttleit
rm -rf tiny-emitter
rm -rf typo-js
rm -rf .bin
cd $DIR
cd @fortawesome/fontawesome-free
rm -rf {js,less,metadata,scss,sprites,svgs}
find css -type f -not -name 'all.min.css' -delete
cd $DIR
cd jquery
rm -rf src
rm -rf external
cd $DIR
cd framework7
rm -rf components
rm -rf lazy-components
rm -rf less
rm -rf modules
rm -rf utils
rm -f framework7.*
rm -f framework7-lite.*
find css -type f -not -name 'framework7.bundle.min.css' -delete
find js -type f -not -name 'framework7.bundle.min.js' -delete
cd $DIR
cd jquery
rm -rf src
rm -rf external
find dist -type f -not -name 'jquery.min.js' -delete
cd $DIR
cd material-design-icons
# Remove everything except the icon font and license, but also exclude the
# current and parent folder (. , ..) so rm won't complain about refusing
# to delete the whole filesystem
find . -maxdepth 1 -not -name '.' -not -name 'LICENSE' -not -name 'iconfont' -exec rm -rf {} \;
cd $DIR
cd marked
rm -rf {bin,lib,man,src}
cd $DIR
cd shufflejs
rm -rf src
find dist -type f -not -name 'shuffle.min.js' -delete
cd $DIR
echo "Cleanup finished"

@ -4,4 +4,6 @@ yarn install
# Install frontend dependencies with Yarn, in www folder
cd www
# force a full update so the bloat script doesn't fail on missing files
rm -r node_modules
yarn install

@ -0,0 +1,21 @@
/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
.popup {
background-color: var(--f7-page-bg-color);
}
.page[data-name="editor"] .page-content textarea#note {
width: 100%;
height: 100%;
resize: none;
border: none;
overflow: auto;
outline: none;
box-shadow: none;
font-size: 1rem;
padding: 0.75rem;
}

@ -1,39 +0,0 @@
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: normal;
src:
/* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNY.eot */
url('Material_Icons.eot?#iefix') format('embedded-opentype'),
/* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff */
url('Material_Icons.woff') format('woff'),
/* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 */
url('Material_Icons.woff2') format('woff2'),
/* from https://fonts.gstatic.com/l/font?kit=flUhRq6tzZclQEJ-Vdg-IuiaDsNb&skey=4fbfe4498ec2960a&v=v41#MaterialIcons */
url('Material_Icons.svg#MaterialIcons') format('svg'),
/* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf */
url('Material_Icons.ttf') format('truetype');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
}

@ -1,51 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<defs >
<font id="MaterialIcons" horiz-adv-x="512" ><font-face
font-family="Material Icons"
units-per-em="512"
panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="512"
descent="0"
alphabetic="0" />
<glyph unicode="0" d="" />
<glyph unicode="1" d="" />
<glyph unicode="2" d="" />
<glyph unicode="3" d="" />
<glyph unicode="4" d="" />
<glyph unicode="5" d="" />
<glyph unicode="6" d="" />
<glyph unicode="7" d="" />
<glyph unicode="8" d="" />
<glyph unicode="9" d="" />
<glyph unicode="_" d="" />
<glyph unicode="a" d="" />
<glyph unicode="b" d="" />
<glyph unicode="c" d="" />
<glyph unicode="d" d="" />
<glyph unicode="e" d="" />
<glyph unicode="f" d="" />
<glyph unicode="g" d="" />
<glyph unicode="h" d="" />
<glyph unicode="i" d="" />
<glyph unicode="j" d="" />
<glyph unicode="k" d="" />
<glyph unicode="l" d="" />
<glyph unicode="m" d="" />
<glyph unicode="n" d="" />
<glyph unicode="o" d="" />
<glyph unicode="p" d="" />
<glyph unicode="q" d="" />
<glyph unicode="r" d="" />
<glyph unicode="s" d="" />
<glyph unicode="t" d="" />
<glyph unicode="u" d="" />
<glyph unicode="v" d="" />
<glyph unicode="w" d="" />
<glyph unicode="x" d="" />
<glyph unicode="y" d="" />
<glyph unicode="z" d="" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

@ -6,10 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#F44336">
<link rel="stylesheet" href="fonts/material/Material_Icons.css">
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
<link rel="stylesheet" href="fonts/roboto/Roboto.css">
<link rel="stylesheet" href="node_modules/framework7/css/framework7.min.css">
<link rel="stylesheet" href="node_modules/framework7/css/framework7.bundle.min.css">
<link rel="stylesheet" href="css/notecards.css">
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" href="node_modules/@fortawesome/fontawesome-free/css/all.min.css">
<title>NotePost</title>
@ -25,7 +26,7 @@
<script src="cordova.js"></script>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/framework7/js/framework7.min.js"></script>
<script src="node_modules/framework7/js/framework7.bundle.min.js"></script>
<script src="node_modules/marked/marked.min.js"></script>
<script src="node_modules/shufflejs/dist/shuffle.min.js"></script>

@ -10,7 +10,7 @@ class Note {
if (typeof content != 'string') {
content = "";
}
if (typeof color != 'string') {
if (!/^[0-9A-F]{6}$/i.test(color)) {
color = "FFF59D";
}
if (typeof noteid != 'number') {
@ -186,7 +186,7 @@ class Note {
}
getTextColor() {
var color = this.getColor();
var color = this.getColor() + "";
var r = parseInt(color.substring(0, 2), 16);
var g = parseInt(color.substring(2, 4), 16);
var b = parseInt(color.substring(4, 6), 16);
@ -208,7 +208,7 @@ class Note {
}
setColor(color) {
if (typeof color !== 'string') {
if (!/^[0-9A-F]{6}$/i.test(color)) {
color = "FFF59D";
}
this.color = color;
@ -220,7 +220,7 @@ class Note {
title = "New note";
} else {
title = this.content.split('\n')[0];
title = title.replace(/[\*#_`]/, "");
title = title.replace(/[\*#_`]+/, "");
title = title.replace(/^- \[[x ]\] /i, "");
}
}

@ -1,67 +0,0 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
function saveme(callback) {
sync(); // update textareas with correct content
var noteid = $("#note_content").data("noteid");
var note = new Note();
if (noteid != "") {
note = NOTES.get(noteid);
if (note.getSyncStatus() != "LOCAL_ONLY") {
note.setSyncStatus("LOCAL_EDITED");
}
}
note.setText($("#note_content").val());
note.setModified();
NOTES.set(note);
NOTES.syncAll(function () {
app.toast.create({
text: 'Note saved.',
closeTimeout: 2000
}).open();
$("#orig_content").val(note.content);
if (typeof callback == "function") {
callback();
}
}, function () {
app.toast.create({
text: 'Note saved locally.',
closeTimeout: 2000
}).open();
$("#orig_content").val(note.content);
if (typeof callback == "function") {
callback();
}
});
}
function init() {
document.getElementById("noteframe").contentWindow.initEditor($("#note_content").val());
}
/**
* Get the text from the editor iframe and put it in the hidden textarea
* @returns {undefined}
*/
function sync() {
$("#note_content").val(document.getElementById("noteframe").contentWindow.getMarkdown());
}
function exiteditor() {
sync();
if ($("#note_content").val() == "" || $("#note_content").val() === $("#orig_content").val()) {
router.back({force: true, ignoreCache: true, reload: true});
} else {
saveme(function () {
router.back({force: true, ignoreCache: true, reload: true});
});
}
}
$("#noteframe").on("load", function () {
init();
});

@ -0,0 +1,294 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
class MarkdownEditor {
constructor(textarea, toolbar, buttons) {
this.textarea = textarea;
this.toolbar = toolbar;
if (typeof buttons != "undefined") {
for (var i = 0; i < buttons.length; i++) {
var div = document.createElement('div');
if (buttons[i]['spacer']) {
continue; // skip spacers
div.className = "toolbar-spacer";
div.innerHTML = "|";
} else {
div.className = "link toolbar-button";
if (typeof buttons[i]['linestart'] == "string") {
div.setAttribute("data-linestart", buttons[i]['linestart']);
div.setAttribute("data-padspace", buttons[i]['padspace'] ? 1 : 0);
div.setAttribute("data-maximum", buttons[i]['maximum']);
} else {
div.setAttribute("data-before", buttons[i]['before']);
div.setAttribute("data-after", buttons[i]['after']);
}
div.innerHTML = "<i class=\"" + buttons[i]['icon'] + " fa-fw\"></i>";
}
toolbar.appendChild(div);
}
}
var btns = toolbar.getElementsByClassName("toolbar-button");
var editorobj = this;
for (var i = 0; i < btns.length; i++) {
btns[i].addEventListener('click', function () {
if (editorobj.textarea.value.length == editorobj.getCursorPosition()[0] && editorobj.textarea.value.length == editorobj.getCursorPosition()[1]) {
//return;
}
if (typeof this.dataset.linestart == "string") {
editorobj.formatline(this.dataset.linestart, this.dataset.padspace, this.dataset.maximum);
} else {
editorobj.format(this.dataset.before, this.dataset.after);
}
editorobj.textarea.focus();
}, false);
}
}
formatline(start, padspace, maximum) {
var text = this.getText();
var cursor = this.getCursorPosition();
var startofline = cursor[0];
while (startofline - 1 > 0 && text[startofline - 1] != "\n") {
startofline--;
}
console.log("startofline", startofline, text[startofline - 1]);
// Check if the line is already formatted and count how many times
var falsestart = startofline;
var count = 0;
while (falsestart != text.length && text.slice(falsestart, falsestart + start.length) == start) {
falsestart += start.length;
count++;
}
console.log("falsestart", falsestart);
// Check if we're allowed to add another formatting mark
if (count > 0) {
if (maximum <= count) {
return;
}
}
// If it's the first one and a space is needed after
if (count == 0 && padspace == 1) {
start += " ";
}
text = [text.slice(0, startofline), start, text.slice(startofline)].join('');
this.textarea.value = text;
this.textarea.selectionStart = cursor[0] + start.length;
this.textarea.selectionEnd = cursor[0] + start.length;
}
format(before, after) {
var text = this.getText();
var cursor = this.getCursorPosition();
var origcursor = this.getCursorPosition();
if (cursor[0] == cursor[1]) {
// Walk backwards and forwards to get the whole word
while (cursor[0] - 1 >= 0 && text[cursor[0] - 1] != " " && text[cursor[0] - 1] != "\n") {
cursor[0]--;
}
while (cursor[1] < text.length && text[cursor[1]] != " " && text[cursor[1]] != "\n") {
cursor[1]++;
}
}
var subject = text.substring(cursor[0], cursor[1]);
if (subject.startsWith(before) && subject.endsWith(after)) {
// Don't do anything
return;
}
if (subject == "") {
subject = " ";
origcursor[0]++;
origcursor[1]++;
}
subject = before + subject + after;
text = [text.slice(0, cursor[0]), subject, text.slice(cursor[1])].join('');
this.textarea.value = text;
this.textarea.selectionStart = origcursor[0] + before.length;
this.textarea.selectionEnd = origcursor[1] + before.length;
}
getCursorPosition() {
var start = this.textarea.selectionStart;
var end = this.textarea.selectionEnd;
console.log([start, end], this.textarea.value.length);
return [start, end];
}
/**
* Get the textarea value, with an extra newline if needed.
* @returns string
*/
getText() {
var text = this.textarea.value;
// if (text[text.length - 1] != "\n") {
// text += "\n";
// }
return text;
}
}
var editor;
function initEditor() {
editor = new MarkdownEditor(
document.getElementById('note'),
document.getElementById("editor-toolbar"),
[
{
label: "Bold",
icon: "fas fa-bold",
before: "**",
after: "**"
},
{
label: "Italic",
icon: "fas fa-italic",
before: "*",
after: "*"
},
{
label: "Heading",
icon: "fas fa-heading",
linestart: "#",
padspace: true,
maximum: 6
},
{
label: "Strikethrough",
icon: "fas fa-strikethrough",
before: "~~",
after: "~~"
},
{
spacer: true
},
{
label: "Quote",
icon: "fas fa-quote-left",
linestart: "> ",
padspace: false,
maximum: 6
},
{
label: "Checklist",
icon: "fas fa-tasks",
linestart: "- [ ]",
padspace: true,
maximum: 1
},
{
label: "List",
icon: "fas fa-list-ul",
linestart: "-",
padspace: true,
maximum: 1
}
]);
document.getElementById('note').addEventListener('keydown', function (event) {
if (event.ctrlKey || event.metaKey) {
switch (String.fromCharCode(event.which).toLowerCase()) {
case 's':
event.preventDefault();
savenote();
break;
}
}
});
}
function getMarkdown() {
return document.getElementById('note').value;
}
var save_in_progress = false;
function savenote(callback) {
if (save_in_progress) {
console.log("Warning: save already in progress, doing nothing.");
return;
}
app.toast.create({
text: '<i class="fas fa-sync fa-spin"></i> &nbsp; Saving...',
closeTimeout: 2 * 60 * 1000 // two whole minutes should be enough for *any* connection.
}).open();
save_in_progress = true;
var noteid = $("#note").data("noteid");
var note = new Note();
var append = "";
if (noteid != "") {
note = NOTES.get(noteid);
if (note.getSyncStatus() != "LOCAL_ONLY") {
note.setSyncStatus("LOCAL_EDITED");
}
} else {
var tempuuid = Math.random() * 100000000000000000;
append = " <!-- MobileNewNoteSaveTempID:" + tempuuid + " -->";
}
note.setText($("#note").val() + append);
note.setModified();
NOTES.set(note);
NOTES.syncAll(function () {
app.toast.create({
text: '<i class="fas fa-check"></i> &nbsp; Note saved.',
closeTimeout: 3000
}).open();
$("#orignote").val(note.content);
if (append != "") {
for (n in NOTES.notes) {
if (NOTES.notes[n].getText().endsWith(append)) {
$("#note").data("noteid", NOTES.notes[n].noteid);
NOTES.notes[n].setText(NOTES.notes[n].getText().replace(append, ""));
}
}
}
save_in_progress = false;
if (typeof callback == "function") {
callback();
}
}, function () {
app.toast.create({
text: '<i class="fas fa-save"></i> &nbsp; Note saved locally.',
closeTimeout: 3000
}).open();
$("#orignote").val(note.content);
if (append != "") {
for (n in NOTES.notes) {
if (NOTES.notes[n].getText().endsWith(append)) {
$("#note").data("noteid", NOTES.notes[n].noteid);
NOTES.notes[n].setText(NOTES.notes[n].getText().replace(append, ""));
}
}
}
save_in_progress = false;
if (typeof callback == "function") {
callback();
}
});
}
function exiteditor() {
if ($("#note").val() == "" || $("#note").val() === $("#orignote").val()) {
router.back({force: true, ignoreCache: true, reload: true});
} else {
savenote(function () {
router.back({force: true, ignoreCache: true, reload: true});
});
}
}

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var force_card_refresh = false;
$(".view-main").on("ptr:refresh", ".ptr-content", function () {
loadCards(function () {
@ -51,7 +52,8 @@ $(".view-main").on("click", ".parsedown-task-list", function (e) {
});
function loadNotesToCards(notes, oldnotes, callback) {
if (notes.length == oldnotes.length) {
var reloadCards = true;
if (force_card_refresh != true && notes.length == oldnotes.length) {
var allSame = true;
var allPresent = true;
for (var n in notes) {
@ -63,17 +65,16 @@ function loadNotesToCards(notes, oldnotes, callback) {
}
}
if (allSame && allPresent) {
window.shuffleInstance.layout();
if (typeof callback == 'function') {
callback();
}
return;
reloadCards = false;
}
}
for (i in window.shuffleInstance.items) {
window.shuffleInstance.remove(window.shuffleInstance.items[i]);
force_card_refresh = false;
if (reloadCards) {
for (i in window.shuffleInstance.items) {
window.shuffleInstance.remove(window.shuffleInstance.items[i]);
}
$(".notecard-col").remove();
}
$(".notecard-col").remove();
var trayitems = [];
for (n in notes) {
var note = notes[n];
@ -81,38 +82,46 @@ function loadNotesToCards(notes, oldnotes, callback) {
if (note.getSyncStatus() == "LOCAL_DELETED") {
continue;
}
$("#notecards-bin").append('<div class="col-100 tablet-50 desktop-33 notecard-col grid-item" id="notecard-col-' + note.noteid + '" data-favorite="' + (note.favorite ? "1" : "0") + '">'
+ '<div class="card notecard" id="notecard-' + note.getID() + '" data-id="' + note.getID() + '" data-favorite="' + (note.getFavorite() ? "1" : "0") + '" data-bg="' + note.getColor() + '" data-fg="' + note.getTextColor() + '" style="background-color: #' + note.getColor() + '; color: #' + note.getTextColor() + ';">'
+ '<div class="editbtn">'
+ '<i class="material-icons">edit</i>'
+ '</div>'
+ '<div class="menubtn">'
+ '<i class="material-icons">more_vert</i>'
+ '</div>'
+ '<div class="card-content card-content-padding"><div class="btnswrapthing"></div>' + note.getHTML() + '</div>'
+ '</div>'
+ '</div>');
if (reloadCards) {
$("#notecards-bin").append('<div class="col-100 medium-50 large-33 notecard-col grid-item" id="notecard-col-' + note.noteid + '" data-favorite="' + (note.favorite ? "1" : "0") + '">'
+ '<div class="card notecard" id="notecard-' + note.getID() + '" data-id="' + note.getID() + '" data-favorite="' + (note.getFavorite() ? "1" : "0") + '" data-bg="' + note.getColor() + '" data-fg="' + note.getTextColor() + '" style="background-color: #' + note.getColor() + '; color: #' + note.getTextColor() + ';">'
+ '<div class="editbtn">'
+ '<i class="material-icons">edit</i>'
+ '</div>'
+ '<div class="menubtn">'
+ '<i class="material-icons">more_vert</i>'
+ '</div>'
+ '<div class="card-content card-content-padding"><div class="btnswrapthing"></div>' + note.getHTML() + '</div>'
+ '</div>'
+ '</div>');
}
trayitems.push({
title: note.getTitle(),
id: note.getID()
});
}
$(".notecard .card-content ul li:has(input[type=checkbox])").addClass("parsedown-task-list");
$(".notecard .card-content ul li:has(input[type=checkbox]:checkbox:not(:checked))").addClass("parsedown-task-list-open");
$(".notecard .card-content ul li:has(input[type=checkbox]:checkbox:checked)").addClass("parsedown-task-list-close");
$(".parsedown-task-list input[type=checkbox]").removeAttr("disabled");
var noteElements = document.getElementsByClassName("notecard-col");
window.shuffleInstance.add(noteElements);
window.shuffleInstance.sort({
reverse: true,
by: function (el) {
if (el.getAttribute("id") == "offline-indicator") {
return "999999999";
if (reloadCards) {
$(".notecard .card-content ul li:has(input[type=checkbox])").addClass("parsedown-task-list");
$(".notecard .card-content ul li:has(input[type=checkbox]:checkbox:not(:checked))").addClass("parsedown-task-list-open");
$(".notecard .card-content ul li:has(input[type=checkbox]:checkbox:checked)").addClass("parsedown-task-list-close");
$(".parsedown-task-list input[type=checkbox]").removeAttr("disabled");
var noteElements = document.getElementsByClassName("notecard-col");
window.shuffleInstance.add(noteElements);
window.shuffleInstance.sort({
reverse: true,
by: function (el) {
if (el.getAttribute("id") == "offline-indicator") {
return "999999999";
}
return el.getAttribute("data-favorite");
}
return el.getAttribute("data-favorite");
}
});
});
}
setTrayMenu(trayitems);
// Make sure gutters and stuff work
setTimeout(function () {
window.shuffleInstance.layout();
}, 500);
if (typeof callback == 'function') {
callback();
}
@ -121,10 +130,11 @@ function loadNotesToCards(notes, oldnotes, callback) {
function loadCards(callback) {
var oldnotes = NOTES.getAll().slice();
NOTES.syncAll(function (notes) {
$("#home-loading-progressbar").css("display", "none");
if ($("#offline-indicator").css("display") != "none") {
app.toast.create({
text: 'Back online.',
closeTimeout: 2000
text: '<i class="fas fa-globe-americas"></i> &nbsp; Back online.',
closeTimeout: 5000
}).open();
}
$("#offline-indicator").css("display", "none");
@ -132,13 +142,14 @@ function loadCards(callback) {
loadNotesToCards(notes, oldnotes, callback);
}, function (notes) {
$("#offline-indicator").css("display", "");
$("#home-loading-progressbar").css("display", "none");
loadNotesToCards(notes, oldnotes, callback);
});
}
function editNote(id) {
var note = NOTES.get(id);
router.navigate("/editnote", {
router.navigate("/editor", {
context: {
noteid: id,
content: note.getText(),
@ -162,6 +173,7 @@ function makeList(id) {
note.toChecklist();
note.setModified();
note.saveNote();
force_card_refresh = true;
app.ptr.refresh();
}
@ -173,7 +185,7 @@ function deleteNote(id) {
window.shuffleInstance.remove(document.getElementById("notecard-col-" + id));
$("#notecard-col-" + id).remove();
window.shuffleInstance.layout();
NOTES.syncAll();
loadCards();
});
}

@ -41,6 +41,7 @@ function shadeColor2(color, percent) {
}
function restartApplication() {
removeTrayMenu();
window.location = "index.html";
}
@ -64,13 +65,17 @@ router.on("pageInit", function (pagedata) {
// Run platform-specific setup code for Cordova or NW.js
initPlatform();
runCodeAfterPlatformInit(function () {
// Switch to dark theme if requested by user setting
setAppTheme();
if (localStorage.getItem("configured") == null) {
// Open the setup page
router.navigate("/setup/0");
} else {
APICLIENT = new NotePostAPI(localStorage.getItem("serverurl"), localStorage.getItem("username"), localStorage.getItem("password"));
NOTES = new Notes();
NOTES.loadAll();
router.navigate("/home");
}
if (localStorage.getItem("configured") == null) {
// Open the setup page
router.navigate("/setup/0");
} else {
APICLIENT = new NotePostAPI(localStorage.getItem("serverurl"), localStorage.getItem("username"), localStorage.getItem("password"));
NOTES = new Notes();
NOTES.loadAll();
router.navigate("/home");
}
});

@ -8,14 +8,32 @@ var platform_type = "";
var nw_tray = null;
var openBrowser = function (url) {
var app_version = "unknown";
var openBrowser = function (url) {
window.open(url);
}
var setTrayMenu = function (items) {
}
var removeTrayMenu = function () {
}
var setAppTheme = function () {
if (localStorage.getItem("darktheme") == "true") {
$("#app").addClass("theme-dark");
} else {
$("#app").removeClass("theme-dark");
}
}
var runCodeAfterPlatformInit = function (fun) {
fun();
}
function initCordova() {
platform_type = "cordova";
@ -30,16 +48,31 @@ function initCordova() {
router.navigate("/home");
}, false);
document.addEventListener("deviceready", function () {
if (cordova.platformId == 'android') {
StatusBar.backgroundColorByHexString("#D32F2F");
StatusBar.styleLightContent();
}
}, false);
openBrowser = function (url) {
cordova.InAppBrowser.open(url, '_blank', 'location=yes');
}
setAppTheme = function () {
if (localStorage.getItem("darktheme") == "true") {
$("#app").addClass("theme-dark");
if (cordova.platformId == 'android') {
StatusBar.styleBlackOpaque();
StatusBar.backgroundColorByHexString("#000000");
}
} else {
$("#app").removeClass("theme-dark");
if (cordova.platformId == 'android') {
StatusBar.styleDefault();
StatusBar.backgroundColorByHexString("#E0E0E0");
}
}
}
runCodeAfterPlatformInit = function (fun) {
document.addEventListener("deviceready", function () {
fun();
}, false);
}
}
function initNW() {
@ -78,6 +111,11 @@ function initNW() {
icon: 'www/img/logo_64.png'
});
removeTrayMenu = function () {
nw_tray.remove();
nw_tray = null;
}
setTrayMenu = function (items) {
var menu = new nw.Menu();
menu.append(new nw.MenuItem({
@ -145,6 +183,10 @@ function initNW() {
}
function initPlatform() {
$.getJSON("package.json", function (data) {
app_version = data.version;
});
if (typeof cordova !== 'undefined') {
initCordova();
} else if (typeof nw !== 'undefined') {

@ -0,0 +1,18 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
$('.item-content[data-setting=editor] .toggle input').on("change", function () {
var checked = $(this).prop('checked');
localStorage.setItem("alternateeditor", checked);
});
$('.item-content[data-setting=darktheme] .toggle input').on("change", function () {
var checked = $(this).prop('checked');
localStorage.setItem("darktheme", checked);
setAppTheme();
});

@ -1,16 +1,16 @@
{
"name": "com.netsyms.NotePostApp",
"displayName": "NotePost",
"version": "1.1.0",
"version": "1.3.2",
"description": "A cross-platform client app for NotePost.",
"author": "Netsyms Technologies",
"license": "MPL-2.0",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.6.3",
"easymde": "^2.4.2",
"framework7": "^3.6.5",
"jquery": "^3.3.1",
"marked": "^0.6.0",
"shufflejs": "^5.2.1"
"framework7": "^5.7.12",
"jquery": "^3.5.1",
"marked": "^1.1.1",
"shufflejs": "^5.2.3",
"@fortawesome/fontawesome-free": "^5.14.0",
"material-design-icons": "^3.0.1"
}
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,40 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="credits">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only back">
<i class="icon icon-back"></i>
</a>
</div>
<div class="title">Open Source</div>
</div>
</div>
<div class="page-content">
<div class="block">
<p>This program is licensed under the Mozilla Public License 2.0.
To get the source code, visit https://source.netsyms.com/Apps/NotePostApp.
<br>
This application relies on and is bundled with third-party code.
See below for the their licenses and where to find source code.
It is likely that not all of the listed third-party code is present
on your system; some of it is platform-specific and not included
in all builds.
</div>
<div class="block">
<h2>Third Party Code and Assets</h2>
<pre style="white-space: pre-line; overflow-wrap: break-word;">
{{credits}}
</pre>
</div>
</div>
</div>

@ -1,39 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="editnote">
<div class="navbar">
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only" onclick="exiteditor()">
<i class="icon icon-back"></i>
</a>
</div>
<div class="title">
{{#if notetitle}}
{{notetitle}}
{{else}}
New note
{{/if}}</div>
<div class="right">
<a href="#" onclick="saveme()" class="link icon-only">
<i class="fas fa-save"></i>
</a>
</div>
</div>
</div>
<div class="page-content">
<textarea id="note_content" style="display: none;" data-noteid="{{noteid}}">{{content}}</textarea>
<textarea id="orig_content" style="display: none;">{{content}}</textarea>
<iframe id="noteframe" src="pages/editor.html" style="width: 100%; height: 98%; border: 0px; padding: 0px; margin: 0px;"></iframe>
</div>
<script src="js/editnote.js"></script>
</div>

@ -1,71 +1,43 @@
<!DOCTYPE html>
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<title>Editor</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../node_modules/@fortawesome/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="../node_modules/easymde/dist/easymde.min.css">
<script src="../node_modules/easymde/dist/easymde.min.js"></script>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="editor">
<style>
body {
margin: 0px;
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
}
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only" onclick="exiteditor()">
<i class="icon icon-back"></i>
</a>
</div>
.CodeMirror {
border: none;
margin-top: 45px;
height: calc(100vh - 45px);
}
<div class="title">
{{#if notetitle}}
{{notetitle}}
{{else}}
New note
{{/if}}</div>
.editor-toolbar {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 99999;
background-color: white;
border: none;
border-radius: 0px;
/* Following lines are from Framework7 .elevation-2 */
-webkit-box-shadow: 0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);
box-shadow: 0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);
/* end Framework7 code */
}
</style>
<div class="right">
<a href="#" onclick="savenote()" class="link icon-only">
<i class="fas fa-save"></i>
</a>
</div>
</div>
</div>
<textarea id="note"></textarea>
<div class="toolbar toolbar-top">
<div class="toolbar-inner" id="editor-toolbar">
</div>
</div>
<script>
var easymde;
function initEditor(markdown) {
document.getElementById('note').value = markdown;
easymde = new EasyMDE({
element: document.getElementById("note"),
autoDownloadFontAwesome: false,
autofocus: true,
forceSync: true,
status: false,
spellChecker: false,
toolbar: [
"bold",
"italic",
"heading",
"|",
"quote",
"unordered-list",
"ordered-list",
"horizontal-rule"
]
});
}
<div class="page-content">
<textarea style="display: none;" id="orignote">{{content}}</textarea>
<textarea id="note" data-noteid="{{noteid}}">{{content}}</textarea>
</div>
function getMarkdown() {
return document.getElementById('note').value;
}
</script>
<script src="js/editor.js"></script>
</div>

@ -4,6 +4,7 @@
<div class="page" data-name="home">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="title">NotePost</div>
@ -40,10 +41,18 @@
<div class="ptr-arrow"></div>
</div>
<div id="home-loading-progressbar" class="block justify-content-center align-content-center align-items-center" style="height: calc(70vh - var(--f7-navbar-height)); display: flex;">
<p class="text-align-center">
<span class="progressbar-infinite" style="width: 30vw; max-width: 20em;"></span>
<br />
Loading...
</p>
</div>
<div class="row notecards-row" id="notecards-bin">
<div class="col-100 tablet-50 desktop-33" style="visibility: hidden;" id="notecard-col-sizer">
<div class="col-100 medium-50 large-33" style="visibility: hidden;" id="notecard-col-sizer">
</div>
<div class="col-100 tablet-50 desktop-33 grid-item" style="display: none;" id="offline-indicator">
<div class="col-100 medium-50 large-33 grid-item" style="display: none;" id="offline-indicator">
<div class="card">
<div class="card-content card-content-padding text-align-center text-color-gray">
<div><i class="material-icons" style="font-size: 40pt;">cloud_off</i></div>
@ -59,7 +68,7 @@
</div>
<div class="fab fab-right-bottom">
<a href="/editnote">
<a href="/editor">
<i class="material-icons">add</i>
</a>
</div>

@ -5,6 +5,7 @@
<div class="page" data-name="prefs">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only back">
@ -17,20 +18,84 @@
<div class="page-content">
<div class="list media-list">
<div class="list media-list no-margin-top no-hairlines tablet-inset">
<ul>
{{#each settings}}
<li class="item-content" data-setting="{{setting}}" onclick="{{onclick}}">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title">{{title}}</div>
<li>
{{#if link}}
<div class="item-content item-link" data-setting="{{setting}}" onclick="{{onclick}}">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title">{{title}}</div>
</div>
<div class="item-text">{{text}}</div>
</div>
<div class="item-text">{{text}}</div>
</div>
{{else}}
{{#if toggle}}
<div class="item-content" data-setting="{{setting}}">
<div class="item-inner">
<div style="display: flex; justify-content: between;">
<div class="item-title">
{{title}}
</div>
<div class="item-after" onclick="{{onclick}}">
<label class="toggle toggle-init">
<input type="checkbox" {{#if checked}}checked{{/if}}>
<span class="toggle-icon"></span>
</label>
</div>
</div>
<div class="item-text">{{text}}</div>
</div>
</div>
{{else}}
{{#if slider}}
<div class="item-content" data-setting="{{setting}}">
<div class="item-inner">
<div class="item-title" style="background-color: rgba(0,0,0,0);">
{{title}}
</div>
<div class="item-subtitle padding-horizontal padding-top">
<div class="range-slider range-slider-init padding-top margin-top" data-label="true">
<input type="range" min="{{min}}" max="{{max}}" step="{{step}}" value="{{value}}">
</div>
</div>
</div>
</div>
{{else}}
{{#if select}}
<a class="item-link smart-select smart-select-init" data-open-in="popover" data-setting="{{setting}}">
<select>
{{#each options}}
<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>
{{/each}}
</select>
<div class="item-content">
<div class="item-inner">
<div class="item-title">{{title}}</div>
</div>
</div>
</a>
{{else}}
<div class="item-content" data-setting="{{setting}}" onclick="{{onclick}}">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title">{{title}}</div>
</div>
<div class="item-text">{{text}}</div>
</div>
</div>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
</li>
{{/each}}
</ul>
</div>
</div>
<script src="js/settings.js"></script>
</div>

@ -5,6 +5,7 @@
<div class="page" data-name="setup0">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only back">

@ -5,6 +5,7 @@
<div class="page" data-name="setup1">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only back">

@ -81,11 +81,20 @@ var routes = [
{
setting: "account",
title: "Sign in to a different account",
link: true,
onclick: "router.navigate('/setup/0')"
},
{
setting: "darktheme",
title: "Use dark theme",
text: "Reduces eyestrain and saves power on some devices.",
toggle: true,
checked: localStorage.getItem("darktheme") == "true",
onclick: ""
},
{
setting: "versions",
title: "NotePost app v1.1.0",
title: "NotePost app v" + app_version,
text: "Copyright &copy; 2018-2019 Netsyms Technologies. License: <span style=\"text-decoration: underline;\" onclick=\"openBrowser('https://source.netsyms.com/Apps/NotePostApp?pk_campaign=NotePostApp');\">Mozilla Public License 2.0</span>.",
onclick: ""
},
@ -93,12 +102,14 @@ var routes = [
setting: "opensource",
title: "Open Source Information",
text: "",
link: true,
onclick: "router.navigate('/credits')"
},
{
setting: "privacy",
title: "Privacy Policy",
text: "",
link: true,
onclick: "openBrowser('https://netsyms.com/legal?pk_campaign=NotePostApp')"
}]
}
@ -111,8 +122,14 @@ var routes = [
name: 'credits'
},
{
path: '/editnote',
templateUrl: './pages/editnote.html',
name: 'editnote'
path: '/editor',
name: 'editor',
templateUrl: './pages/editor.html',
alias: '/editnote', // in case I missed any links
on: {
pageAfterIn: function () {
initEditor();
}
}
}
];

@ -2,110 +2,84 @@
# yarn lockfile v1
"@fortawesome/fontawesome-free@^5.6.3":
version "5.6.3"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.6.3.tgz#61c122c420d7a91613f393d6a06e5a4c6ae6abf3"
integrity sha512-s5PLdI9NYgjBvfrv6rhirPHlAHWx+Sfo/IjsAeiXYfmemC/GSjwsyz1wLnGPazbLPXWfk62ks980o9AmsxYUEQ==
"@fortawesome/fontawesome-free@^5.14.0":
version "5.14.0"
resolved "https://npm.fontawesome.com/@fortawesome/fontawesome-free/-/5.14.0/fontawesome-free-5.14.0.tgz#a371e91029ebf265015e64f81bfbf7d228c9681f"
integrity sha512-OfdMsF+ZQgdKHP9jUbmDcRrP0eX90XXrsXIdyjLbkmSBzmMXPABB8eobUJtivaupucYaByz6WNe1PI1JuYm3qA==
array-parallel@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/array-parallel/-/array-parallel-0.1.3.tgz#8f785308926ed5aa478c47e64d1b334b6c0c947d"
integrity sha1-j3hTCJJu1apHjEfmTRszS2wMlH0=
codemirror-spell-checker@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e"
integrity sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=
dom7@^2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/dom7/-/dom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377"
integrity sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==
dependencies:
typo-js "*"
ssr-window "^2.0.0"
codemirror@^5.41.0:
version "5.42.2"
resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.42.2.tgz#801ab715a7a7e1c7ed4162b78e9d8138b98de8f0"
integrity sha512-Tkv6im39VuhduFMsDA3MlXcC/kKas3Z0PI1/8N88QvFQbtOeiiwnfFJE4juGyC8/a4sb1BSxQlzsil8XLQdxRw==
dom7@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/dom7/-/dom7-2.1.2.tgz#a914070c0abe8465384997a9c4f34475f67f75bd"
integrity sha512-cGwWtpu7KY3JnbREGqG4EGC/u+1hyLfWVMqrqRjmwiO8d5i4B+0imLZAQ/cJbiXnjbs0pdIUzcUyeI9BbnyKNg==
dependencies:
ssr-window "^1.0.1"
easymde@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.4.2.tgz#c91f79893b6fa6f5cb4184c234fc49e1c2e51884"
integrity sha512-LQ+kt98qKBUiykFG8e4E+UJezIowpeku5vowdPeVMKLtEV8sU7xxPxqS3GgDZWwhO3HghEngNa70eJInSMHh6A==
dependencies:
codemirror "^5.41.0"
codemirror-spell-checker "1.1.2"
marked "^0.5.1"
framework7@^3.6.5:
version "3.6.5"
resolved "https://registry.yarnpkg.com/framework7/-/framework7-3.6.5.tgz#dbd3c044ad36df73a9ed57cde5467e3c7c0d137e"
integrity sha512-bKIeIepeumIZM75rFhuk6DSr9yqi+05EPbpkyKHZLFOdNFfhbEW1wr0PYpjVrMuuxO3iK9frhiUx982QhlhPqA==
framework7@^5.7.12:
version "5.7.12"
resolved "https://registry.yarnpkg.com/framework7/-/framework7-5.7.12.tgz#07975f9ab40fa5440c935263512a40a80cd0a1db"
integrity sha512-LCRvun2cvx32dIUbYoSOelP+z0K9L9ffbA82oq8/lYi/hNRqYCda2BlBEBdhkx1PUNTSOnt9TcUwAxD6rjdNFQ==
dependencies:
dom7 "^2.1.2"
path-to-regexp "^2.4.0"
ssr-window "^1.0.1"
template7 "^1.4.0"
jquery@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==
dom7 "^2.1.5"
path-to-regexp "^6.1.0"
ssr-window "^2.0.0"
template7 "^1.4.2"
marked@^0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.2.tgz#3efdb27b1fd0ecec4f5aba362bddcd18120e5ba9"
integrity sha512-fdZvBa7/vSQIZCi4uuwo2N3q+7jJURpMVCcbaX0S1Mg65WZ5ilXvC67MviJAsdjqqgD+CEq4RKo5AYGgINkVAA==
jquery@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5"
integrity sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==
marked@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.0.tgz#a18d01cfdcf8d15c3c455b71c8329e5e0f01faa1"
integrity sha512-HduzIW2xApSXKXJSpCipSxKyvMbwRRa/TwMbepmlZziKdH8548WSoDP4SxzulEKjlo8BE39l+2fwJZuRKOln6g==
marked@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/marked/-/marked-1.1.1.tgz#e5d61b69842210d5df57b05856e0c91572703e6a"
integrity sha512-mJzT8D2yPxoPh7h0UXkB+dBj4FykPJ2OIfxAWeIHrvoHDkFxukV/29QxoFQoPM6RLEwhIFdJpmKBlqVM3s2ZIw==
matches-selector@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/matches-selector/-/matches-selector-1.2.0.tgz#d1814e7e8f43e69d22ac33c9af727dc884ecf12a"
integrity sha512-c4vLwYWyl+Ji+U43eU/G5FwxWd4ZH0ePUsFs5y0uwD9HUEFBXUQ1zUUan+78IpRD+y4pUfG0nAzNM292K7ItvA==
path-to-regexp@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz#35ce7f333d5616f1c1e1bfe266c3aba2e5b2e704"
integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==
material-design-icons@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/material-design-icons/-/material-design-icons-3.0.1.tgz#9a71c48747218ebca51e51a66da682038cdcb7bf"
integrity sha1-mnHEh0chjrylHlGmbaaCA4zct78=
shufflejs@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/shufflejs/-/shufflejs-5.2.1.tgz#ebe68361aae24f28d597a2c71eaf58f340ee9f1a"
integrity sha512-qUu/1i4QHMUy/RQMH/FlNoXdliWTa5bWt55A/DeRRq7gD4kCJCMTCQK2k+r0buSREwTaZGLLu7c6E5dMueV0VA==
path-to-regexp@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.1.0.tgz#0b18f88b7a0ce0bfae6a25990c909ab86f512427"
integrity sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==
shufflejs@^5.2.3:
version "5.2.3"
resolved "https://registry.yarnpkg.com/shufflejs/-/shufflejs-5.2.3.tgz#67bd133b835ca728a1432b4be2eec821cc890d94"
integrity sha512-x/vb3Kdyb5X4GykbdOS49EU34jtMag2aYODL/z0nWT0DVFpWNk08xVeonKSMZnH4/piSWLjCkn4296BlxhvDnw==
dependencies:
array-parallel "^0.1.3"
matches-selector "^1.0.0"
throttleit "^1.0.0"
tiny-emitter "^2.0.1"
tiny-emitter "^2.1.0"
ssr-window@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-1.0.1.tgz#30752a6a4666e7767f0b7e6aa6fc2fdbd0d9b369"
integrity sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg==
ssr-window@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4"
integrity sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==
template7@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/template7/-/template7-1.4.0.tgz#d400af49ea56fc08cc835a20e6167a26b288fb1b"
integrity sha512-NMJWbKIoowHixUYIHq+DLvcBM47t/oZ/xfvBbYuMusjjS6BUjC02+gLWctntJuTTiEqILfefBNCXbfp/EMt/zQ==
template7@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/template7/-/template7-1.4.2.tgz#62f32959361e455ec171ef9ef33d29ca7130e009"
integrity sha512-eoKnScBMDk7lyj7+iCzKbxGiSLLlQk0DNvmclyJuMCUKxy9JrFuAB+GD5iplF4WiQPtMdI06CHHks3avL22JXA==
throttleit@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c"
integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=
tiny-emitter@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c"
integrity sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow==
typo-js@*:
version "1.0.3"
resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.0.3.tgz#54d8ebc7949f1a7810908b6002c6841526c99d5a"
integrity sha1-VNjrx5SfGngQkItgAsaEFSbJnVo=
tiny-emitter@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423"
integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save