Merge branch 'release/3.3.6'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -28,6 +28,8 @@
|
||||
|
||||
dump.rdb
|
||||
|
||||
index.html
|
||||
|
||||
# Ignore compiled assets
|
||||
/public/assets
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Standard Notes is a simple and private notes app available on most platforms, in
|
||||

|
||||
|
||||
<div align="center">
|
||||
|
||||
|
||||
[](https://github.com/standardnotes/desktop/releases)
|
||||
[](https://github.com/standardnotes/web/blob/master/LICENSE)
|
||||
[](https://standardnotes.org/slack)
|
||||
@@ -70,7 +70,8 @@ This repo contains the core code used in the web app, as well as the Electron-ba
|
||||
|
||||
1. Clone the repo
|
||||
2. `npm install`
|
||||
3. `npm start`
|
||||
3. `cp index.html.sample index.html`
|
||||
4. `npm start`
|
||||
|
||||
Then open your browser to `http://localhost:3000`.
|
||||
|
||||
|
||||
@@ -445,6 +445,7 @@ class AccountMenuCtrl extends PureCtrl {
|
||||
|
||||
async downloadDataArchive() {
|
||||
this.archiveManager.downloadBackup(this.state.mutable.backupEncrypted);
|
||||
this.close();
|
||||
}
|
||||
|
||||
notesAndTagsCount() {
|
||||
|
||||
@@ -29,16 +29,12 @@ export class ArchiveManager {
|
||||
keys = await this.authManager.keys();
|
||||
authParams = await this.authManager.getAuthParams();
|
||||
}
|
||||
const data = await this.__itemsData(items, keys, authParams);
|
||||
this.__downloadData(data,
|
||||
`Standard Notes Encrypted Backup and Import File - ${this.__formattedDate()}.txt`);
|
||||
} else {
|
||||
this.__downloadZippedItems(items);
|
||||
}
|
||||
this.__itemsData(items, keys, authParams).then((data) => {
|
||||
const modifier = encrypted ? "Encrypted" : "Decrypted";
|
||||
this.__downloadData(data, `Standard Notes ${modifier} Backup - ${this.__formattedDate()}.txt`);
|
||||
|
||||
// download as zipped plain text files
|
||||
if(!keys) {
|
||||
this.__downloadZippedItems(items);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if(await this.privilegesManager.actionRequiresPrivilege(PrivilegesManager.ActionManageBackups)) {
|
||||
@@ -89,9 +85,19 @@ export class ArchiveManager {
|
||||
|
||||
__downloadZippedItems(items) {
|
||||
this.__loadZip(() => {
|
||||
zip.createWriter(new zip.BlobWriter("application/zip"), (zipWriter) => {
|
||||
zip.createWriter(new zip.BlobWriter("application/zip"), async (zipWriter) => {
|
||||
var index = 0;
|
||||
|
||||
const data = await this.modelManager.getJSONDataForItems(items);
|
||||
await new Promise((resolve) => {
|
||||
const blob = new Blob([data], {type: 'text/plain'});
|
||||
zipWriter.add(
|
||||
'Standard Notes Backup and Import File.txt',
|
||||
new zip.BlobReader(blob),
|
||||
resolve
|
||||
);
|
||||
});
|
||||
|
||||
const nextFile = () => {
|
||||
var item = items[index];
|
||||
var name, contents;
|
||||
@@ -113,7 +119,7 @@ export class ArchiveManager {
|
||||
const fileSuffix = `-${item.uuid.split("-")[0]}.txt`;
|
||||
// Standard max filename length is 255. Slice the note name down to allow filenameEnd
|
||||
filePrefix = filePrefix.slice(0, (255 - fileSuffix.length));
|
||||
const fileName = `${item.content_type}/${filePrefix}${fileSuffix}`;
|
||||
const fileName = `Items/${item.content_type}/${filePrefix}${fileSuffix}`;
|
||||
zipWriter.add(fileName, new zip.BlobReader(blob), () => {
|
||||
index++;
|
||||
if(index < items.length) {
|
||||
|
||||
4
dist/javascripts/app.js
vendored
4
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/stylesheets/app.css
vendored
2
dist/stylesheets/app.css
vendored
File diff suppressed because one or more lines are too long
2
dist/stylesheets/app.css.map
vendored
2
dist/stylesheets/app.css.map
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,7 @@
|
||||
<!-- <!DOCTYPE html> -->
|
||||
<!--
|
||||
This file is strictly used for local development using the webpack-dev-server.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="app">
|
||||
|
||||
<head>
|
||||
@@ -22,7 +25,7 @@
|
||||
<meta ng-bind="title" content="Standard Notes" name="apple-mobile-web-app-title" />
|
||||
<meta ng-bind="title" content="Standard Notes" name="application-name" />
|
||||
|
||||
<title>Notes · Standard Notes</title>
|
||||
<title>Dev · Notes · Standard Notes</title>
|
||||
|
||||
<script>
|
||||
window._default_sf_server = "https://sync.standardnotes.org";
|
||||
@@ -30,8 +33,8 @@
|
||||
window._batch_manager_location = "public/extensions/batch-manager/dist/index.min.html";
|
||||
</script>
|
||||
|
||||
<script src="dist/javascripts/app.js"></script>
|
||||
<link rel="stylesheet" media="all" href="dist/stylesheets/app.css" debug="false" />
|
||||
<script src="javascripts/app.js"></script>
|
||||
<link rel="stylesheet" media="all" href="stylesheets/app.css" debug="false" />
|
||||
|
||||
</head>
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "standard-notes-web",
|
||||
"version": "3.3.5",
|
||||
"version": "3.3.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -7481,9 +7481,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||
},
|
||||
"log-symbols": {
|
||||
"version": "2.2.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "standard-notes-web",
|
||||
"version": "3.3.5",
|
||||
"version": "3.3.6",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -9,7 +9,9 @@
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server --progress",
|
||||
"bundle": "webpack --mode production",
|
||||
"build": "bundle install && npm ci && bundle exec rails assets:precompile && npm run bundle",
|
||||
"precompile:assets": "bundle exec rails assets:precompile",
|
||||
"postinstall": "npm run precompile:assets",
|
||||
"build": "bundle install && npm ci && npm run precompile:assets && npm run bundle",
|
||||
"submodules": "git submodule update --init --force --remote",
|
||||
"test": "karma start karma.conf.js --single-run",
|
||||
"lint": "eslint --fix app/assets/javascripts/**/*.js"
|
||||
@@ -53,6 +55,6 @@
|
||||
"webpack-dev-server": "^3.10.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.15"
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
}
|
||||
|
||||
Submodule public/extensions/batch-manager updated: 3897593b98...46471a4969
Submodule public/extensions/extensions-manager updated: bda6ed93a0...1fb1ff1b52
@@ -2,6 +2,8 @@ const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
const port = 3000;
|
||||
|
||||
module.exports = {
|
||||
entry: './app/assets/javascripts/index.js',
|
||||
output: {
|
||||
@@ -10,11 +12,15 @@ module.exports = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/extensions': {
|
||||
target: 'http://localhost:3000',
|
||||
target: `http://localhost:${port}`,
|
||||
pathRewrite: { '^/extensions': '/public/extensions' }
|
||||
},
|
||||
'/assets': {
|
||||
target: `http://localhost:${port}`,
|
||||
pathRewrite: { '^/assets': '/public/assets' }
|
||||
}
|
||||
},
|
||||
port: 3000
|
||||
port
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
|
||||
Reference in New Issue
Block a user