chore: add prettier(1st step) (#7)

Author:    hexxa <hexxa@outlook.com>
This commit is contained in:
Hexxa 2018-05-31 08:26:07 -05:00 committed by GitHub
parent ac05637658
commit 86aa39c526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 58 additions and 51 deletions

View file

@ -12,7 +12,7 @@ import { Log } from "../components/composite/log";
function getWidth() {
if (window.innerWidth >= window.innerHeight) {
return `${Math.floor(
window.innerWidth * 0.95 / config.rootSize / config.colWidth
(window.innerWidth * 0.95) / config.rootSize / config.colWidth
) * config.colWidth}rem`;
}
return "auto";

View file

@ -1,18 +1,18 @@
## FAQ
* How to change accound name and password?
* Go to quickshare folder
* Open config.json using text editor. (e.g. notpad++, sublime, vscode, etc...)
* Search for line `"AdminPwd": "quicksh@re",`
* Replace `quicksh@re` with your password, e.g. `"AdminPwd": "myPassword",`
* Then you can also update user name `"AdminId": "myUserName",` in above way.
* How to change listening address(or port)?
* Go to quickshare folder
* Open config.json using text editor. (e.g. notpad++, sublime, vscode, etc...)
* Search for line `"HostName": "",`
* Change the value of `HostName`, e.g. `"HostName": "192.168.0.6",`
* You can also change port value (`"Port": 8888,`) in above way
* How to change background?
* Go to `public` folder under quickshare folder
* Open style.css using text editor. (e.g. notpad++, sublime, vscode, etc...)
* Update `body`'s css.
- How to change accound name and password?
- Go to quickshare folder
- Open config.json using text editor. (e.g. notpad++, sublime, vscode, etc...)
- Search for line `"AdminPwd": "quicksh@re",`
- Replace `quicksh@re` with your password, e.g. `"AdminPwd": "myPassword",`
- Then you can also update user name `"AdminId": "myUserName",` in above way.
- How to change listening address(or port)?
- Go to quickshare folder
- Open config.json using text editor. (e.g. notpad++, sublime, vscode, etc...)
- Search for line `"HostName": "",`
- Change the value of `HostName`, e.g. `"HostName": "192.168.0.6",`
- You can also change port value (`"Port": 8888,`) in above way
- How to change background?
- Go to `public` folder under quickshare folder
- Open style.css using text editor. (e.g. notpad++, sublime, vscode, etc...)
- Update `body`'s css.

View file

@ -1,17 +1,17 @@
## 常见问题
* 怎么改用户名和密码?
* 进入 quickshare 文件夹
* 用文本编辑器打开 config.json. (比如 notpad++, sublime, vscode, 等等...)
* 查找行 `"AdminPwd": "quicksh@re",`
* 用你的密码替换 `quicksh@re`, 比如 `"AdminPwd": "你的密码",`
* 怎么改监听地址(端口)?
* 进入 quickshare 文件夹
* 用文本编辑器打开 config.json. (比如 notpad++, sublime, vscode, 等等...)
* 查找行 `"HostName": "",`
* 更改`HostName`的值, 比如 `"HostName": "192.168.0.6",`
* 你可以用上面的方法更改端口值(`"Port": 8888,`)
* 怎么更改背景?
* 进入 quickshare 文件夹下的`public`文件夹
* 使用文本编辑器打开 style.css. (比如 notpad++, sublime, vscode, 等等...)
* 更新 `body`'的 css
- 怎么改用户名和密码?
- 进入 quickshare 文件夹
- 用文本编辑器打开 config.json. (比如 notpad++, sublime, vscode, 等等...)
- 查找行 `"AdminPwd": "quicksh@re",`
- 用你的密码替换 `quicksh@re`, 比如 `"AdminPwd": "你的密码",`
- 怎么改监听地址(端口)?
- 进入 quickshare 文件夹
- 用文本编辑器打开 config.json. (比如 notpad++, sublime, vscode, 等等...)
- 查找行 `"HostName": "",`
- 更改`HostName`的值, 比如 `"HostName": "192.168.0.6",`
- 你可以用上面的方法更改端口值(`"Port": 8888,`)
- 怎么更改背景?
- 进入 quickshare 文件夹下的`public`文件夹
- 使用文本编辑器打开 style.css. (比如 notpad++, sublime, vscode, 等等...)
- 更新 `body`'的 css

View file

@ -22,18 +22,18 @@
## 下载
* Linux: [Download](https://github.com/ihexxa/quickshare/releases/download/0.0.16/quickshare_0.0.16_linux_x86_64.zip)
* Mac: [Download](https://github.com/ihexxa/quickshare/releases/download/0.0.16/quickshare_0.0.16_macos_x86_64.zip)
* Windows: [Download](https://github.com/ihexxa/quickshare/releases/download/0.0.16/quickshare_0.0.16_windows_x86_64.zip)
- Linux: [Download](https://github.com/ihexxa/quickshare/releases/download/0.0.16/quickshare_0.0.16_linux_x86_64.zip)
- Mac: [Download](https://github.com/ihexxa/quickshare/releases/download/0.0.16/quickshare_0.0.16_macos_x86_64.zip)
- Windows: [Download](https://github.com/ihexxa/quickshare/releases/download/0.0.16/quickshare_0.0.16_windows_x86_64.zip)
## 特点
* 在浏览器中上传下载, 无需安装任何客户端
* 在桌面电脑和移动设备件间共享文件
* 绿色软件
* 支持添加本地文件
* 支持添加文件下载次数上限
* 支持断点续传
- 在浏览器中上传下载, 无需安装任何客户端
- 在桌面电脑和移动设备件间共享文件
- 绿色软件
- 支持添加本地文件
- 支持添加文件下载次数上限
- 支持断点续传
## 安装
@ -43,24 +43,24 @@
### Linux
* 解压包: `unzip [package].` (`[package]` 可以是`quickshare_0.0.8_linux_x86_6 4.zip`)
* 进入文件夹, 启动 quickshare `./quickshare`
- 解压包: `unzip [package].` (`[package]` 可以是`quickshare_0.0.8_linux_x86_6 4.zip`)
- 进入文件夹, 启动 quickshare `./quickshare`
### Mac
* 解压包: `unzip [package].` (`[package]` 可以是`quickshare_0.0.8_macos_x86_6 4.zip`)
* 进入文件夹, 启动 quickshare `./quickshare`
- 解压包: `unzip [package].` (`[package]` 可以是`quickshare_0.0.8_macos_x86_6 4.zip`)
- 进入文件夹, 启动 quickshare `./quickshare`
### Windows
* 解压包
* 进入文件夹, 双击 `quickshare.exe` 启动 quickshare
- 解压包
- 进入文件夹, 双击 `quickshare.exe` 启动 quickshare
最后一步, 在浏览器中面基 quickshare.
* Quickshare 会在启动后, 在命令中输出中显示 `quickshare starts @ [URL]` (举个栗子 `URL` 可以是 `192.168.0.1:8888`)
* 在浏览器中打开 `URL` 并使用 `admin``quicksh@re` 登入
* 开耍(不过别忘改密码[常见问题文档](./FAQ_zh-cn.md))
- Quickshare 会在启动后, 在命令中输出中显示 `quickshare starts @ [URL]` (举个栗子 `URL` 可以是 `192.168.0.1:8888`)
- 在浏览器中打开 `URL` 并使用 `admin``quicksh@re` 登入
- 开耍(不过别忘改密码[常见问题文档](./FAQ_zh-cn.md))
### 常见问题

View file

@ -9,7 +9,9 @@
"build-client": "webpack --config ./client/webpack.config.prod.js",
"build-client-dev": "webpack --config ./client/webpack.config.dev.js",
"clean": "go clean && rm -r ./dist && rm -r ./public/dist",
"fmt": "go fmt ./...",
"ci-check-fmt": "yarn prettier -l '@(client|docs)/*.@(js|jsx|md)'",
"fmt":
"go fmt ./... && yarn prettier --write '@(client|docs)/*.@(js|jsx|md)'",
"setup": "yarn && dep ensure",
"start": "yarn build-client && go run server.go",
"test": "go test -v ./... && yarn jest --coverage"
@ -37,6 +39,7 @@
"html-webpack-plugin": "^3.2.0",
"jest": "^21.2.1",
"md5": "^2.2.1",
"prettier": "^1.13.3",
"react-addons-test-utils": "^15.6.2",
"react-test-renderer": "15",
"regenerator-runtime": "^0.11.1",

View file

@ -5307,6 +5307,10 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.3.tgz#e74c09a7df6519d472ca6febaa37cf7addb48a20"
pretty-error@^2.0.2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"