Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Franz-wide internationalization #752

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
complete titlebar for Windows & Linux
  • Loading branch information
haraldox committed Feb 23, 2018
commit ae1014ed7d8f2532c4ec33b530662665dc16b141
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"protocol": "inspector",
"env": {
"NODE_ENV": "development",
"OS_PLATFORM": "win32"
// "OS_PLATFORM": "win32"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"start": "electron ./build",
"start:local": "cross-env LOCAL_API=1 yarn start",
"start:live": "cross-env LIVE_API=1 yarn start",
"dev": "cross-env NODE_ENV=development OS_PLATFORM=win32 gulp dev",
"dev": "cross-env NODE_ENV=development gulp dev",
"lint": "eslint src",
"sign": "gulp sign",
"prebuild": "gulp build",
Expand Down
4 changes: 3 additions & 1 deletion src/components/layout/AppLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { TitleBar } from 'electron-react-titlebar';
import InfoBar from '../ui/InfoBar';
import globalMessages from '../../i18n/globalMessages';

import { isMac } from '../../environment';

function createMarkup(HTMLString) {
return { __html: HTMLString };
}
Expand Down Expand Up @@ -88,7 +90,7 @@ export default class AppLayout extends Component {
return (
<div>
<div className="app">
<TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />
{!isMac && <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} />}
<div className="app__content">
{sidebar}
<div className="app__service">
Expand Down
1 change: 1 addition & 0 deletions src/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const isWindows = platform === 'win32';
export const isLinux = platform === 'linux';

export const ctrlKey = isMac ? '⌘' : 'Ctrl';
export const cmdKey = isMac ? 'Cmd' : 'Ctrl';

let api;
if (!isDevMode || (isDevMode && useLiveAPI)) {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'path';

import windowStateKeeper from 'electron-window-state';

import { isDevMode, isWindows } from './environment';
import { isDevMode, isMac, isWindows } from './environment';
import ipcApi from './electron/ipc-api';
import Tray from './lib/Tray';
import Settings from './electron/Settings';
Expand Down Expand Up @@ -72,7 +72,7 @@ const createWindow = () => {
height: mainWindowState.height,
minWidth: 600,
minHeight: 500,
titleBarStyle: process.env.OS_PLATFORM || process.platform === 'win32' ? '' : 'hidden',
titleBarStyle: isMac ? 'hidden' : '',
frame: false,
backgroundColor: '#3498db',
autoHideMenuBar: true,
Expand Down
Loading