Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Commit

Permalink
#2 Supported English display
Browse files Browse the repository at this point in the history
  • Loading branch information
tks-abe committed Feb 14, 2018
1 parent 7a81dbf commit ba9a2ee
Show file tree
Hide file tree
Showing 14 changed files with 549 additions and 473 deletions.
15 changes: 14 additions & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FlashAir™の無線LAN機能を使い、FlashAir IoT Hubを経由する事で

## Demo

![FlashAirFileManager Demo](https://github.com/FlashAirDevelopers/FlashAirFileManager/blob/master/img/doc/demo.gif)
![FlashAirFileManager Demo](https://github.com/FlashAirDevelopers/FlashAirFileManager/blob/master/img/doc/demo_ja.gif)

## Install

Expand Down Expand Up @@ -76,6 +76,19 @@ FlashAir™の無線LAN機能を使い、FlashAir IoT Hubを経由する事で
- アプリ起動時に「読み込み中...」と表示し続ける。
- メニューの リモート > ログアウト をクリックし、FlashAir IoT Hubに再ログインする事で解消する事があります。

## Changelog

- [0.3.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.0)
- 英語表示に対応しました。`メニュー > 言語`から言語を切り替え可能です。(日本語 / 英語)
- [0.2.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.1)
- 起動に失敗する問題を修正しました。
- [0.2.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.0)
- [FlashAir IoT Hub](https://iot-hub.flashair-developers.com)が提供するLuaスクリプトを使う様に変更。
- [0.1.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.1.1)
- ファイル一覧の取得に失敗する問題を修正しました。
- [0.1.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.1.0)
- 初回リリース。

## Licence

[Apache 2.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/blob/master/LICENSE.txt)
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,22 @@ Note: Since version 0.2.0, Lua scripts are using [FlashAir IoT Hub](https://iot-
- `cd node_modules/keytar`
- run `..\.bin\node-gyp rebuild --target=1.7.8 --arch=x64 --dist-url=https://atom.io/download/atom-shell`
- Please specify the version number of Electron for `- target` and the parameter of your environment for `--arch = x64`.
- Continue displaying "読み込み中...(in English "Loading")" at application startup.
- Continue displaying "Loading" at application startup.
- Click Remote> Logout on the menu. It may be solved by re-logging in to FlashAir IoT Hub.

## Changelog

- [0.3.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.0)
- Supported English display. You can switch display languages from `Menu> Language`.
- [0.2.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.1)
- Fixed issue that fails to start.
- [0.2.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.0)
- Changed to use Lua script provided by [FlashAir IoT Hub](https://iot-hub.flashair-developers.com).
- [0.1.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.1.1)
- Fixed issue that failed to get file list.
- [0.1.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.1.0)
- The first release.

## Licence

[Apache 2.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/blob/master/LICENSE.txt)
Expand Down
2 changes: 1 addition & 1 deletion electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"appId": "com.flashair-developers",
"productName": "FlashAirFileManger",
"asar": true,
"electronVersion": "1.7.10",
"electronVersion": "1.8.2",
"files": [
"static/**/*",
"node_modules/**/*",
Expand Down
Binary file modified img/doc/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/doc/demo_ja.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flashair-file-manager",
"version": "0.2.1",
"version": "0.3.0",
"description": "The application to browse and download files on FlashAir™ via the network.",
"homepage": "https://github.com/FlashAirDevelopers/FlashAirFileManager",
"main": "./src/main/main.js",
Expand All @@ -24,37 +24,38 @@
"author": "FlashAir Developers",
"license": "Apache-2.0",
"dependencies": {
"@openid/appauth": "^0.3.0",
"about-window": "^1.8.0",
"@openid/appauth": "^0.3.1",
"about-window": "^1.9.1",
"bootstrap": "^3.3.7",
"bootstrap-notify": "^3.1.3",
"bootstrap-select": "^1.12.4",
"electron-log": "^2.2.13",
"electron-json-storage": "^4.0.2",
"electron-log": "^2.2.14",
"es6-promise": "^4.1.1",
"handlebars": "^4.0.11",
"isomorphic-fetch": "^2.2.1",
"jquery": "^3.2.1",
"js-base64": "^2.4.0",
"js-base64": "^2.4.3",
"jssha": "^2.3.1",
"keytar": "^4.1.0",
"source-map-support": "^0.5.0",
"source-map-support": "^0.5.3",
"spin.js": "^3.1.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-eslint": "^8.2.1",
"babel-loader": "^7.1.2",
"babel-minify-webpack-plugin": "^0.2.0",
"babel-minify-webpack-plugin": "^0.3.0",
"babel-preset-es2015": "^6.24.1",
"babel-runtime": "^6.26.0",
"clean-webpack-plugin": "^0.1.17",
"cross-env": "^5.1.1",
"css-hot-loader": "^1.3.4",
"css-loader": "^0.28.7",
"electron": "^1.7.10",
"electron-builder": "^19.49.0",
"electron-webpack": "^1.11.0",
"eslint": "^4.13.1",
"clean-webpack-plugin": "^0.1.18",
"cross-env": "^5.1.3",
"css-hot-loader": "^1.3.6",
"css-loader": "^0.28.9",
"electron": "^1.8.2",
"electron-builder": "^19.56.0",
"electron-webpack": "^1.12.1",
"eslint": "^4.17.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
Expand All @@ -67,7 +68,7 @@
"node-loader": "^0.6.0",
"rcedit": "^0.9.0",
"shebang-loader": "^0.0.1",
"style-loader": "^0.19.1",
"style-loader": "^0.20.1",
"url-loader": "^0.6.2",
"webpack": "^3.10.0"
}
Expand Down
60 changes: 43 additions & 17 deletions src/common/resources.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2017 FlashAir Developers
* Copyright 2017-2018 FlashAir Developers
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -20,20 +20,46 @@
*/

export const resources = {
common_window_title: 'FlashAir File Manager',
menu_label_file: 'ファイル (F)',
menu_label_file_close: '終了 (X)',
menu_label_remote: 'リモート (L)',
menu_label_remote_logout: 'ログアウト',
menu_label_help: 'ヘルプ (H)',
menu_label_help_about: 'FlashAir File Manager について',
filer_label_local_file_name: '名前',
filer_label_local_file_date: '更新日付',
filer_label_remote_file_name: '名前',
filer_label_remote_file_date: '更新日付',
filer_msg_remote_download_progress: 'ダウンロード中...',
filer_msg_remote_download_completed: 'ダウンロードが完了しました。',
auth_msg_invalid_access_token: '認証処理が失敗しました。再度ログインし直してください。',
common_msg_loading: '読み込み中...',
common_msg_process_failure: '処理中にエラーが発生しました。'
ja: {
common_window_title: 'FlashAir File Manager',
menu_label_file: 'ファイル',
menu_label_file_close: '終了',
menu_label_remote: 'リモート',
menu_label_remote_logout: 'ログアウト',
menu_label_locale_language: '言語',
menu_label_locale_ja: '日本語',
menu_label_locale_en: '英語',
menu_label_help: 'ヘルプ',
menu_label_help_about: 'FlashAir File Manager について',
filer_label_local_file_name: '名前',
filer_label_local_file_date: '更新日付',
filer_label_remote_file_name: '名前',
filer_label_remote_file_date: '更新日付',
filer_msg_remote_download_progress: 'ダウンロード中...',
filer_msg_remote_download_completed: 'ダウンロードが完了しました。',
auth_msg_invalid_access_token: '認証処理が失敗しました。再度ログインし直してください。',
common_msg_loading: '読み込み中...',
common_msg_process_failure: '処理中にエラーが発生しました。'
},
'en-US': {
common_window_title: 'FlashAir File Manager',
menu_label_file: 'File',
menu_label_file_close: 'Close',
menu_label_remote: 'Remote',
menu_label_remote_logout: 'Log out',
menu_label_locale_language: 'Language',
menu_label_locale_ja: 'Japanese',
menu_label_locale_en: 'English',
menu_label_help: 'Help',
menu_label_help_about: 'About FlashAir File Manager',
filer_label_local_file_name: 'Name',
filer_label_local_file_date: 'Update date',
filer_label_remote_file_name: 'Name',
filer_label_remote_file_date: 'Update date',
filer_msg_remote_download_progress: 'Downloading...',
filer_msg_remote_download_completed: 'Download is completed.',
auth_msg_invalid_access_token: 'Authentication processing failed. Please login again.',
common_msg_loading: 'Loading...',
common_msg_process_failure: 'An error occurred while processing.'
}
};
8 changes: 4 additions & 4 deletions src/main/auth.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2017 FlashAir Developers
* Copyright 2017-2018 FlashAir Developers
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -25,7 +25,7 @@ import {AuthorizationRequest} from '@openid/appauth/built/authorization_request'
import {AuthorizationNotifier, AuthorizationRequestResponse, BUILT_IN_PARAMETERS} from '@openid/appauth/built/authorization_request_handler';
import {AuthorizationResponse} from '@openid/appauth/built/authorization_response';
import {AuthorizationServiceConfiguration} from '@openid/appauth/built/authorization_service_configuration';
import {generateRandom} from '@openid/appauth/built/crypto_utils';
import {cryptoGenerateRandom} from '@openid/appauth/built/crypto_utils';
import {AppAuthError} from '@openid/appauth/built/errors';
import {NodeBasedHandler} from '@openid/appauth/built/node_support/node_request_handler';
import {NodeRequestor} from '@openid/appauth/built/node_support/node_requestor';
Expand Down Expand Up @@ -119,7 +119,7 @@ class CodePair {
_makeCodeVerifier() {
// minimum raw length 32
// see: https://tools.ietf.org/html/rfc7636#section-4.1
return Base64.encodeURI(generateRandom(32));
return Base64.encodeURI(cryptoGenerateRandom(32));
}
// Base64url Encoding without Padding
// see: https://tools.ietf.org/html/rfc7636#appendix-A
Expand Down Expand Up @@ -220,7 +220,7 @@ export class Auth {
log.error('Unknown service configuration');
return;
}
this.authState = generateRandom(10);
this.authState = cryptoGenerateRandom(10);
// extra prameter for OAuth PKCE code_challenge
const extra = [];
if (this.codePair) {
Expand Down
Loading

0 comments on commit ba9a2ee

Please sign in to comment.