-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
K.C.Ashish Kumar
committed
Nov 22, 2023
0 parents
commit 167bc0e
Showing
8 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Digital Clock-darwin-x64 | ||
Digital Clock-win32-x64 | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Digital Clock ( https://t-i-m-e.kcak11.com / https://mit-license.kcak11.com ) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# digital-clock | ||
|
||
## Usage: | ||
|
||
`$ git clone https://github.com/t-i-m-e/digital-clock.git` | ||
|
||
`$ cd digital-clock` | ||
|
||
`$ npm install` | ||
|
||
### For running in local dev mode: | ||
|
||
`$ npm start` | ||
|
||
### For packaging & building platform specific binary: | ||
|
||
`$ npm run build` | ||
|
||
#### © 2023 https://kcak11.com |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Modules to control application life and create native browser window | ||
const {app, BrowserWindow} = require('electron') | ||
const path = require('path'); | ||
|
||
// 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 mainWindow; | ||
|
||
function createWindow () { | ||
// Create the browser window. | ||
mainWindow = new BrowserWindow({ | ||
title: "[ - Digital Clock - ]", | ||
width: 530, | ||
height: 340, | ||
x: 121, | ||
y: 121, | ||
webPreferences: { | ||
nodeIntegration: true | ||
}, | ||
/*minimizable: false, | ||
maximizable: false,*/ | ||
resizable: false, | ||
devTools: false, | ||
alwaysOnTop: true, | ||
darkTheme: true, | ||
icon: path.join(__dirname, 'icons/png/128x128.png') | ||
}) | ||
|
||
// and load the index.html of the app. | ||
//mainWindow.loadFile('index.html') | ||
mainWindow.loadURL("https://t-i-m-e.github.io/?zoom=0.5&footer=false&title=%5B%20-%20Digital%20Clock%20-%20%5D"); | ||
|
||
// Open the DevTools. | ||
// mainWindow.webContents.openDevTools() | ||
|
||
// Emitted when the window is closed. | ||
mainWindow.on('closed', function () { | ||
// 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. | ||
mainWindow = null; | ||
app.quit(); | ||
}); | ||
|
||
mainWindow.webContents.on("devtools-opened", function() { | ||
mainWindow.webContents.closeDevTools(); | ||
}); | ||
} | ||
|
||
// 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', function () { | ||
// 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', function () { | ||
// 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 (mainWindow === 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "digital-clock", | ||
"version": "1.0.0", | ||
"description": "A Digital Clock", | ||
"main": "main.js", | ||
"scripts": { | ||
"start": "electron .", | ||
"build": "electron-packager . \"Digital Clock\" --overwrite" | ||
}, | ||
"repository": "https://github.com/t-i-m-e/digital-clock", | ||
"keywords": [ | ||
"Digital", | ||
"Clock" | ||
], | ||
"author": "kcak11", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"electron": "^26.3.0", | ||
"electron-packager": "^17.1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file is required by the index.html file and will | ||
// be executed in the renderer process for that window. | ||
// All of the Node.js APIs are available in this process. |