Skip to content

Commit 057bfb2

Browse files
author
KHOUBZA Younes
committed
compile assets
1 parent c7a60a8 commit 057bfb2

File tree

6 files changed

+7960
-8212
lines changed

6 files changed

+7960
-8212
lines changed

packages/flasher/dist/flasher.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
var notification = envelope.notification;
9696
var nOptions = notification.options || {};
9797
var options = Array.isArray(nOptions) ? this.options : Object.assign({}, this.options, nOptions);
98-
this.applyDarkMode();
9998
var onContainerReady = function () {
10099
var container = _this.createContainer(options);
101100
_this.addToContainer(container, envelope, options);
@@ -108,6 +107,7 @@
108107
};
109108
FlasherFactory.prototype.renderOptions = function (options) {
110109
this.options = Object.assign({}, this.options, options);
110+
this.applyDarkMode();
111111
};
112112
FlasherFactory.prototype.createContainer = function (options) {
113113
var containerSelector = ".fl-main-container[data-position=\"".concat(options.position, "\"]");
@@ -187,6 +187,9 @@
187187
template.addEventListener('mouseover', function () { return clearInterval(progressInterval); });
188188
};
189189
FlasherFactory.prototype.applyDarkMode = function () {
190+
if (document.body.classList.contains('fl-dark-mode')) {
191+
return;
192+
}
190193
var _a = [].concat(this.options.darkMode), mode = _a[0], _b = _a[1], className = _b === void 0 ? '.dark' : _b;
191194
var css = '.fl-main-container .fl-container.fl-flasher {background-color: rgb(15, 23, 42);color: rgb(255, 255, 255);}';
192195
css = 'media' === mode
@@ -196,6 +199,7 @@
196199
style.type = 'text/css';
197200
style.appendChild(document.createTextNode(css));
198201
document.head.appendChild(style);
202+
document.body.classList.add('fl-dark-mode');
199203
};
200204
FlasherFactory.prototype.stringToHTML = function (str) {
201205
var support = (function () {

packages/flasher/dist/flasher.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/flasher/dist/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ var FlasherFactory = (function () {
9191
var notification = envelope.notification;
9292
var nOptions = notification.options || {};
9393
var options = Array.isArray(nOptions) ? this.options : Object.assign({}, this.options, nOptions);
94-
this.applyDarkMode();
9594
var onContainerReady = function () {
9695
var container = _this.createContainer(options);
9796
_this.addToContainer(container, envelope, options);
@@ -104,6 +103,7 @@ var FlasherFactory = (function () {
104103
};
105104
FlasherFactory.prototype.renderOptions = function (options) {
106105
this.options = Object.assign({}, this.options, options);
106+
this.applyDarkMode();
107107
};
108108
FlasherFactory.prototype.createContainer = function (options) {
109109
var containerSelector = ".fl-main-container[data-position=\"".concat(options.position, "\"]");
@@ -183,6 +183,9 @@ var FlasherFactory = (function () {
183183
template.addEventListener('mouseover', function () { return clearInterval(progressInterval); });
184184
};
185185
FlasherFactory.prototype.applyDarkMode = function () {
186+
if (document.body.classList.contains('fl-dark-mode')) {
187+
return;
188+
}
186189
var _a = [].concat(this.options.darkMode), mode = _a[0], _b = _a[1], className = _b === void 0 ? '.dark' : _b;
187190
var css = '.fl-main-container .fl-container.fl-flasher {background-color: rgb(15, 23, 42);color: rgb(255, 255, 255);}';
188191
css = 'media' === mode
@@ -192,6 +195,7 @@ var FlasherFactory = (function () {
192195
style.type = 'text/css';
193196
style.appendChild(document.createTextNode(css));
194197
document.head.appendChild(style);
198+
document.body.classList.add('fl-dark-mode');
195199
};
196200
FlasherFactory.prototype.stringToHTML = function (str) {
197201
var support = (function () {

0 commit comments

Comments
 (0)