Skip to content

Commit

Permalink
Add source code
Browse files Browse the repository at this point in the history
  • Loading branch information
ansidev committed Sep 7, 2017
1 parent 6829600 commit ce4b657
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ typings/
# dotenv environment variables file
.env

release-builds/
47 changes: 47 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const {app, BrowserWindow} = require('electron')

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win

function createWindow () {
// Create the browser window.
win = new BrowserWindow({icon: __dirname + '/icon.png'})
win.maximize()

// and load the index.html of the app.
win.loadURL('https://chat.zalo.me/')

// Emitted when the window is closed.
win.on('closed', () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
win = null
})
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)

// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (win === null) {
createWindow()
}
})

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
25 changes: 25 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"src": "release-builds/unofficial-zalo-linux-x64/",
"dest": "release-builds/installers/",
"arch": "amd64",
"options": {
"arch": "amd64",
"section": "web",
"productName": "Unofficial Zalo"
},
"icon": {
"32x32": "src/assets/icons/linux/32x32.png",
"48x48": "src/assets/icons/linux/48x48.png",
"64x64": "src/assets/icons/linux/64x64.png",
"128x128": "src/assets/icons/linux/128x128.png",
"256x256": "src/assets/icons/linux/256x256.png",
"512x512": "src/assets/icons/linux/512x512.png",
"1024x1024": "src/assets/icons/linux/1024x1024.png"
},
"categories": [
"Utility"
],
"lintianOverrides": [
"changelog-file-missing-in-native-package"
]
}
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "unofficial-zalo",
"version": "1.0.0",
"revision": "20170907",
"description": "Unofficial Zalo App",
"main": "app.js",
"scripts": {
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds",
"package-win": "electron-packager . --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=SafeStudio --version-string.FileDescription=CE --version-string.ProductName=\"Unofficial Zalo\"",
"package-linux" : "electron-packager . --overwrite --platform=linux --arch=x64 --icon=assets/icons/linux/1024x1024.png --prune=true --out=release-builds --electronVersion=$(electron -v | sed -e \"s/^v//\")",
"package-linux-x64" : "npm run package-linux && electron-installer-debian --config config.json"
},
"build": {
"appId": "studio.safe.unofficial-zalo",
"mac": {
"category": "studio.safe.unofficial-zalo"
}
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"keywords": [
"unofficial",
"zalo",
"electron",
"cross-platform"
],
"author": {
"name": "Le Minh Tri",
"email": "[email protected]",
"url": "https://wp-legoiv.rhcloud.com/"
},
"license": "GPL-3.0"
}
Binary file added src/assets/icons/linux/1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/linux/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ce4b657

Please sign in to comment.