Skip to content

Commit

Permalink
Merge from master
Browse files Browse the repository at this point in the history
adapt UI of list component
autofocus input field
move lists to separate group
  • Loading branch information
pvrobays committed Apr 26, 2021
2 parents d734ec7 + 7328090 commit 5d97ce7
Show file tree
Hide file tree
Showing 103 changed files with 1,021 additions and 12,205 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ example/preferences.json

# Folders
.cache-loader
.idea
.sass-cache
node_modules
build
build
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- 'step' property to slider input
- hover state to sidebar items

### Changed
- update to electron v12
- enable context isolation
- disable remote module

## [2.2.0] - 2020-03-14
### Added
- Dark theme! 🌗
- Help information for the color component
- Brightness icon

### Changed
- UI of the settings menu
- New icons
- Clicking on the path of a directory will also open the select folder dialog

## [2.1.1] - 2020-03-11
### Fixed
- Fix issue with different radio groups/checkboxes interfering with each other

## [2.1.0] - 2020-02-04
### Added
- Adding a new preference will set a default value
- Ability to override the preferences window's title

### Changed
- enableRemoteModule set to true

### Removed
- remove functions from the preference options object

## [2.0.0] - 2019-09-21
### Added
- Start of the changelog
- ...
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2019 Tim Ambler <[email protected]>

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.
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Electron Preferences

- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Initializing the Preferences Service](#initializing-the-preferences-service)
- [Interacting with the Preferences Service from the Main Process](#interacting-with-the-preferences-service-from-the-main-process)
- [Interacting with the Preferences Service from the Renderer Process](#interacting-with-the-preferences-service-from-the-renderer-process)
- [Field Types](#field-types)
- [Icons](#icons)
- [Electron Preferences](#electron-preferences)
- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Initializing the Preferences Service](#initializing-the-preferences-service)
- [Interacting with the Preferences Service from the Main Process](#interacting-with-the-preferences-service-from-the-main-process)
- [Interacting with the Preferences Service from the Renderer Process](#interacting-with-the-preferences-service-from-the-renderer-process)
- [Field Types](#field-types)
- [Icons](#icons)

## Introduction

This module provides [Electron](https://electronjs.org/) developers with with a simple, consistent interface for managing user preferences. It includes two primary components:
This package provides [Electron](https://electronjs.org/) developers with a simple, consistent interface for managing user preferences. It includes two primary components:

- A GUI interface within which the users of your application can manage their preferences.
- An API for interacting with the service.
Expand Down Expand Up @@ -67,15 +68,6 @@ const preferences = new ElectronPreferences({
'show': true
}
},
/**
* If the `onLoad` method is specified, this function will be called immediately after
* preferences are loaded for the first time. The return value of this method will be stored as the
* preferences object.
*/
'onLoad': (preferences) => {
// ...
return preferences;
},
/**
* The preferences window is divided into sections. Each section has a label, an icon, and one or
* more fields associated with it. Each section should also be given a unique ID.
Expand Down Expand Up @@ -258,6 +250,12 @@ ipcRenderer.on('preferencesUpdated', (e, preferences) => {
ipcRenderer.sendSync('setPreferences', { ... });
```
## Dark or Light? 🌓
You prefer a dark theme over a light theme? No problem, we have them both. The library will use whatever theme you're using with Electron. See the example on how to add the option to your preferences.
<img src="misc/dark.png" />
<img src="misc/light.png" />
## Field Types
The library includes built-in support for the following field types:
Expand Down Expand Up @@ -322,6 +320,10 @@ The following icons come packaged with the library and can be specified when you
<td>bookmark-2</td>
<td><img src="assets/svg/bookmark-2.svg" height="40" width="40" /></td>
</tr>
<tr>
<td>brightness-6</td>
<td><img src="assets/svg/brightness-6.svg" height="40" width="40" /></td>
</tr>
<tr>
<td>briefcase-24</td>
<td><img src="assets/svg/briefcase-24.svg" height="40" width="40" /></td>
Expand Down
1 change: 0 additions & 1 deletion assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="UTF-8">
<title>Preferences</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/vendor.css">
</head>
Expand Down
2 changes: 1 addition & 1 deletion assets/svg/archive-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/archive-paper.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/award-48.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/badge-13.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/bag-09.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/barcode-qr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/bear-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/svg/bell-53.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5d97ce7

Please sign in to comment.