All Projects → rhysd → Electron About Window

rhysd / Electron About Window

Licence: mit
'About This App' mini-window for Electron apps

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Electron About Window

Rationale
Ramda inspired library of helper functions for ReasonML
Stars: ✭ 275 (-18.88%)
Mutual labels:  utility
Cypress Vue Unit Test
A little helper to unit test Vue components in the Cypress.io E2E test runner
Stars: ✭ 298 (-12.09%)
Mutual labels:  utility
Org Wiki
Wiki for Emacs org-mode built on top of Emacs org-mode.
Stars: ✭ 319 (-5.9%)
Mutual labels:  utility
Lobash
A modern, safe, powerful utility library for Bash script development.
Stars: ✭ 280 (-17.4%)
Mutual labels:  utility
Length.js
📏 JavaScript library for length units conversion.
Stars: ✭ 292 (-13.86%)
Mutual labels:  utility
Nyrna
Nyrna - Suspend games and applications.
Stars: ✭ 303 (-10.62%)
Mutual labels:  utility
FSMon
File system monitoring utility written in plain PHP
Stars: ✭ 12 (-96.46%)
Mutual labels:  utility
Mbpmid2010 gpufix
MBPMid2010_GPUFix is an utility program that allows to fix MacBook Pro (15-inch, Mid 2010) intermittent black screen or loss of video. The algorithm is based on a solution provided by user fabioroberto on MacRumors forums.
Stars: ✭ 334 (-1.47%)
Mutual labels:  utility
Extramaputils
🌍 the simple utility for google maps in android
Stars: ✭ 293 (-13.57%)
Mutual labels:  utility
Addlicense
A program which ensures source code files have copyright license headers by scanning directory patterns recursively
Stars: ✭ 318 (-6.19%)
Mutual labels:  utility
Nomino
Batch rename utility for developers
Stars: ✭ 282 (-16.81%)
Mutual labels:  utility
Senparc.co2net
支持 .NET Framework & .NET Core 的公共基础扩展库
Stars: ✭ 289 (-14.75%)
Mutual labels:  utility
React Lodash
⚛️ 🔧 Lodash as React components
Stars: ✭ 306 (-9.73%)
Mutual labels:  utility
Eustia
Tool for generating utility libraries
Stars: ✭ 276 (-18.58%)
Mutual labels:  utility
Haxor News
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Stars: ✭ 3,342 (+885.84%)
Mutual labels:  utility
vscode-snippet-generator
📜 Generate snippets from code in VSCode
Stars: ✭ 31 (-90.86%)
Mutual labels:  utility
Cryptocmd
Cryptocurrency historical price data library in Python. Data from https://coinmarketcap.com.
Stars: ✭ 299 (-11.8%)
Mutual labels:  utility
Ms
Tiny millisecond conversion utility
Stars: ✭ 3,762 (+1009.73%)
Mutual labels:  utility
Underscore.string
String manipulation helpers for javascript
Stars: ✭ 3,355 (+889.68%)
Mutual labels:  utility
Encryptpad
Minimalist secure text editor and binary encryptor that implements RFC 4880 Open PGP format: symmetrically encrypted, compressed and integrity protected. The editor can protect files with passwords, key files or both.
Stars: ✭ 305 (-10.03%)
Mutual labels:  utility

'About This App' Window for Electron Apps

npm version

This package provides 'About This App' window for Electron applications.

  • [x] Create 'About This App' window from given parameters
    • [x] Icon path
    • [x] Copy right
    • [x] App name and Versions
    • [x] Description
  • [x] Gather package information from package.json
  • [x] Automatically detect package.json
  • [x] Adjust window size to its contents automatically
  • [x] Optional close button
  • [x] CSS customizability

You can install this module via npm.

$ npm install about-window

Only one function is exported as default. Please see TypeScript type definition. The function can be called from both main process and renderer process.

export default function openAboutWindow(info: {
    icon_path: string;
    product_name?: string;
    package_json_dir?: string;
    about_page_dir?: string;
    bug_report_url?: string;
    bug_link_text?: string;
    copyright?: string;
    homepage?: string;
    description?: string;
    license?: string;
    css_path?: string | string[];
    adjust_window_size?: boolean;
    win_options?: BrowserWindowOptions;
    use_version_info?: boolean | [string, string][];
    show_close_button?: string;
}): BrowserWindow

Only icon_path property is required, others are optional. I recommend to specify as below to extract information from package.json as much as possible. Path to package.json is also automatically detected if possible.

openAboutWindow({
    icon_path: 'path/to/icon.png'
});

If string value is passed to the first parameter, it is passed to icon_path. So following is a shorthand of above code:

openAboutWindow('path/to/icon.png');

You can check an example app to know how to use this package.

$ git clone https://github.com/rhysd/about-window.git
$ cd about-window/example
$ npm install
$ npm start

# Or for debug
$ npm run debug

Parameter's properties of openAboutWindow()

Name Description Type
icon_path Path to icon file of the application. The path is passed to src property of <img> element. Required string
package_json_dir Path to directory which contains package.json. If not specified, it will try to detect a path to package.json. If also failed, it gives up and show less information in 'About This App' window. Optional string
bug_report_url URL to bug report page. If not specified, 'bugs' entry in package.json is used. Optional string
copyright Copyright notice shown in window. If not specified, it is replaced with license description generated by 'license' entry of package.json. Optional string
homepage URL of application's web page. If not specified, 'homepage' entry of package.json is used instead. Optional string
description Description of the application. If not specified, 'description' entry of package.json is used instead. Optional string
license License of the application. If not specified, 'license' entry of package.json is used instead. This property is used when copyright is not specified. Optional string
win_options Options of 'About This App' window. It is merged into default options. Optional BrowserWindow options object
css_path Path(s) to user-defined CSS file. It will be inserted to DOM of the window. Optional (array of) string
adjust_window_size Adjust the window size to its content not to show scroll bar. Optional boolean
open_devtools For debug purpose, Chrome DevTools will start when the window is opened. Optional boolean
use_inner_html If true, set the value with .innerHTML on copyright, license and description Default is false. Optional boolean
bug_link_text Text for a bug report link. Optional string
product_name Name of the application Optional string
use_version_info If is false, nothing will be displayed, if is true, the versions of electron, chrome, node, and v8 will be displayed, if is an array of string tuple, its entries will be displayed. Default is true. Optional boolean
show_close_button If this is a valid string, a close button with this string be displayed. Optional string
about_page_dir Directory path which contains about.html which is rendered in 'About this app' window. Optional string

Note: If you set use_inner_html to true, please ensure that contents don't contain any untrusted external input in order to avoid XSS. Be careful.

Screen Shots

Linux

Linux screenshot

OS X

OS X screenshot

Windows

Windows screenshot

License

MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].