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

Commit

Permalink
Merge pull request #160 from jonathontoon/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
jonathontoon authored Mar 30, 2018
2 parents b0e22cd + 6504857 commit e30def4
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 18 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [v1.1.1](https://github.com/jonathontoon/tweet-tray/releases/tag/v1.1.1)

A few quick improvements

- Fix an null error for window positioning at specific screen scales (#156)
- Added support for Spanish (#158) (Thanks @nil!)

## [v1.1.0](https://github.com/jonathontoon/tweet-tray/releases/tag/v1.1.0)

It's been awhile since our last release, but hopefully this one is well worth it. Along with a number of small features and improvements we now have support for 7 languages!
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Tweet Tray is a small application which allows you to tweet from your desktop sy

## Downloads

#### 🍎 [MacOS](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.dmg)
#### 🏨 [Windows](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.exe)
#### 🐧 [Linux (AppImage)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.AppImage)
#### 🐧 [Linux (DEB File)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.0.deb)
#### 🍎 [MacOS](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.dmg)
#### 🏨 [Windows](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.exe)
#### 🐧 [Linux (AppImage)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.AppImage)
#### 🐧 [Linux (DEB File)](https://github.com/jonathontoon/tweet-tray/releases/download/v1.1.0/tweet-tray-1.1.1.deb)

See [releases](https://github.com/jonathontoon/tweet-tray/releases) for more information.

Expand Down
10 changes: 6 additions & 4 deletions app/MenuBarManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { app, BrowserWindow, Tray, screen, nativeImage, Menu, globalShortcut, }

import { SelectionMenu, InputMenu, ApplicationMenu, } from './utils/Menu';

import * as constants from './constants';

class MenuBarManager {
constructor() {
this.window = null;
Expand Down Expand Up @@ -56,8 +58,8 @@ class MenuBarManager {

_createWindow() {
this.window = new BrowserWindow({
width: 348,
height: 520,
width: constants.WINDOW_WIDTH,
height: constants.WINDOW_HEIGHT,
resizable: false,
frame: false,
show: false,
Expand Down Expand Up @@ -152,7 +154,7 @@ class MenuBarManager {
// Vertical or Horizontal Taskbar

// Vertical Taskbar, small icon mode isn't applicable
if (trayBounds.height === 32) {
if (trayBounds.height === 32 || trayBounds.height === 33) {
if (trayBounds.x <= halfScreenWidth && trayBounds.y >= halfScreenHeight) {
// Vertical Left Bottom

Expand All @@ -169,7 +171,7 @@ class MenuBarManager {

// Horizontal Taskbar
// Supporting small or regular sized icons
} else if (trayBounds.height === 30 || trayBounds.height === 40) {
} else if (trayBounds.height === 30 || trayBounds.height === 31 || trayBounds.height === 40) {
// Is bottom or top
if (trayBounds.x >= halfScreenWidth && trayBounds.y >= halfScreenHeight) {
// Horizontal Bottom Left
Expand Down
5 changes: 4 additions & 1 deletion app/OAuthManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import electron, { BrowserWindow, nativeImage, } from 'electron';

import { selectionMenu, inputMenu, } from './utils/Menu';

import * as constants from './constants';

class OAuthManager {
constructor(config, mainWindow) {
this.consumerKey = config.OAUTH_CONSUMER_KEY;
Expand Down Expand Up @@ -56,7 +58,7 @@ class OAuthManager {

const window = new BrowserWindow({
width: 380,
height: 520,
height: constants.WINDOW_HEIGHT,
x,
y,
show: false,
Expand Down Expand Up @@ -84,6 +86,7 @@ class OAuthManager {
this.isOAuthActive = false;
window == null;
});

return window;
}

Expand Down
2 changes: 0 additions & 2 deletions app/components/Composer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ class Composer extends Component {
}

startPostStatus(e) {
console.log('postStatus');

const {
renderProcess,
accessTokenPair,
Expand Down
2 changes: 2 additions & 0 deletions app/constants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const WINDOW_WIDTH = 348;
export const WINDOW_HEIGHT = 520;
export const XTRA_LARGE_FONT_SIZE = process.platform === 'darwin' ? 24 : 22;
export const LARGE_FONT_SIZE = 16;
export const REGULAR_FONT_SIZE = 15;
Expand Down
51 changes: 51 additions & 0 deletions app/localizations/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"post_status_success": {
"title": "Tu tweet se ha publicado!",
"description": "Clica aquí para verlo."
},
"post_status_error": {
"title": "Lo siento, un error ha ocurrido!",
"description": "Tu tweet no se pudo enviar."
},
"login": {
"title_taskbar": "Envía tweets rápido desde la barra de tareas, sin distracciones.",
"title_menubar": "Envía tweets rápido desde la barra de menus, sin distracciones.",
"log_in_button": "Iniciar sesión con Twitter",
"quit_button": "Salir de Tweet Tray"
},
"authorization_code": {
"title": "Entra los 7 dígitos del PIN de autorización que se muestra en la ventana emergente.",
"authorize_button": "Autoriza my Cuenta",
"return_button": "Volver a iniciar sesión"
},
"authorization_error": {
"title": "Lo siento, un error ha ocurrido!",
"description": "Tu cuenta no ha podido ser autorizada."
},
"composer": {
"title": "Compón Tweet",
"placeholder": "¿Qué está pasando?",
"settings_alt_text": "Abrir configuración",
"image_alt_text": "Añadir una imagen",
"tweet_button": "Twittear"
},
"image_dialog": {
"title": "Seleccionar una imagen",
"add_button": "Añadir",
"file_type": "Imagenes",
"warning_title": "Atención",
"warning_message": "Lo siento, no puedes hacer esto",
"warning_detail_images": "Las imágenes tienen que ser menores de 5mb.",
"warning_detail_gif": "Los GIFs tienen que ser menores de 10mb.",
"warning_confirm_button": "OK"
},
"settings": {
"title": "Configuración",
"night_mode_action": "Modo nocturno",
"launch_start_up_action": "Ejecutar al iniciar",
"read_faq_action": "Lee FAQ",
"report_issue_action": "Reportar un fallo",
"quit_action": "Salir de Tweet Tray",
"log_out_action": "Cerrar sesión"
}
}
4 changes: 0 additions & 4 deletions app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ ipcMain.on('postStatus', (postStatusEvent, response) => {
media_ids: uploadResponse.media_id_string,
}, accessToken, accessTokenSecret, (updateStatusError, statusResponse) => {
if (updateStatusError) {
console.log('with image');
console.log(updateStatusError);
postStatusEvent.sender.send('postStatusError', statusResponse);
return;
}
Expand All @@ -183,8 +181,6 @@ ipcMain.on('postStatus', (postStatusEvent, response) => {
status: response.statusText,
}, accessToken, accessTokenSecret, (updateStatusError, statusResponse) => {
if (updateStatusError) {
console.log('no image');
console.log(updateStatusError);
postStatusEvent.sender.send('postStatusError', statusResponse);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tweet-tray",
"productName": "Tweet Tray",
"version": "1.1.0",
"version": "1.1.1",
"description": "Tweet quickly from the desktop without any more distractions.",
"main": "./main.prod.js",
"author": {
Expand Down
4 changes: 3 additions & 1 deletion app/utils/LocaleManager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import LocalizedStrings from 'react-localization';

import spanish from '../localizations/es.json';

import english from '../localizations/en.json';
import englishAU from '../localizations/en-AU.json';
import englishCA from '../localizations/en-CA.json';
Expand Down Expand Up @@ -29,10 +31,10 @@ import japanese from '../localizations/ja.json';

import dutch from '../localizations/nl.json';


class LocaleManager {
constructor() {
return new LocalizedStrings({
es: spanish,
en: english,
'en-AU': englishAU,
'en-CA': englishCA,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"email": "[email protected]",
"url": "https://github.com/jonathontoon"
},
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"scripts": {
"build": "concurrently \"npm run build-main\" \"npm run build-renderer\"",
Expand Down

0 comments on commit e30def4

Please sign in to comment.