Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
"react"
],
"plugins": [
"react-hot-loader/babel",
"transform-class-properties",
"rewire"
"transform-es2015-modules-commonjs",
"transform-class-properties"
]
}
}
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: node_js
node_js:
- "6"
42 changes: 40 additions & 2 deletions app/lib/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<link rel="stylesheet" type="text/css" href="../../node_modules/codemirror/lib/codemirror.css">
<link rel="stylesheet" type="text/css" href="../../node_modules/codemirror/addon/dialog/dialog.css">
<style>
body {
font-family: Helvetica, Arial, sans-serif;
}
#content {
position: absolute;
top: 0;
Expand All @@ -18,12 +21,47 @@
bottom: 0;
overflow: hidden;
}
body {
font-family: Helvetica, Arial, sans-serif;
@keyframes pulse {
0% {
opacity: 0.6;
}
50% {
opacity: 0.9;
}
100% {
opacity: 0.6;
}
}
#loading {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: white;
-webkit-app-region: drag;
}
#loading img {
animation: pulse 1.5s ease-in-out infinite;
}
#loading p {
font-size: 24px;
color: gray;
animation: pulse 1.5s ease-in-out infinite;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
</style>
</head>
<body>
<div id="loading">
<img width="300" src="../../resources/icon.svg" />
<p>Loading...</p>
</div>
<div id="content"></div>

<!-- Codemirror stuff -->
Expand Down
42 changes: 40 additions & 2 deletions app/lib/main.production.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<link rel="stylesheet" type="text/css" href="../../node_modules/codemirror/lib/codemirror.css">
<link rel="stylesheet" type="text/css" href="../../node_modules/codemirror/addon/dialog/dialog.css">
<style>
body {
font-family: Helvetica, Arial, sans-serif;
}
#content {
position: absolute;
top: 0;
Expand All @@ -18,12 +21,47 @@
bottom: 0;
overflow: hidden;
}
body {
font-family: Helvetica, Arial, sans-serif;
@keyframes pulse {
0% {
opacity: 0.6;
}
50% {
opacity: 0.9;
}
100% {
opacity: 0.6;
}
}
#loading {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: white;
-webkit-app-region: drag;
}
#loading img {
animation: pulse 1.5s ease-in-out infinite;
}
#loading p {
font-size: 24px;
color: gray;
animation: pulse 1.5s ease-in-out infinite;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
</style>
</head>
<body>
<div id="loading">
<img width="300" src="../../resources/icon.svg" />
<p>Loading...</p>
</div>
<div id="content"></div>

<!-- Codemirror stuff -->
Expand Down
18 changes: 18 additions & 0 deletions app/lib/menuTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ const template = [
},
{
role: 'togglefullscreen'
},
{
label: 'Single Layout',
accelerator: 'CmdOrCtrl + 1',
click: e => {
if (global.windows.main) {
global.windows.main.webContents.send('set-single-layout')
}
}
},
{
label: 'Two Pane Layout',
accelerator: 'CmdOrCtrl + 2',
click: e => {
if (global.windows.main) {
global.windows.main.webContents.send('set-two-pane-layout')
}
}
}
]
},
Expand Down
18 changes: 13 additions & 5 deletions docs/development/database.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Database

Inpad uses pouchDB as a storage and the pouchDB uses WebSQL as a default.
Inpad uses pouchDB as a storage and the pouchDB uses IndexedDB as a default.

## Apis

- Create/Update apis can take partial data. (Default values will be applied to any missing attributes.)
- Create/Update apis must return whole data and its id. (Redux store will use it without any further processing.)
- Delete api should return id.

## Default Storage

Expand All @@ -27,7 +33,7 @@ type | conventions
-------|--------------------
Note | `note:$RANDOM_HASH$`
Folder | `folder:$PATH_OF_FOLDER$`
Tag | `tag:$TAG$`
Tag | `tag:$TAG_NAME$`

### `$RANDOM_HASH$`

Expand All @@ -37,11 +43,13 @@ This is a string of 10 Random bytes. It can be issued easily by `main/lib/util.r

### `$PATH_OF_FOLDERS$`

This string should be a valid path. When creating a folder, the app will convert it into a valid path if it is invalid.
This string should be a valid path for Unix. `/` character will be used for seperating directory components.

When creating a folder, the app will convert it into a valid path if it is invalid.

### `$TAG$`
### `$TAG_NAME$`

Tag is a lowcased alphanumeric string. Spaces will be replaced with `_`.
Any character can be used for tag name.

## Schemes

Expand Down
18 changes: 12 additions & 6 deletions docs/development/keymap-and-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ macOS | Windows/Linux | Command via ipc or Action
**Cmd - R** | **Ctrl - R, F5** | Refresh
**Cmd - ,** | **Ctrl - ,** | `title:preferences`
**Cmd - P** | **Ctrl - P** | `detail:print` (ipc `print`)
**Cmd - 1** | **Ctrl - 1** | `detail:set-single-layout`
**Cmd - 2** | **Ctrl - 2** | `detail:set-two-pane-layout`

## Main

Expand Down Expand Up @@ -66,6 +68,7 @@ Right | Right | `list:focus`
Up | Up | `nav:up`
Down | Down | `nav:down`
D | D | `nav:delete`
Tab | Tab | `nav:toggle-tab`

### Commands

Expand Down Expand Up @@ -112,9 +115,12 @@ Cmd - ' | Ctrl - ' | `detail:focus-tag-select`

### Commands

Command | Action
------------------------|----------------------------
detail:focus-tag-select | Focus tag select
detail:focus | Focus Detail
detail:find | Start finding
detail:print | Print
Command | Action
---------------------------|----------------------------
detail:focus-tag-select | Focus tag select
detail:focus | Focus Detail
detail:find | Start finding
detail:print | Print
detail:set-single-layout | Set single layout
detail:set-two-pane-layout | Set two pane layout
detail:toggle-layout | Toggle layout
2 changes: 1 addition & 1 deletion gh-pages
49 changes: 42 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "inpad",
"productName": "Inpad",
"version": "0.1.0",
"version": "0.2.0",
"description": "A Polished Notes App with Github Flavored Markdown",
"main": "app/index.js",
"repository": {
"type" : "git",
"url" : "https://github.com/Sarah-Seo/Inpad.git"
"type": "git",
"url": "https://github.com/Sarah-Seo/Inpad.git"
},
"scripts": {
"start": "electron app/index.js",
Expand All @@ -18,8 +18,9 @@
"shasum": "shasum -a 256 dist/mac/Inpad-$npm_package_version.dmg",
"lint": "standard",
"webpack": "NODE_ENV=development webpack-dev-server --config webpack.config.js",
"test:run": "NODE_ENV=test electron ./tools/webpack-test.js",
"test:serve": "NODE_ENV=test webpack-dev-server --config webpack.config.js",
"test": "NODE_ENV=test jest",
"test:watch": "NODE_ENV=test jest --watch",
"todo": "fixme -i 'compiled/**' -i 'dist/**' -i 'resources/**' -i 'node_modules/**'",
"rebuild": "electron-rebuild"
},
"keywords": [
Expand All @@ -33,9 +34,10 @@
"devDependencies": {
"babel-core": "^6.18.0",
"babel-eslint": "^7.1.1",
"babel-jest": "^18.0.0",
"babel-loader": "^6.2.7",
"babel-plugin-rewire": "^1.0.0",
"babel-plugin-transform-class-properties": "^6.19.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-2": "^6.18.0",
Expand All @@ -46,10 +48,13 @@
"electron-devtools-installer": "^2.0.1",
"electron-rebuild": "^1.3.0",
"env-cmd": "^4.0.0",
"eslint-plugin-jest": "^1.0.2",
"extract-text-webpack-plugin": "^2.0.0-beta.4",
"file-loader": "^0.9.0",
"filenamify": "^1.2.1",
"fixme": "^0.4.2",
"immutable": "^3.8.1",
"jest": "^18.1.0",
"json-loader": "^0.5.4",
"lodash": "^4.16.6",
"moment": "^2.17.0",
Expand Down Expand Up @@ -88,7 +93,37 @@
"katex": "^0.6.0"
},
"standard": {
"parser": "babel-eslint"
"parser": "babel-eslint",
"plugins": [
"jest"
],
"envs": [
"jest"
]
},
"jest": {
"setupFiles": [
"<rootDir>/specs/utils/setup.js"
],
"testPathIgnorePatterns": [
"/node_modules/"
],
"moduleFileExtensions": [
"js",
"jsx",
"json"
],
"moduleDirectories": [
"node_modules"
],
"moduleNameMapper": {
"^main(.*)$": "<rootDir>/src/main$1",
"^lib(.*)$": "<rootDir>/src/lib$1",
"^components(.*)$": "<rootDir>/src/components$1",
"^specs(.*)$": "<rootDir>/specs$1",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/specs/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/specs/__mocks__/styleMock.js"
}
},
"build": {
"appId": "com.electron.Inpad",
Expand Down
Binary file removed resources/dmg.png
Binary file not shown.
Binary file removed resources/dmg@2x.png
Binary file not shown.
Binary file removed resources/install.gif
Binary file not shown.
Loading