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

Commit

Permalink
Merge branch 'release/1.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
christianpatrick committed Apr 6, 2019
2 parents abc7d88 + cb4414d commit b98412d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Zoho CRM Mac App
This is built using Electron. You can download the prepared app for free [here](https://gum.co/nrAS) or a donation if you find it helpful :)
This is built using Electron. You can download the prepared app for free [here](https://github.com/christianpatrick/electron-zoho_crm/releases).

[![Screenshot of Zoho CRM](https://raw.githubusercontent.com/christianpatrick/electron-zoho_crm/master/screenshot.png)](https://gum.co/nrAS)
[![Screenshot of Zoho CRM](https://raw.githubusercontent.com/christianpatrick/electron-zoho_crm/master/screenshot.png)](https://github.com/christianpatrick/electron-zoho_crm/releases)
27 changes: 23 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const {app, Menu, BrowserWindow, shell, clipboard} = require('electron')
const contextMenu = require('electron-context-menu')

const path = require('path')
const url = require('url')
Expand Down Expand Up @@ -26,17 +27,28 @@ function createWindow () {
},
})

// add context menu support
contextMenu();

mainWindow.loadURL('https://crm.zoho.com/')

// For Development
// mainWindow.loadURL('https://developer.zoho.com/crm/')

mainWindow.webContents.on('did-finish-load', function() {

//initial load of window
fs.readFile(__dirname+ '/src/css/main.css', "utf-8", function(error, data) {
if (!error) {
mainWindow.webContents.insertCSS(data)
}
})

fs.readFile(__dirname+ '/src/css/search.css', "utf-8", function(error, data) {
if (!error) {
mainWindow.webContents.insertCSS(data)
}
})

mainWindow.show()

})
Expand All @@ -57,9 +69,16 @@ function createWindow () {

})

mainWindow.webContents.on('new-window', function(event, url){
event.preventDefault()
require('electron').shell.openExternal(url)
mainWindow.webContents.on('new-window', function(event, url) {

// event.preventDefault()

// check if sending an email
if(url.indexOf('send-mail') != -1) {}
else {
shell.openExternal(url)
}

});

// Emitted when the window is closed.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zoho_crm",
"productName": "Zoho CRM",
"version": "1.1.5",
"version": "1.1.6",
"description": "A simple Zoho CRM desktop app",
"main": "main.js",
"repository": "https://github.com/christianpatrick/electron-zoho_crm",
Expand All @@ -15,6 +15,7 @@
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=zoho_crm-logo.icns --asar --prune=true --out=builds"
},
"dependencies": {
"electron-context-menu": "^0.11.0",
"electron-require": "^0.3.0"
}
}
5 changes: 1 addition & 4 deletions src/css/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* tab group dropdown next to traffic lights */
#showMenu {
margin-left: 65px;
margin-left: 75px;
}

/* top menu bar */
Expand All @@ -11,18 +11,15 @@
-webkit-app-region: drag;
}


.bodycontainer {
padding-top: 40px;
}


.newMenuTable {
display: block;
max-height: 45px;
}


#qIconDiv {
position: absolute;
right: 0;
Expand Down
4 changes: 2 additions & 2 deletions src/css/search.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.newsearchimg, #searchStr {
padding-left: 75px;
.newsearchimg, .gSearchBar .newgsearchouterdiv .srchForm {
padding-left: 75px !important;
}

#searchdetailsform {
Expand Down

0 comments on commit b98412d

Please sign in to comment.