nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
### `v5.4.0`
- Prevent Spotlight from indexing terminal-notifier.app ([#238](https://github.com/mikaelbr/node-notifier/pull/238))
- Changes from legacy url.parse api
- Adds default timeout to notification center
- Adds mapping from timeout to expire time for linux
- Enables the use of WindowsToaster when using WSL ([#260](https://github.com/mikaelbr/node-notifier/pull/260))
### `v5.3.0`
- Re-adds `notifu` update.

158
node_modules/node-notifier/README.md generated vendored
View File

@@ -1,4 +1,4 @@
# node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]
# node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
Send cross platform native notifications using Node.js. Notification Center for macOS,
`notify-osd`/`libnotify-bin` for Linux, Toasters for Windows 8/10, or taskbar balloons for
@@ -30,10 +30,10 @@ notifier.notify({
## Requirements
* **macOS**: >= 10.8 for native notifications, or Growl if earlier.
* **Linux**: `notify-osd` or `libnotify-bin` installed (Ubuntu should have this by default)
* **Windows**: >= 8, or task bar balloons for Windows < 8. Growl as fallback. Growl takes precedence over Windows balloons.
* **General Fallback**: Growl
- **macOS**: >= 10.8 for native notifications, or Growl if earlier.
- **Linux**: `notify-osd` or `libnotify-bin` installed (Ubuntu should have this by default)
- **Windows**: >= 8, or task bar balloons for Windows < 8. Growl as fallback. Growl takes precedence over Windows balloons.
- **General Fallback**: Growl
See [documentation and flow chart for reporter choice](./DECISION_FLOW.md).
@@ -45,7 +45,7 @@ npm install --save node-notifier
## <abbr title="Command Line Interface">CLI</abbr>
<abbr title="Command Line Interface">CLI</abbr> has moved to separate project:
<abbr title="Command Line Interface">CLI</abbr> has moved to separate project:
<https://github.com/mikaelbr/node-notifier-cli>
## Cross-Platform Advanced Usage
@@ -80,7 +80,7 @@ notifier.on('timeout', function(notifierObject, options) {
});
```
If you want super fine-grained control, you can customize each reporter individually,
If you want super fine-grained control, you can customize each reporter individually,
allowing you to tune specific options for different systems.
See below for documentation on each reporter.
@@ -119,11 +119,11 @@ new nn.Growl(options).notify(options);
## Contents
* [Notification Center documentation](#usage-notificationcenter)
* [Windows Toaster documentation](#usage-windowstoaster)
* [Windows Balloon documentation](#usage-windowsballoon)
* [Growl documentation](#usage-growl)
* [Notify-send documentation](#usage-notifysend)
- [Notification Center documentation](#usage-notificationcenter)
- [Windows Toaster documentation](#usage-windowstoaster)
- [Windows Balloon documentation](#usage-windowsballoon)
- [Growl documentation](#usage-growl)
- [Notify-send documentation](#usage-notifysend)
### Usage: `NotificationCenter`
@@ -135,14 +135,15 @@ error will be returned in the callback.
#### Example
Because `node-notifier` wraps around [**`terminal-notifier`**](https://github.com/julienXX/terminal-notifier),
you can do anything `terminal-notifier` can, just by passing properties to the `notify`
method.
Because `node-notifier` wraps around [**`terminal-notifier`**](https://github.com/julienXX/terminal-notifier),
you can do anything `terminal-notifier` can, just by passing properties to the `notify`
method.
For example:
- if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`
- if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`.
For example:
* if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`
* if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`.
Notification is the primary focus of this module, so listing and activating do work,
but they aren't documented.
@@ -160,7 +161,7 @@ notifier.notify(
{
title: void 0,
subtitle: void 0,
message: void 0,
message: void 0,
sound: false, // Case Sensitive string for location of sound file, or use one of macOS' native sounds (see below)
icon: 'Terminal Icon', // Absolute Path to Triggering Icon
contentImage: void 0, // Absolute Path to Attached Image (Content Image)
@@ -180,21 +181,21 @@ notifier.notify(
);
```
----
---
**Note:** The `wait` option is shorthand for `timeout: 5`. This just sets a timeout
for 5 seconds. It does _not_ make the notification sticky!
**Note:** The `wait` option is shorthand for `timeout: 5`. This just sets a timeout
for 5 seconds. It does _not_ make the notification sticky!
Without `wait` or `timeout`, notifications are just fired and forgotten. They don't
wait for any response.
wait for any response.
To make notifications wait for a response (like activation/click), you must define
To make notifications wait for a response (like activation/click), you must define
a `timeout`.
_Exception:_ If `reply` is defined, it's recommended to set `timeout` to a either
_Exception:_ If `reply` is defined, it's recommended to set `timeout` to a either
high value, or to nothing at all.
----
---
**For macOS notifications: `icon`, `contentImage`, and all forms of `reply`/`actions` require macOS 10.9.**
@@ -203,52 +204,57 @@ Sound can be one of these: `Basso`, `Blow`, `Bottle`, `Frog`, `Funk`, `Glass`,
If `sound` is simply `true`, `Bottle` is used.
----
---
**See Also:**
* [Example: specific Notification Centers](./example/advanced.js)
* [Example: input](./example/macInput.js).
----
- [Example: specific Notification Centers](./example/advanced.js)
- [Example: input](./example/macInput.js).
---
**Custom Path clarification**
`customPath` takes a value of a relative or absolute path to the binary of your
`customPath` takes a value of a relative or absolute path to the binary of your
fork/custom version of **`terminal-notifier`**.
**Example:** `./vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier`
**Example:** `./vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier`
**Spotlight clarification**
`terminal-notifier.app` resides in a `mac.noindex` folder to prevent Spotlight from indexing the app.
### Usage: `WindowsToaster`
**Note:** There are some limitations for images in native Windows 8 notifications:
* The image must be a PNG image
* The image must be smaller than 1024×1024 px
* The image must be less than 200kb
* The image must be specified using an absolute path
These limitations are due to the Toast notification system. A good tip is to use
- The image must be a PNG image
- The image must be smaller than 1024×1024 px
- The image must be less than 200kb
- The image must be specified using an absolute path
These limitations are due to the Toast notification system. A good tip is to use
something like `path.join` or `path.delimiter` to keep your paths cross-platform.
From [mikaelbr/gulp-notify#90 (comment)](https://github.com/mikaelbr/gulp-notify/issues/90#issuecomment-129333034)
> You can make it work by going to System > Notifications & Actions. The 'toast'
> app needs to have Banners enabled. (You can activate banners by clicking on the
> You can make it work by going to System > Notifications & Actions. The 'toast'
> app needs to have Banners enabled. (You can activate banners by clicking on the
> 'toast' app and setting the 'Show notification banners' to On)
----
---
**Windows 10 Fall Creators Update (Version 1709) Note:**
With the Fall Creators Update, Notifications on Windows 10 will only work as
expected if the correct `appID` is specified. Your `appID` must be exactly the same
With the Fall Creators Update, Notifications on Windows 10 will only work as
expected if the correct `appID` is specified. Your `appID` must be exactly the same
value that was registered during the installation of your app.
You can find the ID of your App by searching the registry for the `appID` you
specified at installation of your app. For example: If you use the squirrel
You can find the ID of your App by searching the registry for the `appID` you
specified at installation of your app. For example: If you use the squirrel
framework, your `appID` will be something like `com.squirrel.your.app`.
The default behaviour is to have the underlying toaster applicaton as `appId`.
The default behaviour is to have the underlying toaster applicaton as `appId`.
This works as expected, but shows `SnoreToast` as text in the notification.
[**Snoretoast**](https://github.com/KDE/snoretoast) is used to get native Windows Toasts!
@@ -362,13 +368,13 @@ See flags and options on the man page [`notify-send(1)`](http://manpages.ubuntu.
## Thanks to OSS
`node-notifier` is made possible through Open Source Software.
`node-notifier` is made possible through Open Source Software.
A very special thanks to all the modules `node-notifier` uses.
* [`terminal-notifier`](https://github.com/julienXX/terminal-notifier)
* [`Snoretoast`](https://github.com/KDE/snoretoast)
* [`notifu`](http://www.paralint.com/projects/notifu/)
* [`growly`](https://github.com/theabraham/growly/)
- [`terminal-notifier`](https://github.com/julienXX/terminal-notifier)
- [`Snoretoast`](https://github.com/KDE/snoretoast)
- [`notifu`](http://www.paralint.com/projects/notifu/)
- [`growly`](https://github.com/theabraham/growly/)
[![NPM downloads][npm-downloads]][npm-url]
@@ -376,41 +382,41 @@ A very special thanks to all the modules `node-notifier` uses.
### Windows: `SnoreToast` text
See note on "Windows 10 Fall Creators Update" in Windows section.
See note on "Windows 10 Fall Creators Update" in Windows section.
_**Short answer:** update your `appId`._
### Use inside tmux session
When using `node-notifier` within a tmux session, it can cause a hang in the system.
When using `node-notifier` within a tmux session, it can cause a hang in the system.
This can be solved by following the steps described in [this comment](https://github.com/julienXX/terminal-notifier/issues/115#issuecomment-104214742)
Theres even more info [here](https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801)
Theres even more info [here](https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801)
<https://github.com/mikaelbr/node-notifier/issues/61#issuecomment-163560801>.
### macOS: Custom icon without Terminal icon
Even if you define an icon in the configuration object for `node-notifier`, you will
see a small Terminal icon in the notification (see the example at the top of this
document).
Even if you define an icon in the configuration object for `node-notifier`, you will
see a small Terminal icon in the notification (see the example at the top of this
document).
This is the way notifications on macOS work. They always show the icon of the
parent application initiating the notification. For `node-notifier`, `terminal-notifier`
is the initiator, and it has the Terminal icon defined as its icon.
This is the way notifications on macOS work. They always show the icon of the
parent application initiating the notification. For `node-notifier`, `terminal-notifier`
is the initiator, and it has the Terminal icon defined as its icon.
To define your custom icon, you need to fork `terminal-notifier` and build your
custom version with your icon.
To define your custom icon, you need to fork `terminal-notifier` and build your
custom version with your icon.
See [Issue #71 for more info](https://github.com/mikaelbr/node-notifier/issues/71)
See [Issue #71 for more info](https://github.com/mikaelbr/node-notifier/issues/71)
<https://github.com/mikaelbr/node-notifier/issues/71>.
### Within Electron Packaging
If packaging your Electron app as an `asar`, you will find `node-notifier` will fail to load.
If packaging your Electron app as an `asar`, you will find `node-notifier` will fail to load.
Due to the way asar works, you cannot execute a binary from within an `asar`.
As a simple solution, when packaging the app into an asar please make sure you
`--unpack` the `vendor/` folder of `node-notifier`, so the module still has access to
the notification binaries.
Due to the way asar works, you cannot execute a binary from within an `asar`.
As a simple solution, when packaging the app into an asar please make sure you
`--unpack` the `vendor/` folder of `node-notifier`, so the module still has access to
the notification binaries.
You can do so with the following command:
@@ -418,15 +424,19 @@ You can do so with the following command:
asar pack . app.asar --unpack "./node_modules/node-notifier/vendor/**"
```
### Using with pkg
For issues using with the pkg module. Check this issue out: https://github.com/mikaelbr/node-notifier/issues/220#issuecomment-425963752
### Using Webpack
When using `node-notifier` inside of `webpack`, you must add the snippet below to your `webpack.config.js`.
When using `node-notifier` inside of `webpack`, you must add the snippet below to your `webpack.config.js`.
This is necessary because `node-notifier` loads the notifiers from a binary, so it
needs a relative file path. When webpack compiles the modules, it supresses file
directories, causing `node-notifier` to error on certain platforms.
This is necessary because `node-notifier` loads the notifiers from a binary, so it
needs a relative file path. When webpack compiles the modules, it supresses file
directories, causing `node-notifier` to error on certain platforms.
To fix this, you can configure webpack to keep the relative file directories.
To fix this, you can configure webpack to keep the relative file directories.
Do so by append the following code to your `webpack.config.js`:
```javascript
@@ -445,5 +455,3 @@ node: {
[npm-downloads]: http://img.shields.io/npm/dm/node-notifier.svg?style=flat
[travis-url]: http://travis-ci.org/mikaelbr/node-notifier
[travis-image]: http://img.shields.io/travis/mikaelbr/node-notifier.svg?style=flat
[depstat-url]: https://gemnasium.com/mikaelbr/node-notifier
[depstat-image]: http://img.shields.io/gemnasium/mikaelbr/node-notifier.svg?style=flat

View File

@@ -10,7 +10,9 @@ var WindowsBalloon = require('./notifiers/balloon');
var options = { withFallback: true };
switch (os.type()) {
var osType = utils.isWSL() ? 'WSL' : os.type();
switch (osType) {
case 'Linux':
module.exports = new NotifySend(options);
module.exports.Notification = NotifySend;
@@ -28,6 +30,10 @@ switch (os.type()) {
module.exports.Notification = WindowsToaster;
}
break;
case 'WSL':
module.exports = new WindowsToaster(options);
module.exports.Notification = WindowsToaster;
break;
default:
if (os.type().match(/BSD$/)) {
module.exports = new NotifySend(options);

View File

@@ -1,6 +1,7 @@
var shellwords = require('shellwords');
var cp = require('child_process');
var semver = require('semver');
var isWSL = require('is-wsl');
var path = require('path');
var url = require('url');
var os = require('os');
@@ -29,6 +30,7 @@ var notifySendFlags = {
urgency: 'urgency',
t: 'expire-time',
time: 'expire-time',
timeout: 'expire-time',
e: 'expire-time',
expire: 'expire-time',
'expire-time': 'expire-time',
@@ -208,6 +210,10 @@ module.exports.mapToMac = function(options) {
delete options.wait;
}
if (!options.wait && !options.timeout) {
options.timeout = 10;
}
options.json = true;
return options;
};
@@ -337,9 +343,8 @@ module.exports.mapToWin8 = function(options) {
if (options.icon) {
if (/^file:\/+/.test(options.icon)) {
// should parse file protocol URL to path
options.p = url
.parse(options.icon)
.pathname.replace(/^\/(\w:\/)/, '$1')
options.p = new url.URL(options.icon).pathname
.replace(/^\/(\w:\/)/, '$1')
.replace(/\//g, '\\');
} else {
options.p = options.icon;
@@ -485,6 +490,10 @@ module.exports.isWin8 = function() {
);
};
module.exports.isWSL = function() {
return isWSL;
};
module.exports.isLessThanWin8 = function() {
return (
os.type() === 'Windows_NT' &&

View File

@@ -6,7 +6,7 @@ var Growl = require('./growl');
var path = require('path');
var notifier = path.join(
__dirname,
'../vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier'
'../vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier'
);
var EventEmitter = require('events').EventEmitter;

View File

@@ -79,7 +79,7 @@ WindowsToaster.prototype.notify = function(options, callback) {
return this;
}
if (!utils.isWin8() && !!this.options.withFallback) {
if (!utils.isWin8() && !utils.isWSL() && !!this.options.withFallback) {
fallback = fallback || new Balloon(this.options);
return fallback.notify(options, callback);
}

View File

@@ -1,8 +1,8 @@
{
"_from": "node-notifier@^5.1.2",
"_id": "node-notifier@5.3.0",
"_id": "node-notifier@5.4.0",
"_inBundle": false,
"_integrity": "sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q==",
"_integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==",
"_location": "/node-notifier",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/webpack-notifier"
],
"_resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.3.0.tgz",
"_shasum": "c77a4a7b84038733d5fb351aafd8a268bfe19a01",
"_resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz",
"_shasum": "7b455fdce9f7de0c63538297354f3db468426e6a",
"_spec": "node-notifier@^5.1.2",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\webpack-notifier",
"author": {
@@ -31,6 +31,7 @@
"bundleDependencies": false,
"dependencies": {
"growly": "^1.3.0",
"is-wsl": "^1.1.0",
"semver": "^5.5.0",
"shellwords": "^0.1.1",
"which": "^1.3.0"
@@ -38,16 +39,16 @@
"deprecated": false,
"description": "A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)",
"devDependencies": {
"eslint": "^5.0.1",
"eslint-config-semistandard": "^12.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.1.0",
"husky": "^0.14.3",
"eslint": "^5.12.1",
"eslint-config-semistandard": "^13.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.15.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"husky": "^1.3.1",
"jest": "^23.2.0",
"lint-staged": "^7.1.0",
"lint-staged": "^8.1.0",
"prettier": "^1.12.1"
},
"directories": {
@@ -94,5 +95,5 @@
"pretest": "npm run lint",
"test": "jest"
},
"version": "5.3.0"
"version": "5.4.0"
}

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>16E195</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>terminal-notifier</string>
<key>CFBundleIconFile</key>
<string>Terminal</string>
<key>CFBundleIdentifier</key>
<string>nl.superalloy.oss.terminal-notifier</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>terminal-notifier</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.7.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>17</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>8B62</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>16B2649</string>
<key>DTSDKName</key>
<string>macosx10.12</string>
<key>DTXcode</key>
<string>0810</string>
<key>DTXcodeBuild</key>
<string>8B62</string>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>LSUIElement</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2016 Eloy Durán, Julien Blanchard. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSUserNotificationAlertStyle</key>
<string>alert</string>
</dict>
</plist>

View File

@@ -1 +0,0 @@
APPL????

View File

@@ -1,29 +0,0 @@
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\
\b Human Interface Design:
\b0 \
Some other people\
\
\b Testing:
\b0 \
Hopefully not nobody\
\
\b Documentation:
\b0 \
Whoever\
\
\b With special thanks to:
\b0 \
Mom\
}