├── .editorconfig
├── .env
├── .flowconfig
├── .gitignore
├── .snyk
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── LICENSE
├── PULL_REQUEST_TEMPLATE.md
├── Procfile
├── README.md
├── assets
└── icon
│ ├── icon.icns
│ ├── icon.ico
│ ├── icon.iconset
│ ├── icon_1024x1024.png
│ ├── icon_128x128.png
│ ├── icon_128x128@2x.png
│ ├── icon_16x16.png
│ ├── icon_16x16@2x.png
│ ├── icon_256x256.png
│ ├── icon_256x256@2x.png
│ ├── icon_32x32.png
│ ├── icon_32x32@2x.png
│ ├── icon_512x512.png
│ ├── icon_512x512@2x.png
│ ├── icon_64x64.png
│ └── icon_64x64@2x.png
│ ├── mac.sh
│ ├── original.png
│ └── win.sh
├── build-script
├── asar_packing.js
├── build.js
├── compressor.js
├── exec_platform.js
├── files.js
└── platform.js
├── images
└── ss@0,5x.jpg
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
├── manifest.json
└── reset.css
├── src
├── component
│ ├── App.jsx
│ ├── Dialog
│ │ ├── AddAccountDialog
│ │ │ ├── AddAccountDialog.jsx
│ │ │ ├── InputInstanceView.jsx
│ │ │ ├── InputPinView.jsx
│ │ │ └── SelectAccountTypeView.jsx
│ │ ├── AddTimelineDialog
│ │ │ ├── AccountList.jsx
│ │ │ ├── AddTimelineDialog.jsx
│ │ │ └── TimelineTypeList.jsx
│ │ └── Dialog.jsx
│ ├── Notification
│ │ └── Notification.jsx
│ ├── Sidebar
│ │ ├── AccountIcon
│ │ │ ├── AccountIcon.jsx
│ │ │ └── Icon.jsx
│ │ ├── AccountList.jsx
│ │ └── Sidebar.jsx
│ └── TimelineView
│ │ ├── Timeline.jsx
│ │ ├── TimelineComponents
│ │ ├── ContentForm
│ │ │ ├── ContentField.jsx
│ │ │ ├── ContentForm.jsx
│ │ │ ├── ReplySource.jsx
│ │ │ └── SendButton.jsx
│ │ ├── ContentView
│ │ │ ├── Content
│ │ │ │ ├── Common.jsx
│ │ │ │ ├── Content.jsx
│ │ │ │ ├── Contents.jsx
│ │ │ │ ├── FavRt.jsx
│ │ │ │ ├── Follow.jsx
│ │ │ │ ├── Notification.jsx
│ │ │ │ └── Retweeted.jsx
│ │ │ ├── ContentList.jsx
│ │ │ └── Parts
│ │ │ │ ├── Buttons.jsx
│ │ │ │ ├── Icon.jsx
│ │ │ │ ├── MiniAccountCard.jsx
│ │ │ │ └── MiniContentCard.jsx
│ │ └── Toolbar
│ │ │ ├── InfoBar.jsx
│ │ │ ├── ProgressBar.jsx
│ │ │ ├── TimelineMenu.jsx
│ │ │ └── Title.jsx
│ │ └── TimelineView.jsx
├── container
│ ├── App.js
│ ├── Dialog.js
│ ├── Sidebar.js
│ └── TimelineView.js
├── core
│ ├── Services.js
│ ├── alloc
│ │ ├── allocatedObjectType.js
│ │ ├── allocation.js
│ │ ├── createAllocatedObject.js
│ │ ├── mstdn_streaming_data.js
│ │ └── twitter_streaming_data.js
│ ├── client
│ │ ├── client.js
│ │ ├── oauth.js
│ │ └── oauth2.js
│ ├── constant
│ │ ├── _instanceList.js
│ │ ├── dataType.js
│ │ ├── requestType.js
│ │ └── timelineType.js
│ ├── difference
│ │ ├── account.js
│ │ ├── api.js
│ │ ├── api_urls.js
│ │ ├── content.js
│ │ ├── error.js
│ │ ├── eventType.js
│ │ ├── notice.js
│ │ └── streaming_api.js
│ ├── object
│ │ ├── Account.js
│ │ ├── Record.js
│ │ └── Timeline.js
│ ├── testdata
│ │ ├── mastodon
│ │ │ ├── origami_account.json
│ │ │ └── origami_tweetlist.json
│ │ └── twitter
│ │ │ ├── arclisp_account.json
│ │ │ └── arclisp_tweetlist.json
│ └── value
│ │ ├── Content.js
│ │ ├── Error.js
│ │ ├── Event.js
│ │ └── User.js
├── helper
│ ├── copyInstance
│ │ ├── copyInstance.js
│ │ └── copyInstance.spec.js
│ └── scanner
│ │ ├── scanner.js
│ │ └── scanner.spec.js
├── index.js
├── main
│ ├── Application.js
│ ├── electron-starter.js
│ └── electron-wait-react.js
└── redux
│ ├── action
│ └── index.js
│ ├── api
│ ├── auth.js
│ ├── logger.js
│ ├── storage.js
│ └── streaming
│ │ ├── mastodon_streaming.js
│ │ └── twitter_streaming.js
│ ├── constant
│ ├── dialogs.js
│ └── index.js
│ ├── reducer
│ ├── account.js
│ ├── auth.js
│ ├── dialog.js
│ ├── index.js
│ ├── notification.js
│ ├── style.js
│ └── timeline.js
│ ├── saga
│ ├── api.js
│ ├── application.js
│ ├── authorization.js
│ ├── index.js
│ ├── logout.js
│ └── streaming.js
│ ├── selectors
│ ├── app.js
│ ├── dialog.js
│ ├── sidebar.js
│ └── timeline.js
│ └── store
│ └── index.js
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 |
8 | [*]
9 |
10 | # Change these settings to your own preference
11 | indent_style = space
12 | indent_size = 4
13 |
14 | # We recommend you to keep these unchanged
15 | end_of_line = lf
16 | charset = utf-8
17 | trim_trailing_whitespace = true
18 | insert_final_newline = true
19 |
20 | [*.md]
21 | trim_trailing_whitespace = false
22 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | ELECTRON_DEBUG_BUILD=1
2 |
3 |
--------------------------------------------------------------------------------
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | .*/node_modules/.*
3 |
4 | [include]
5 |
6 | [libs]
7 |
8 | [options]
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 | /release
12 |
13 | # misc
14 | .DS_Store
15 | npm-debug.log*
16 | yarn-debug.log*
17 | yarn-error.log*
18 |
19 | # ide
20 | .vscode
21 | .idea
22 |
23 | # ?
24 | src/core/constant/instanceList.js
25 |
--------------------------------------------------------------------------------
/.snyk:
--------------------------------------------------------------------------------
1 | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2 | version: v1.11.0
3 | ignore: {}
4 | # patches apply the minimum changes required to fix a vulnerability
5 | patch:
6 | 'npm:shell-quote:20160621':
7 | - foreman > shell-quote:
8 | patched: '2018-04-29T07:57:50.823Z'
9 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "8"
4 | cache:
5 | directories:
6 | - node_modules
7 | install:
8 | - npm install
9 | - npm install -g codecov
10 | script:
11 | - npm run test
12 | after_script:
13 | - codecov
14 | before_deploy:
15 | - sudo dpkg --add-architecture i386
16 | - wget -nc https://dl.winehq.org/wine-builds/Release.key
17 | - sudo apt-key add Release.key
18 | - sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
19 | - sudo apt update
20 | - sudo apt install --install-recommends -y winehq-stable
21 | - npm run release
22 | deploy:
23 | provider: releases
24 | skip_cleanup: true
25 | api_key:
26 | secure: fZOQ8wgmX7mTsPPRnAElvRhtxN59xCByxXhBjp/GWjVI2raFcUvNDoVwRveeUzsSIM962eaHVR50MmiRQZgKEZDcD6iUykUvmN3tpM++gPHe4B9igs3crZ8TsH2wBJYG/zIvLNv0xgdqQS82I83JU30M2skm6aYnSxZWNCr4HxAgeVTiZbYpqhGNLXmKyExoCKTAF55Wiakv/vOp/n3dIi8y9hhc2ea05ZjEJKm7ezzf+C71z8MudzFWygX9SMKIWrhq8FRlaXDii9RluvJ2ampWiB6s3ZuJ8Raki6Ema/m4BObDlkKYUQm5fCCnSBONTsJcmjhtu+Tm6cutwlZ354ngRts7JAfhoY6IWf3iLTpFDpdbcXTZ10WOWjK0U41+K3Ffcc9EZQL5pLfllznG+4Cs04Jh+nUVZ5xu7K5dpoIlFTY1isMawrdebW2VOyHKVD7v08VZwN7lqXbcP7i7oEMOHv57zgzudpuj3wLA5INjnABnm8jxd25iH/9y07OxC5gJtSnq9dBuaQbj/7kvD0d9fzTp0dxRqm0gE95Rsuw7KWcgznwBkUjto9+ebSi9EkQYbo70vKqFrrvXf1rU7tZt02b4dNkqBLRsBT6LrQ/2/ukFyVYHelZAWdHdn6j7w1uOXZXF3/tkxSykzX4fKoAlYhVUMa1bTVelNVi73D4=
27 | file:
28 | - release/Tsuru-linux-x64.tar.gz
29 | - release/Tsuru-win32-x64.zip
30 | - release/Tsuru-mas-x64.zip
31 | - release/Tsuru-darwin-x64.zip
32 | on:
33 | tags: true
34 | repo: tsuruclient/tsuru
35 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at arclisp@twitter.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing guideline
2 | FREEDOM
3 |
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Tsuru
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | react: npm start
2 | electron: node src/main/electron-wait-react
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # redeveloping in progress
2 | [tsuruclient/core]にて本質部分を全て設計からやり直しているため、暫くの間Tsuruの更新は停止されます。
3 |
4 | # Tsuru
5 | [](https://travis-ci.org/tsuruclient/tsuru) [](https://codecov.io/gh/tsuruclient/tsuru)
6 |
7 | Twitter, GNU Social, Mastodonのアカウントを一つの画面にまとめて表示できるTweetdeck風クライアントです。
8 | 
9 |
10 | ## LICENSE
11 | このソフトウェアはMIT License下において公開されています。
12 |
--------------------------------------------------------------------------------
/assets/icon/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.icns
--------------------------------------------------------------------------------
/assets/icon/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.ico
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_1024x1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_1024x1024.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_128x128.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_128x128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_128x128@2x.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_16x16.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_16x16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_16x16@2x.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_256x256.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_256x256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_256x256@2x.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_32x32.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_32x32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_32x32@2x.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_512x512.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_512x512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_512x512@2x.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_64x64.png
--------------------------------------------------------------------------------
/assets/icon/icon.iconset/icon_64x64@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/icon.iconset/icon_64x64@2x.png
--------------------------------------------------------------------------------
/assets/icon/mac.sh:
--------------------------------------------------------------------------------
1 | iconutil --convert icns --output icon.icns icon.iconset
2 |
--------------------------------------------------------------------------------
/assets/icon/original.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/assets/icon/original.png
--------------------------------------------------------------------------------
/assets/icon/win.sh:
--------------------------------------------------------------------------------
1 | # required imagemagick
2 | convert \
3 | ./icon.iconset/icon_16x16.png \
4 | ./icon.iconset/icon_32x32.png \
5 | ./icon.iconset/icon_64x64.png \
6 | ./icon.iconset/icon_128x128.png \
7 | ./icon.iconset/icon_256x256.png \
8 | ./icon.iconset/icon_512x512.png \
9 | ./icon.iconset/icon_1024x1024.png \
10 | icon.ico
11 |
--------------------------------------------------------------------------------
/build-script/asar_packing.js:
--------------------------------------------------------------------------------
1 | const files = require('./files');
2 | const del = require('del');
3 | const execSync = require('child_process').execSync;
4 | require('colors');
5 |
6 | module.exports = (platform) => {
7 | console.log('Compressing to asar...');
8 | const filepath = files.release_directory + files.app_dir[platform];
9 | execSync('asar pack ' + filepath + ' ' + filepath + '.asar');
10 | return del(files.release_directory + files.app_dir[platform] + '/');
11 | };
12 |
--------------------------------------------------------------------------------
/build-script/build.js:
--------------------------------------------------------------------------------
1 | const promisify = require("es6-promisify");
2 | const child_process = require('child_process');
3 | const exec = promisify(child_process.exec);
4 | const execSync = child_process.execSync;
5 |
6 | const exec_platform = require('./exec_platform');
7 | require('colors');
8 |
9 | console.log('Start build...'.green);
10 | exec('npm run build').then((status)=>{
11 | console.log(status);
12 | console.log('"build" succeeded.'.blue);
13 | console.log('now executed "package"'.green);
14 | try{
15 | execSync('npm run package');
16 | console.log('successfully packing'.blue);
17 | }catch (e){
18 | console.log('skipped something build'.red);
19 | }
20 | console.log('"package" succeeeded.\n'.blue);
21 | return exec_platform();
22 | }).then(() => {
23 | console.log("build succeeded!".blue);
24 | process.exit(0);
25 | }).catch((err) => {
26 | console.error(err);
27 | console.error('build failed.'.red);
28 | process.exit(1);
29 | });
30 |
--------------------------------------------------------------------------------
/build-script/compressor.js:
--------------------------------------------------------------------------------
1 | const AdmZip = require('adm-zip');
2 | const targz = require('targz');
3 | const platforms = require('./platform');
4 | const files = require('./files');
5 |
6 | const compress_targz = (platform) => {
7 | return new Promise((resolve, reject) => {
8 | targz.compress({
9 | src: files.release_directory + files.release_dir[platform],
10 | dest: files.release_directory + files.release_dir[platform] + '.tar.gz'
11 | }, function(err){
12 | if(err) {
13 | reject(err);
14 | } else {
15 | resolve();
16 | }
17 | });
18 | })
19 | };
20 |
21 | const compress_zip = (platform) => {
22 | return new Promise((resolve, reject) => {
23 | let zip = new AdmZip();
24 | zip.addLocalFolder(files.release_directory + files.release_dir[platform]);
25 | zip.writeZip(files.release_directory + files.release_dir[platform] + '.zip');
26 | resolve();
27 | })
28 | };
29 |
30 | module.exports = (platform) => {
31 | if(platform === platforms.linux){
32 | return compress_targz(platform);
33 | }else{
34 | return compress_zip(platform);
35 | }
36 | };
37 |
--------------------------------------------------------------------------------
/build-script/exec_platform.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const del = require('del');
3 | const platforms = require('./platform');
4 | const files = require('./files');
5 | const asar_packing = require('./asar_packing');
6 | const compressor = require('./compressor');
7 |
8 | module.exports = () => {
9 | return new Promise((resolve, reject) => {
10 | Object.keys(platforms).forEach((platform, index, array) => {
11 | try {
12 | fs.statSync(files.release_directory + files.app_dir[platform]);
13 | del(files.file[platform]).then(paths => {
14 | return asar_packing(platform);
15 | }).then(paths => {
16 | return compressor(platform);
17 | }).then(() => {
18 | console.log((platform + ' build succeeded!').blue);
19 | if(array.length === index) resolve();
20 | }).catch(e => {
21 | if(array.length === index) resolve();
22 | });
23 | } catch (e) {
24 | console.log((platform + " release build does't exists.").red);
25 | }
26 | });
27 | })
28 | };
29 |
--------------------------------------------------------------------------------
/build-script/files.js:
--------------------------------------------------------------------------------
1 | const platform = require('./platform');
2 |
3 | const data = {
4 | release_directory: './release/',
5 | release_dir: {
6 | [platform.win32]: 'Tsuru-'+ platform.win32 +'-x64',
7 | [platform.darwin]: 'Tsuru-' + platform.darwin+ '-x64',
8 | [platform.mas]: 'Tsuru-' + platform.mas + '-x64',
9 | [platform.linux]: 'Tsuru-' + platform.linux + '-x64',
10 | },
11 | app_dir: {
12 | [platform.win32]: 'Tsuru-'+ platform.win32 +'-x64/resources/app',
13 | [platform.darwin]: 'Tsuru-' + platform.darwin+ '-x64/Tsuru.app/Contents/Resources/app',
14 | [platform.mas]: 'Tsuru-' + platform.mas + '-x64/Tsuru.app/Contents/Resources/app',
15 | [platform.linux]: 'Tsuru-' + platform.linux + '-x64/resources/app',
16 | },
17 | files: [
18 | '.idea',
19 | '.vscode',
20 | 'images',
21 | '.editorconfig',
22 | '.env',
23 | '.flowconfig',
24 | '.gitignore',
25 | 'create-react-app-readme.md',
26 | 'Procfile',
27 | 'build-script',
28 | 'public',
29 | 'package-lock.json',
30 | 'yarn.lock',
31 | '.travis.yaml',
32 | 'jest.config.js',
33 | 'coverage',
34 | 'src/component',
35 | 'src/container',
36 | 'src/core',
37 | 'src/helper',
38 | 'src/redux',
39 | 'src/index.js',
40 | 'build/static/css/*.css.map',
41 | 'build/static/js/*.js.map',
42 | '*.log',
43 | ],
44 | file: {
45 | [platform.win32]: undefined,
46 | [platform.darwin]: undefined,
47 | [platform.mas]: undefined,
48 | [platform.linux]: undefined,
49 | }
50 | };
51 |
52 | Object.keys(data.app_dir).forEach(directory =>{
53 | data.file[directory] = data.files.map(file => data.release_directory + data.app_dir[directory] + '/' + file);
54 | });
55 |
56 | module.exports = data;
57 |
--------------------------------------------------------------------------------
/build-script/platform.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | win32: 'win32',
3 | mas: 'mas',
4 | darwin: 'darwin',
5 | linux: 'linux',
6 | };
7 |
--------------------------------------------------------------------------------
/images/ss@0,5x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/images/ss@0,5x.jpg
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tsuru",
3 | "version": "0.1.0",
4 | "private": true,
5 | "main": "src/main/electron-starter.js",
6 | "homepage": "./",
7 | "dependencies": {
8 | "about-window": "^1.10.0",
9 | "electron-json-storage": "^4.0.2",
10 | "es6-promisify": "^5.0.0",
11 | "log": "^1.4.0",
12 | "oauth": "^0.9.15",
13 | "opn": "^5.2.0",
14 | "request": "^2.83.0",
15 | "safe-buffer": "^5.1.1",
16 | "snyk": "^1.75.0"
17 | },
18 | "scripts": {
19 | "start": "react-scripts start",
20 | "build": "react-scripts build",
21 | "test": "react-scripts test --env=jsdom --coverage",
22 | "test-watch": "react-scripts test --env=jsdom",
23 | "electron": "electron .",
24 | "dev": "nf start",
25 | "flow": "flow",
26 | "package": "electron-packager . Tsuru --platform=all --arch=x64 --prune --out=release --overwrite",
27 | "release": "node ./build-script/build",
28 | "snyk-protect": "snyk protect",
29 | "prepare": "npm run snyk-protect"
30 | },
31 | "devDependencies": {
32 | "adm-zip": "^0.4.9",
33 | "asar": "^0.14.3",
34 | "colors": "^1.2.3",
35 | "del": "^3.0.0",
36 | "dotenv": "^4.0.0",
37 | "electron": "^1.8.6",
38 | "electron-load-devtool": "^1.0.0",
39 | "electron-packager": "^10.1.2",
40 | "flow-bin": "^0.61.0",
41 | "foreman": "^2.0.0",
42 | "jest": "^22.4.3",
43 | "jest-cli": "^22.4.3",
44 | "material-ui": "^1.0.0-beta.44",
45 | "material-ui-icons": "^1.0.0-beta.36",
46 | "query-string": "^5.1.0",
47 | "react": "^16.3.2",
48 | "react-devtools": "^3.1.0",
49 | "react-dom": "^16.3.2",
50 | "react-redux": "^5.0.7",
51 | "react-scripts": "1.1.1",
52 | "react-virtualized": "^9.18.5",
53 | "recompose": "^0.26.0",
54 | "redux": "^3.7.2",
55 | "redux-actions": "^2.3.0",
56 | "redux-devtools": "^3.4.1",
57 | "redux-logger": "^3.0.6",
58 | "redux-saga": "^0.16.0",
59 | "reselect": "^3.0.1",
60 | "styled-components": "^3.2.6",
61 | "targz": "^1.0.1",
62 | "webpack": "^3.11.0"
63 | },
64 | "snyk": true
65 | }
66 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tsuruclient/tsuru/fac1107b87eb33e49577d53f3a6aa7f3cca8722d/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 |
23 | Tsuru
24 |
25 |
26 |
29 |
30 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "Tsuru",
3 | "name": "Tsuru 0.1.0 Pre Alpha",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/public/reset.css:
--------------------------------------------------------------------------------
1 | /* http://meyerweb.com/eric/tools/css/reset/
2 | v2.0 | 20110126
3 | License: none (public domain)
4 | */
5 |
6 | html, body, div, span, applet, object, iframe,
7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8 | a, abbr, acronym, address, big, cite, code,
9 | del, dfn, em, img, ins, kbd, q, s, samp,
10 | small, strike, strong, sub, sup, tt, var,
11 | b, u, i, center,
12 | dl, dt, dd, ol, ul, li,
13 | fieldset, form, label, legend,
14 | table, caption, tbody, tfoot, thead, tr, th, td,
15 | article, aside, canvas, details, embed,
16 | figure, figcaption, footer, header, hgroup,
17 | menu, nav, output, ruby, section, summary,
18 | time, mark, audio, video {
19 | margin: 0;
20 | padding: 0;
21 | border: 0;
22 | font-size: 100%;
23 | font: inherit;
24 | vertical-align: baseline;
25 | }
26 | /* HTML5 display-role reset for older browsers */
27 | article, aside, details, figcaption, figure,
28 | footer, header, hgroup, menu, nav, section {
29 | display: block;
30 | }
31 | body {
32 | line-height: 1;
33 | }
34 | ol, ul {
35 | list-style: none;
36 | }
37 | blockquote, q {
38 | quotes: none;
39 | }
40 | blockquote:before, blockquote:after,
41 | q:before, q:after {
42 | content: '';
43 | content: none;
44 | }
45 | table {
46 | border-collapse: collapse;
47 | border-spacing: 0;
48 | }
49 |
50 | html, body{
51 | width: 100%;
52 | height: 100%;
53 | }
--------------------------------------------------------------------------------
/src/component/App.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 |
3 | import React from 'react';
4 | import {lifecycle} from 'recompose';
5 | import styled from 'styled-components';
6 | import {MuiThemeProvider} from 'material-ui/styles';
7 |
8 | import Sidebar from '../container/Sidebar';
9 | import TimelineView from '../container/TimelineView';
10 | import Dialog from '../container/Dialog';
11 |
12 | type Props = {
13 | theme: Object,
14 | initApp: Function,
15 | };
16 |
17 | const Main = styled.div`
18 | width: 100vw;
19 | height: 100vh;
20 | display: flex;
21 | flex-direction: row;
22 | background-color: ${props => props.theme.palette.background.default};
23 | `;
24 |
25 | const App = (props: Props) => {
26 | return (
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | )
35 | };
36 |
37 | const AppComponent = lifecycle({
38 | componentWillMount(){
39 | this.props.initApp();
40 | }
41 | })(App);
42 |
43 | export default AppComponent;
44 |
--------------------------------------------------------------------------------
/src/component/Dialog/AddAccountDialog/AddAccountDialog.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 |
3 | import React from 'react';
4 | import {pure} from 'recompose';
5 | import {withStyles} from 'material-ui/styles';
6 | import Dialog from 'material-ui/Dialog';
7 |
8 | import {AddAccountDialogName} from '../../../redux/constant/dialogs';
9 | import SelectAccountTypeView from './SelectAccountTypeView';
10 | import InputInstanceView from './InputInstanceView';
11 | import InputPinView from './InputPinView';
12 |
13 | const styles = () => ({
14 | root: {
15 |
16 | },
17 | content: {
18 | width: '420px',
19 | }
20 | });
21 |
22 | type Props = {
23 | classes: Object,
24 | dialogData: Object,
25 | closeDialog: Function,
26 | selectInstance: Function,
27 | forwardInputSection: Function,
28 | forwardPinAuthSection: Function,
29 | backSection: Function,
30 | openPinAuthWindow: Function,
31 | startAuth: Function,
32 | };
33 |
34 | const handleRequestClose = (step: number, closeDialog: Function): Function => (
35 | () => step !== 2 ? closeDialog({dialogName: AddAccountDialogName}) : null
36 | );
37 |
38 | const handleClose = (closeDialog: Function): Function => (
39 | () => closeDialog({dialogName: AddAccountDialogName})
40 | );
41 |
42 | const AddAccountDialog = pure((props: Props) => (
43 |
62 | ));
63 |
64 | export default withStyles(styles)(AddAccountDialog);
65 |
--------------------------------------------------------------------------------
/src/component/Dialog/AddAccountDialog/InputInstanceView.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 |
3 | import React, {PureComponent} from 'react';
4 | import {withStyles} from 'material-ui/styles';
5 | import Button from 'material-ui/Button';
6 | import { DialogActions,
7 | DialogContent,
8 | DialogContentText,
9 | DialogTitle } from 'material-ui/Dialog';
10 | import TextField from 'material-ui/TextField';
11 |
12 | import instances from '../../../core/constant/_instanceList';
13 |
14 | const styles = theme => ({
15 | root: {
16 |
17 | }
18 | });
19 |
20 | const errorType = {
21 | INSTANCENAME: 'INSTANCENAME',
22 | APIKEY: 'APIKEY',
23 | APISECRET: 'APISECRET',
24 | };
25 |
26 | type Props = {
27 | classes: Object,
28 | selected: number,
29 | forwardPinAuthSection: Function,
30 | openPinAuthWindow: Function,
31 | };
32 |
33 | type State = {
34 | domain: string,
35 | consumerKey: string,
36 | consumerSecret: string,
37 | err: ?string
38 | };
39 |
40 | class InputInstanceView extends PureComponent {
41 | constructor(props: Props) {
42 | super(props);
43 | this.handleNextButton = this.handleNextButton.bind(this);
44 | }
45 |
46 | state = {
47 | domain: '',
48 | consumerKey: '',
49 | consumerSecret: '',
50 | err: null,
51 | }
52 |
53 | handleNextButton() {
54 | this.setState({err: null});
55 | const status = instances[Object.keys(instances)[this.props.selected]];
56 | console.log(status);
57 | try{
58 | if (status.type !== 'Twitter'){
59 | status.instance = this.state.domain.trim();
60 | status.apiurl = 'https://' + status.instance + '/';
61 | if (status.instance === '') throw errorType.INSTANCENAME;
62 | }
63 | status.apikey = this.state.consumerKey.trim();
64 | status.apisecret = this.state.consumerSecret.trim();
65 | if (status.apikey === '') throw errorType.APIKEY;
66 | if (status.apisecret === '') throw errorType.APISECRET;
67 |
68 | this.props.openPinAuthWindow(status);
69 | this.props.forwardPinAuthSection();
70 | }catch(e){
71 | this.setState({err: e});
72 | }
73 | }
74 |
75 | render() {
76 | return (
77 |
78 | {'追加したいアカウントの情報を入力してください'}
79 |
80 | {'consumer-key, consumer-secretはアカウントが登録されているインスタンスから発行されたものを使用する必要があります。インスタンスによっては外部アプリケーション連携が不可能な場合もあります。その場合登録することはできません'}
81 | this.setState({domain: event.target.value})}
84 | id='api-url'
85 | label='Domain Name(example: mstdn.jp, friends.nico)'
86 | margin='normal'
87 | error={this.state.err === errorType.INSTANCENAME}
88 | fullWidth />
89 | this.setState({consumerKey: event.target.value})}
92 | id='api-key'
93 | label='Consumer Key'
94 | margin='normal'
95 | error={this.state.err === errorType.APIKEY}
96 | fullWidth />
97 | this.setState({consumerSecret: event.target.value})}
100 | id='api-key-secret'
101 | label='Consumer Secret'
102 | margin='normal'
103 | error={this.state.err === errorType.APISECRET}
104 | fullWidth />
105 |
106 |
107 |
108 |
109 | );
110 | }
111 | }
112 |
113 | export default withStyles(styles)(InputInstanceView);
114 |
--------------------------------------------------------------------------------
/src/component/Dialog/AddAccountDialog/InputPinView.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 |
3 | import React, {PureComponent} from 'react';
4 | import {withStyles} from 'material-ui/styles';
5 | import Button from 'material-ui/Button';
6 | import { DialogActions,
7 | DialogContent,
8 | DialogTitle } from 'material-ui/Dialog';
9 | import TextField from 'material-ui/TextField';
10 |
11 | const styles = () => ({
12 | root: {
13 |
14 | },
15 | });
16 |
17 | type Props = {
18 | classes: Object,
19 | onRequestClose: Function,
20 | startAuth: Function,
21 | };
22 |
23 | type State = {
24 | pin: string,
25 | };
26 |
27 | class InputPinView extends PureComponent {
28 | constructor(props: Props) {
29 | super(props);
30 | this.handleCancelClick = this.handleCancelClick.bind(this);
31 | this.handleAuthClick = this.handleAuthClick.bind(this);
32 | }
33 |
34 | state = {
35 | pin: '',
36 | }
37 |
38 | handleCancelClick() {
39 | this.props.onRequestClose();
40 | }
41 |
42 | handleAuthClick() {
43 | if(this.state.pin.trim() !== '') {
44 | this.props.startAuth({pin: this.state.pin});
45 | }
46 | }
47 |
48 | render() {
49 | return (
50 |
51 | {"Activate Account"}
52 |
53 | this.setState({pin: event.target.value})}
56 | id="insert-pin"
57 | label="Input PIN Here..."
58 | margin="normal"
59 | fullWidth/>
60 |
61 |
62 |
65 |
68 |
69 |
70 | );
71 | }
72 | }
73 |
74 | export default withStyles(styles)(InputPinView);
75 |
--------------------------------------------------------------------------------
/src/component/Dialog/AddAccountDialog/SelectAccountTypeView.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 |
3 | import React from 'react';
4 | import {pure} from 'recompose';
5 | import { withStyles } from 'material-ui/styles';
6 | import Button from 'material-ui/Button';
7 | import List, { ListItem,
8 | ListItemText,
9 | ListItemSecondaryAction } from 'material-ui/List';
10 | import { DialogActions,
11 | DialogContent,
12 | DialogContentText } from 'material-ui/Dialog';
13 | import Radio from 'material-ui/Radio';
14 |
15 | import instances from '../../../core/constant/_instanceList';
16 |
17 | const styles = () => ({
18 | list: {
19 | maxHeight: 320,
20 | overflowY: 'auto',
21 | }
22 | });
23 |
24 | type Props = {
25 | classes: Object,
26 | selected: number,
27 | selectInstance: Function,
28 | forwardInputSection: Function,
29 | forwardPinAuthSection: Function,
30 | openPinAuthWindow: Function,
31 | };
32 |
33 | const handleClickForwardButton = (props: Props): Function => (
34 | () => {
35 | if(props.selected <= 1) { // 1以下はcommon扱い…
36 | props.forwardInputSection();
37 | }else{
38 | props.openPinAuthWindow(instances[Object.keys(instances)[props.selected]]);
39 | props.forwardPinAuthSection();
40 | }
41 | }
42 | );
43 |
44 | const handleItemSelected = (index: number, select: Function): Function => (
45 | () => (select({selected: index}))
46 | );
47 |
48 | const SelectAccountTypeView = pure((props: Props) => (
49 |
50 |
51 |
52 | {'Twitter, GNU Social, Mastodonのアカウントを最大16個まで追加できます'}
53 |
54 |
55 | {Object.keys(instances).map((item, index)=>(
56 |
60 |
63 |
64 |
65 |
66 |
67 | ))}
68 |
69 |
70 |
71 |
74 |
75 |
76 | ));
77 |
78 | export default withStyles(styles)(SelectAccountTypeView);
79 |
--------------------------------------------------------------------------------
/src/component/Dialog/AddTimelineDialog/AccountList.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 |
3 | import React from 'react';
4 | import {pure} from 'recompose';
5 | import {withStyles} from 'material-ui/styles';
6 | import List, { ListItem, ListItemText, ListItemSecondaryAction } from 'material-ui/List';
7 | import Radio from 'material-ui/Radio';
8 | import Avatar from 'material-ui/Avatar';
9 |
10 | const styles = theme => ({
11 | root: {
12 | maxHeight: '320px',
13 | overflowY: 'auto',
14 | }
15 | });
16 |
17 | type Props = {
18 | classes: Object,
19 | accounts: Array