Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ebith committed Mar 29, 2018
1 parent 2a4ee99 commit e6d5ae2
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 31 deletions.
5 changes: 0 additions & 5 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
<body>
<div id="root"></div>
<canvas id="measureText"></canvas>
<script>
if (process.env.NODE_ENV !== 'production') {
require('electron-connect').client.create();
}
</script>
<script src="bundle.js"></script>
</body>
</html>
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"build": "npm-run-all clean build:script build:package compress",
"clean": "rm -rf build/*",
"compress": "npm-run-all --parallel compress:win compress:mac",
"compress:win": "tar Jcfv build/WhaleTongue-$(git show -s --format=%h)-Windows.tar.xz build/WhaleTongue-win32-x64",
"compress:win": "tar Jcfv build/WhaleTongue-$(git show -s --format=%h)-Windows.tar.xz -C build WhaleTongue-win32-x64",
"compress:mac": "tar Jcfv build/WhaleTongue-$(git show -s --format=%h)-MacOS.tar.xz -C build/WhaleTongue-darwin-x64 WhaleTongue.app",
"build:package": "npm-run-all --parallel build:package:mac build:package:win",
"build:package:mac": "electron-packager . --out=build --platform=darwin --arch=x64 --asar --ignore='^/node_modules|^/src|^/script|^/tmp|^/build'",
Expand All @@ -58,7 +58,6 @@
"build:main": "webpack --mode production --config webpack.config.main.js",
"build:renderer": "webpack --mode production --config webpack.config.renderer.js",
"dev": "npm-run-all --parallel dev:main dev:renderer dev:watch",
"dev:watch": "NODE_ENV=development node util/watcher.js",
"dev:main": "webpack --watch --mode development --config webpack.config.main.js",
"dev:renderer": "webpack --watch --mode development --config webpack.config.renderer.js",
"xo": "xo --fix src/*.js src/**/*.js webpack.config* script/*.js || true"
Expand All @@ -70,7 +69,7 @@
"@fortawesome/react-fontawesome": "^0.0.17",
"axios": "^0.17.1",
"date-fns": "^2.0.0-alpha.7",
"electron": "^2.0.0-beta.1",
"electron": "^2.0.0-beta.5",
"electron-store": "^1.3.0",
"oauth": "^0.9.15",
"office-ui-fabric-react": "^5.54.0",
Expand Down
17 changes: 0 additions & 17 deletions script/watch.js

This file was deleted.

1 change: 1 addition & 0 deletions src/components/ogp-thumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {get} from 'axios';

export default class OgpThumbnail extends Component {
componentDidMount() {
console.log(this.props.entities.urls);
(async () => {
const list = ['www.youtube.com/watch', 'youtu.be', 'www.nicovideo.jp/watch', 'nico.ms', 'gyazo.com'];
const re = new RegExp(
Expand Down
6 changes: 4 additions & 2 deletions src/components/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,16 @@ export const Extra = ({retweeter, id, timestamp, locked, event}) => {
};
Extra.propTypes = {
retweeter: PropTypes.object,
id: PropTypes.string.isRequired,
id: PropTypes.string,
timestamp: PropTypes.string.isRequired,
locked: PropTypes.bool.isRequired,
locked: PropTypes.bool,
event: PropTypes.string,
};
Extra.defaultProps = {
retweeter: null,
event: null,
locked: false,
id: null,
};

export class Text extends Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tweet-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TweetModal = ({isOpen, onClose, onUpdateStatus}) => {
};

const handleKeyDown = event => {
if (event.key === 'Enter' && event.ctrlKey) {
if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
onUpdateStatus(event.target.value, () => {
onClose();
});
Expand Down
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const createWindow = () => {
win.webContents.openDevTools({mode: 'undock'});
}

win.alwaysOnTop(store.get('alwaysOnTop'));

win.webContents.on('new-window', (event, url) => {
event.preventDefault();
if (/\.(jpg|png|gif|mp4)$/.test(url)) {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2866,9 +2866,9 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.36:
version "1.3.37"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.37.tgz#4a92734e0044c8cf0b1553be57eae21a4c6e5fab"

electron@^2.0.0-beta.1:
version "2.0.0-beta.3"
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.0-beta.3.tgz#fa9362c61a2288865ecbf2820a35515fc686a7e4"
electron@^2.0.0-beta.5:
version "2.0.0-beta.5"
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.0-beta.5.tgz#a261bb2a5c10bffa9a989a4ec689e0a5851e14a5"
dependencies:
"@types/node" "^8.0.24"
electron-download "^3.0.1"
Expand Down

0 comments on commit e6d5ae2

Please sign in to comment.