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

Commit

Permalink
added about section
Browse files Browse the repository at this point in the history
  • Loading branch information
frozeman committed Mar 4, 2016
1 parent 4912a04 commit 75d28b3
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 6 deletions.
3 changes: 3 additions & 0 deletions interface/client/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Template.body.helpers({
if(~location.hash.indexOf('#importAccount')) {
return 'popupWindows_importAccount';
}
if(~location.hash.indexOf('#about')) {
return 'popupWindows_about';
}
if(location.hash === '#requestAccount') {
// $('title').text(TAPi18n.__('mist.popupWindows.requestAccount.title')
return 'popupWindows_requestAccount';
Expand Down
16 changes: 16 additions & 0 deletions interface/client/templates/popupWindows/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template name="popupWindows_about">
<div class="row">
<div class="col col-4 ">
<img id="image" src="{{iconPath}}" style="position: relative;top: -40px;left: -130%;width: 250%;">
</div>
<div class="col col-8 ">
<h1>{{name}}</h1>
<p>
Version {{mist.version}}<br>
License {{mist.license}}<br>
GitHub <a href="https://github.com/ethereum/mist" target="_blank">github.com/ethereum/mist</a>
</p>
<small>Copyright 2016 Ethereum Foundation</small>
</div>
</div>
</template>
45 changes: 45 additions & 0 deletions interface/client/templates/popupWindows/about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
Template Controllers
@module Templates
*/

var mode = location.hash.replace('#about_','');

/**
The about template
@class [template] popupWindows_about
@constructor
*/
Template['popupWindows_about'].onCreated(function(){

});


Template['popupWindows_about'].helpers({
/**
Returns the icon path
@method iconPath
*/
'iconPath': function(){
return 'file://'+ dirname.replace('modules/preloader','') +'icons/'+ mode +'/icon2x.png';
},
/**
Returns the application name
@method name
*/
'name': function(){
return (mode === 'mist') ? 'Mist' : 'Ethereum Wallet';
},
/**
Returns mist api
@method mist
*/
'mist': function(){
return mist;
}
});
16 changes: 11 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ global._ = require('underscore');
const fs = require('fs');
const electron = require('electron');
const app = require('app'); // Module to control application life.
const appMenu = require('./modules/menuItems');
const BrowserWindow = require('browser-window'); // Module to create native browser window.
const i18n = require('./modules/i18n.js');
const Minimongo = require('./modules/minimongoDb.js');
const syncMinimongo = require('./modules/syncMinimongo.js');
const ipc = electron.ipcMain;
const packageJson = require('./package.json');


// GLOBAL Variables
Expand All @@ -17,18 +17,24 @@ global.path = {
USERDATA: app.getPath('userData') // Application Aupport/Mist
};

global.appName = 'Mist';

global.production = false;
global.mode = 'wallet';

global.version = packageJson.version;
global.license = packageJson.license;


require('./modules/ipcCommunicator.js');
const appMenu = require('./modules/menuItems');
const ipcProviderBackend = require('./modules/ipc/ipcProviderBackend.js');
const NodeConnector = require('./modules/ipc/nodeConnector.js');
const popupWindow = require('./modules/popupWindow.js');
const ethereumNodes = require('./modules/ethereumNodes.js');
const getIpcPath = require('./modules/ipc/getIpcPath.js');
var ipcPath = getIpcPath();

global.appName = 'Mist';

global.production = false;
global.mode = 'wallet';

global.mainWindow = null;
global.windows = {};
Expand Down
4 changes: 3 additions & 1 deletion modules/menuItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ var menuTempl = function(webviews) {
submenu: [
{
label: i18n.t('mist.applicationMenu.app.about', {app: config.name}),
role: 'about'
click: function(){
popupWindow.show('about_'+ global.mode, {width: 420, height: 230, alwaysOnTop: true});
}
},
{
label: i18n.t('mist.applicationMenu.app.quit', {app: config.name}),
Expand Down
6 changes: 6 additions & 0 deletions modules/mistAPI.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/**
@module MistAPI
*/

const packageJson = require('./../package.json');


module.exports = function(isWallet) {

const ipc = require('electron').ipcRenderer;
Expand Down Expand Up @@ -65,6 +69,8 @@ module.exports = function(isWallet) {
*/
var mist = {
callbacks: {},
version: packageJson.version,
license: packageJson.license,
platform: process.platform,
requestAccount: function(callback){
if(callback) {
Expand Down
2 changes: 2 additions & 0 deletions modules/preloader/popupWindows.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

const ipc = require('electron').ipcRenderer;
require('../openExternal.js');
const mist = require('../mistAPI.js');
const ipcProviderWrapper = require('../ipc/ipcProviderWrapper.js');
const BigNumber = require('bignumber.js');
const Web3 = require('web3');
Expand All @@ -19,6 +20,7 @@ ipc.on('data', function(e, data) {


// make variables globally accessable
window.mist = mist();
window.BigNumber = BigNumber;
window.web3 = new Web3(new Web3.providers.IpcProvider('', ipcProviderWrapper));
web3Admin.extend(window.web3);
Expand Down

0 comments on commit 75d28b3

Please sign in to comment.