Skip to content

Commit

Permalink
Replace 'dyna' references with Mdyna
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsmorais committed Jan 13, 2019
1 parent a8dd278 commit f770d7a
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 19,701 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Dyna
# Mdyna

### A note notification and productivity app.
[![CircleCI](https://circleci.com/gh/psybork/dyna.svg?style=svg)](https://circleci.com/gh/psybork/dyna)

![dyna Logo](https://bytebucket.org/ravatar/%7B989d7431-213e-49fe-a3cb-f8902fb2992f%7D?ts=1764119)
![Mdyna Logo](https://bytebucket.org/ravatar/%7B989d7431-213e-49fe-a3cb-f8902fb2992f%7D?ts=1764119)

_Built with React+Redux+Electron_

Expand Down
9 changes: 4 additions & 5 deletions app/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import App from 'grommet/components/App';
import Article from 'grommet/components/Article';
import Split from 'grommet/components/Split';
Expand All @@ -12,12 +11,12 @@ import Header from './Header';
import '!style-loader!css-loader!sass-loader!../node_modules/grommet/grommet-hpe.min.css';
import '!style-loader!css-loader!sass-loader!./App.scss'; // eslint-disable-line

class Dyna extends Component {
class Mdyna extends Component {

render() {
return (
<App
className={classnames('dyna-app', { 'white-mode': this.props.whiteMode })}
className={classnames('mdyna-app', { 'white-mode': this.props.whiteMode })}
style={{ maxWidth: '1920px' }}
>
<Nav {...this.props}/>
Expand All @@ -33,8 +32,8 @@ class Dyna extends Component {
}
}

Dyna.defaultProps = {
Mdyna.defaultProps = {
whiteMode: false,
};

export default Dyna;
export default Mdyna;
2 changes: 1 addition & 1 deletion app/components/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body {
}


.dyna-app {
.mdyna-app {
margin: 0;
padding: 0;
background-color: $background-color;
Expand Down
10 changes: 5 additions & 5 deletions app/components/Cards/CardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const COLOR_LABELS = {
'#ea80fc': 'purple',
'#8c9eff': 'dark-blue',
'#80d8ff': 'light-blue',
'#a7ffeb': 'dyna-green',
'#a7ffeb': 'mdyna-green',
'#b9f6ca': 'green',
'#fff475': 'yellow',
'#ffd180': 'orange',
Expand Down Expand Up @@ -71,7 +71,7 @@ function minimizeCard(card) {
});
}

class dynaCard extends Component {
class MdynaCard extends Component {
constructor(props) {
super(props);
this.state = {
Expand Down Expand Up @@ -223,9 +223,9 @@ class dynaCard extends Component {
}
}

export default dynaCard;
export default MdynaCard;

dynaCard.propTypes = {
MdynaCard.propTypes = {
card: PropTypes.object.isRequired,
snoozeCard: PropTypes.func,
failCard: PropTypes.func,
Expand All @@ -244,7 +244,7 @@ dynaCard.propTypes = {
i: PropTypes.number,
};

dynaCard.defaultProps = {
MdynaCard.defaultProps = {
i: 0,
removeCard: null,
snoozeCard: null,
Expand Down
4 changes: 2 additions & 2 deletions app/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable */
import React, { Component } from 'react';
import logo from '../../resources/dynaLogo.png';
import logo from '../../resources/MdynaLogo.png';
import Header from 'grommet/components/Header';
import Heading from 'grommet/components/Heading';
import Image from 'grommet/components/Image';
Expand All @@ -9,7 +9,7 @@ class AppHeader extends Component {
render() {
return (
<Header size="small" justify="around">
<Image src={logo} className="App-logo" alt="dyna" size="small" />
<Image src={logo} className="App-logo" alt="Mdyna" size="small" />
</Header>
);
}
Expand Down
4 changes: 2 additions & 2 deletions app/components/MarkdownText.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const COLOR_LABELS = {
'#ea80fc': 'purple',
'#8c9eff': 'dark-blue',
'#80d8ff': 'light-blue',
'#a7ffeb': 'dyna-green',
'#a7ffeb': 'mdyna-green',
'#b9f6ca': 'green',
'#fff475': 'yellow',
'#ffd180': 'orange',
Expand Down Expand Up @@ -49,7 +49,7 @@ class MarkdownText extends Component {
<ReactHighlight
element="div"
text={rawText}
className={classnames(className, COLOR_LABELS[color], whiteMode && 'white-mode', 'dyna-md')}
className={classnames(className, COLOR_LABELS[color], whiteMode && 'white-mode', 'mdyna-md')}
>
{formattedText}
</ReactHighlight>
Expand Down
4 changes: 2 additions & 2 deletions app/components/MarkdownText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ hue-6: #986801
hue-6-2: #c18401
*/
.dyna-md.white-mode {
.mdyna-md.white-mode {
.hljs {
display: block;
overflow-x: auto;
Expand Down Expand Up @@ -116,7 +116,7 @@ hue-6: #d19a66
hue-6-2: #e6c07b
*/
.dyna-md:not(.white-mode){
.mdyna-md:not(.white-mode){
.hljs {
display: block;
overflow-x: auto;
Expand Down
4 changes: 2 additions & 2 deletions app/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button from 'grommet/components/Button';
import classnames from 'classnames';
import Image from 'grommet/components/Image';
import LabelFilter from './LabelFilter';
import logo from '../../resources/dynaLogoCircle.png';
import logo from '../../resources/MdynaLogoCircle.png';

import '!style-loader!css-loader!sass-loader!./Nav.scss'; // eslint-disable-line

Expand Down Expand Up @@ -39,7 +39,7 @@ class NavBar extends Component {
pad="small"
direction="row"
>
<Image src={logo} className="navbar-app-logo" alt="dyna" size="small" />
<Image src={logo} className="navbar-app-logo" alt="Mdyna" size="small" />
<Button
onClick={() => {
this.props.toggleWhiteMode(!whiteMode);
Expand Down
4 changes: 2 additions & 2 deletions app/config/Root.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import Dyna from '../containers/App';
import Mdyna from '../containers/App';

export default class Root extends Component {
render() {
return (
<Router>
<Route path="/" component={Dyna} />
<Route path="/" component={Mdyna} />
</Router>
);
}
Expand Down
4 changes: 2 additions & 2 deletions app/config/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "dyna",
"name": "Dyna",
"short_name": "Mdyna",
"name": "Mdyna",
"icons": [
{
"src": "android-chrome-192x192.png",
Expand Down
6 changes: 3 additions & 3 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dyna">
<meta name="application-name" content="Dyna">
<meta name="apple-mobile-web-app-title" content="Mdyna">
<meta name="application-name" content="Mdyna">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="msapplication-config" content="/assets/browserconfig.xml">
<link rel="manifest" href="/manifest.json">
Expand All @@ -34,7 +34,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>dyna</title>
<title>Mdyna</title>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import Root from './config/Root';
import { Provider } from 'react-redux';
import store from './store';

let dynaStore = store;
let MdynaStore = store;

const render = Component => {
store.getState();
ReactDOM.render(
<AppContainer>
<Provider store={dynaStore}>
<Provider store={MdynaStore}>
<Component />
</Provider>
</AppContainer>,
Expand Down
2 changes: 1 addition & 1 deletion app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "dyna-app",
"name": "mdyna-app",
"version": "0.1.0",
"description": "Dyna application isolated front-end",
"description": "Mdyna application isolated front-end",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"dyna",
"Mdyna",
"productivity",
"notes",
"electron",
Expand Down
4 changes: 2 additions & 2 deletions app/store/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { applyMiddleware, createStore } from 'redux';
import logger from 'redux-logger';
import { throttle } from 'lodash';
import dynaApp from './reducers';
import MdynaApp from './reducers';
import { getLocalState, saveState } from './localStorage';

const localState = getLocalState();
const store = createStore(dynaApp, localState, applyMiddleware(logger));
const store = createStore(MdynaApp, localState, applyMiddleware(logger));

store.subscribe(
throttle(() => {
Expand Down
4 changes: 2 additions & 2 deletions app/store/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import labels from './labels';
import style from './style';
import filters from './filters';

const dynaApp = combineReducers({
const MdynaApp = combineReducers({
cards,
editor,
labels,
style,
tasks,
filters,
});
export default dynaApp;
export default MdynaApp;
14 changes: 4 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ const electron = require('electron');
const path = require('path');
const os = require('os');
const Storage = require('electron-store');
const logger = require('electron-timber');
const { autoUpdater } = require('electron-updater');


const storagePath = path.join(os.homedir(), 'dyna');


const { app, BrowserWindow } = electron;
// Let electron reloads by itself when webpack watches changes in ./app/
require('electron-reload')(__dirname, {
Expand All @@ -28,14 +23,14 @@ app.on('ready', () => {
minHeight: 600,
show: false,
center: true,
title: 'dyna',
title: 'Mdyna',
nodeIntegrationInWorker: true,
titleBarStyle: 'hidden',
webPreferences: {
devTools: true,
textAreasAreResizable: false,
},
icon: path.join(__dirname, 'resources/dynaLogoCircle.png'),
icon: path.join(__dirname, 'resources/MdynaLogoCircle.png'),
});

const splash = new BrowserWindow({
Expand All @@ -46,7 +41,7 @@ app.on('ready', () => {
transparent: true,
frame: false,
alwaysOnTop: true,
icon: path.join(__dirname, 'resources/dynaLogoCircle.png'),
icon: path.join(__dirname, 'resources/MdynaLogoCircle.png'),
});

splash.loadURL(`file://${__dirname}/splash.html`);
Expand Down Expand Up @@ -75,9 +70,8 @@ app.on('ready', () => {
global.serverHost = 'http://localhost:7000';
global.storage = new Storage();
const env = process.env.NODE_ENV || 'PROD';
autoUpdater.logger = logger;
autoUpdater.checkForUpdatesAndNotify();
logger.log('ELECTRON RUNNING IN', env);
console.log('ELECTRON RUNNING IN', env);
if (env === 'PROD') {
mainWindow.loadURL(`file://${__dirname}/dist/web/index.html`);
} else {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"copy-package-files": "rm -rf release && mkdir release && cp dist/*.AppImage release && cp dist/*.deb release && cp dist/*.exe release",
"build-electron": "export NODE_ENV=PROD && rm -rf ./dist/web && webpack --config webpack.config.electron.js;",
"build-webpack": "export NODE_ENV=PROD && rm -rf ./dist/web && webpack --optimize-minimize --config webpack.config.js",
"create-icons": "electron-icon-maker --input=./resources/dynaLogoCircle.png --output=./resources/",
"create-icons": "electron-icon-maker --input=./resources/MdynaLogoCircle.png --output=./resources/",
"install-all": "rm -rf ./node_modules && yarn install && cd app && rm -rf ./node_modules && yarn install",
"electron-builder": "electron-builder",
"pack-asar": "./node_modules/.bin/asar pack dyna app.asar",
"pack-asar": "./node_modules/.bin/asar pack mdyna app.asar",
"pack-build": "yarn build-dist && yarn copy-package-files",
"start": "rm -rf ./dist && export NODE_ENV=DEV && concurrently \"webpack-dev-server --hot --inline\" \"sleep 2 && electron ./main.js\"",
"reset": "rm -rf ./node_modules && yarn install",
Expand All @@ -34,8 +34,8 @@
]
},
"build": {
"productName": "dyna",
"appId": "com.electron.dyna",
"productName": "mdyna",
"appId": "com.electron.mdyna",
"files": [
"dist/web/",
"node_modules/",
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<body>
<div>
<img src='resources/dynaLogo.png' alt='dyna' />
<img src='resources/MdynaLogo.png' alt='Mdyna' />
<br>
<span class='load'>
loading...
Expand Down
6 changes: 3 additions & 3 deletions win-build.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

/* eslint-disable */
var electronInstaller = require('electron-winstaller');
var dynaPath = '/home/david/projects/dyna/';
var MdynaPath = '/home/david/projects/dyna/';
var resultPromise = electronInstaller.createWindowsInstaller({
appDirectory: dynaPath,
outputDirectory: dynaPath + 'builds',
appDirectory: MdynaPath,
outputDirectory: MdynaPath + 'builds',
authors: 'David Morais',
exe: 'dyna.exe'
});
Expand Down
Loading

0 comments on commit f770d7a

Please sign in to comment.