1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Fixed RN text field and gave different OneDrive token to demo

This commit is contained in:
Laurent Cozic 2017-10-30 21:29:36 +00:00
parent f1123c3483
commit 12b6902a49
13 changed files with 54 additions and 29 deletions

View File

@ -177,6 +177,12 @@ class Application {
continue;
}
if (arg == '--is-demo') {
Setting.setConstant('isDemo', true);
argv.splice(0, 1);
continue;
}
if (arg == '--update-geolocation-disabled') {
Note.updateGeolocationEnabled_ = false;
argv.splice(0, 1);

View File

@ -43,7 +43,7 @@ class OneDriveApiNodeUtils {
this.api().setAuth(null);
const port = await netUtils.findAvailablePort(this.possibleOAuthDancePorts());
const port = await netUtils.findAvailablePort(this.possibleOAuthDancePorts(), 0);
if (!port) throw new Error(_('All potential ports are in use - please report the issue at %s', 'https://github.com/laurent22/joplin'));
let authCodeUrl = this.api().authCodeUrl('http://localhost:' + port);

View File

@ -1,6 +1,6 @@
{
"name": "joplin",
"version": "0.10.61",
"version": "0.10.63",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -18,7 +18,7 @@
],
"owner": "Laurent Cozic"
},
"version": "0.10.61",
"version": "0.10.63",
"bin": {
"joplin": "./main.js"
},

View File

@ -2,6 +2,7 @@
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
npm version patch
#$SCRIPT_DIR/update-package-md5.sh
touch "$SCRIPT_DIR/app/main.js"

View File

@ -24,7 +24,7 @@ const opt = {
stdio: [process.stdin, process.stdout, process.stderr]
};
const app = spawn(joplinPath, ['--profile', profileDir], opt);
const app = spawn(joplinPath, ['--is-demo', '--profile', profileDir], opt);
app.on('close', (code) => {
process.exit(code);

View File

@ -1,6 +1,6 @@
{
"name": "demo-joplin",
"version": "1.0.3",
"version": "1.0.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -577,9 +577,9 @@
}
},
"joplin": {
"version": "0.10.58",
"resolved": "https://registry.npmjs.org/joplin/-/joplin-0.10.58.tgz",
"integrity": "sha512-4GPW+XMtX3Nol3llNBejn8xiVRpgMdWlzonY89GCeIJIFuIYzG3KZjoCz2ihY2c2oKl3nrfbR+I1GJmo2bJGTg==",
"version": "0.10.63",
"resolved": "https://registry.npmjs.org/joplin/-/joplin-0.10.63.tgz",
"integrity": "sha512-4he0I31I/PDWmw8gPNmlsPqCwHJfe+7jqOCKXYSMjhbm90Nxe/kPv96pog3FMLYPaCOXGu57LQlboD2szh+DkA==",
"requires": {
"app-module-path": "2.2.0",
"babel-plugin-transform-runtime": "6.23.0",
@ -610,7 +610,7 @@
"string-to-stream": "1.1.0",
"strip-ansi": "4.0.0",
"tcp-port-used": "0.1.2",
"tkwidgets": "0.5.16",
"tkwidgets": "0.5.19",
"uuid": "3.1.0",
"word-wrap": "1.2.3",
"yargs-parser": "7.0.0"
@ -1848,9 +1848,9 @@
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
"string-kit": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.6.2.tgz",
"integrity": "sha512-cKHH+s3kZHaoIwxM1BzhPY2fcYa/rNubUkMKyrOjNjrDgroGPyJDLflTYRRXhx6orfdOi0M2sYsuBa80oedeLA==",
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.6.3.tgz",
"integrity": "sha512-G2T92klsuE+S9mqdKQyWurFweNQV5X+FRzSKTqYHRdaVUN/4dL6urbYJJ+xb9ep/4XWm+4RNT8j3acncNhFRBg==",
"requires": {
"xregexp": "3.2.0"
}
@ -1955,7 +1955,7 @@
"get-pixels": "3.3.0",
"ndarray": "1.0.18",
"nextgen-events": "0.10.2",
"string-kit": "0.6.2",
"string-kit": "0.6.3",
"tree-kit": "0.5.26"
}
},
@ -1965,9 +1965,9 @@
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"tkwidgets": {
"version": "0.5.16",
"resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.16.tgz",
"integrity": "sha512-rXZF92F90FjXggpnag4XADzZvHfsfiRNERQ8jAPM17qCVeZX93Tv7MgYZRNSWS+cwYRhKsY0vpHbnhVcxucjmw==",
"version": "0.5.19",
"resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.19.tgz",
"integrity": "sha512-Etskz52RInmmB1aGD9cIodIZ33Gwf0yPP3+lh6ceANgS4N8LpquQajDRyahjZnvwDhfYdo1N87eEKzXBJbLQDg==",
"requires": {
"chalk": "2.3.0",
"node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",

View File

@ -1,6 +1,6 @@
{
"name": "demo-joplin",
"version": "1.0.3",
"version": "1.0.4",
"description": "Demo for Joplin CLI",
"bin": {
"demo-joplin": "./index.js"
@ -25,7 +25,7 @@
},
"dependencies": {
"fs-extra": "^4.0.2",
"joplin": "^0.10.58"
"joplin": "^0.10.63"
},
"author": "Laurent Cozic",
"license": "MIT"

View File

@ -6,7 +6,7 @@ Notes exported from Evernote via .enex files [can be imported](#importing-notes-
The notes can be [synchronised](#synchronisation) with various targets including the file system (for example with a network directory) or with Microsoft OneDrive. When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.
The application is still under development but is out of Beta and should be suitable for every day use.
The application is still under development but is out of Beta and should be suitable for every day use. The UI of the terminal client is built on top of the great [terminal-kit](https://github.com/cronvel/terminal-kit) library, and the Android client front end is done using [React Native](https://facebook.github.io/react-native/).
![Joplin Terminal Screenshot](https://github.com/laurent22/joplin/blob/master/docs/images/ScreenshotTerminal.png)

View File

@ -427,6 +427,9 @@ class NoteScreenComponent extends BaseScreenComponent {
bodyComponent = <NoteBodyViewer style={this.styles().noteBodyViewer} webViewStyle={theme} note={note} onCheckboxChange={(newBody) => { onCheckboxChange(newBody) }}/>
} else {
const focusBody = !isNew && !!note.title;
// Note: blurOnSubmit is necessary to get multiline to work.
// See https://github.com/facebook/react-native/issues/12717#issuecomment-327001997
bodyComponent = (
<TextInput
autoCapitalize="sentences"
@ -435,6 +438,7 @@ class NoteScreenComponent extends BaseScreenComponent {
multiline={true}
value={note.body}
onChangeText={(text) => this.body_changeText(text)}
blurOnSubmit={false}
/>
);
}

View File

@ -376,13 +376,14 @@ Setting.metadata_ = {
// Contains constants that are set by the application and
// cannot be modified by the user:
Setting.constants_ = {
'env': 'SET_ME',
'appName': 'joplin',
'appId': 'SET_ME', // Each app should set this identifier
'appType': 'SET_ME', // 'cli' or 'mobile'
'resourceDir': '',
'profileDir': '',
'tempDir': '',
env: 'SET_ME',
isDemo: false,
appName: 'joplin',
appId: 'SET_ME', // Each app should set this identifier
appType: 'SET_ME', // 'cli' or 'mobile'
resourceDir: '',
profileDir: '',
tempDir: '',
}
export { Setting };

View File

@ -7,6 +7,10 @@ parameters_.dev = {
id: 'cbabb902-d276-4ea4-aa88-062a5889d6dc',
secret: 'YSvrgQMqw9NzVqgiLfuEky1',
},
oneDriveDemo: {
id: '606fd4d7-4dfb-4310-b8b7-a47d96aa22b6',
secret: 'qabchuPYL7931$ePDEQ3~_$',
},
};
parameters_.prod = {
@ -14,10 +18,18 @@ parameters_.prod = {
id: 'e09fc0de-c958-424f-83a2-e56a721d331b',
secret: 'JA3cwsqSGHFtjMwd5XoF5L5',
},
oneDriveDemo: {
id: '606fd4d7-4dfb-4310-b8b7-a47d96aa22b6',
secret: 'qabchuPYL7931$ePDEQ3~_$',
},
};
function parameters() {
return parameters_[Setting.value('env')];
let output = parameters_[Setting.value('env')];
if (Setting.value('isDemo')) {
output.oneDrive = output.oneDriveDemo;
}
return output;
}
export { parameters }

View File

@ -32,9 +32,10 @@
"ReactNativeClient/android/.gradle",
"ReactNativeClient/android/local.properties",
"ReactNativeClient/ios",
"src/node_modules",
"node_modules",
"_vieux",
"tests/logs"
"tests/logs",
"_mydocs/mdtest/Pages/Countries",
],
"path": "."
},