pwa-auth 3.2.4 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/{THIRD_PARTY_LICENSES.txt → LICENSES.txt} +57 -57
- package/README.md +88 -65
- package/{bundle/base → base}/export/pwa-auth.d.ts +2 -0
- package/{bundle/base → base}/export/pwa-auth.js +2 -0
- package/base/export/pwa-auth.js.map +1 -0
- package/base/firebase/authentication.js.map +1 -0
- package/base/firebase/interface.js.map +1 -0
- package/base/lazy-loader.d.ts +11 -0
- package/base/lazy-loader.js +23 -0
- package/base/lazy-loader.js.map +1 -0
- package/base/redux/backend.js.map +1 -0
- package/base/redux/drawer.js.map +1 -0
- package/{bundle/base → base}/redux/frontend.d.ts +41 -14
- package/{bundle/base → base}/redux/frontend.js +25 -6
- package/base/redux/frontend.js.map +1 -0
- package/{bundle/base → base}/store.d.ts +4 -2
- package/base/store.js.map +1 -0
- package/base/webcomponents/css/animation.d.ts +2 -0
- package/base/webcomponents/css/animation.js +68 -0
- package/base/webcomponents/css/animation.js.map +1 -0
- package/base/webcomponents/css/svg.js.map +1 -0
- package/{bundle/base → base/webcomponents}/css/toggle.js +0 -1
- package/base/webcomponents/css/toggle.js.map +1 -0
- package/{bundle/base → base}/webcomponents/drawer/css/drawer.js +7 -10
- package/base/webcomponents/drawer/css/drawer.js.map +1 -0
- package/base/webcomponents/drawer/css/exit.js.map +1 -0
- package/base/webcomponents/drawer/css/link.js.map +1 -0
- package/base/webcomponents/drawer/css/paragraph.js.map +1 -0
- package/{bundle/base → base}/webcomponents/drawer/drawer.d.ts +7 -6
- package/{bundle/base → base}/webcomponents/drawer/drawer.js +46 -31
- package/base/webcomponents/drawer/drawer.js.map +1 -0
- package/{bundle/base/css/form → base/webcomponents/form/css}/button.js +1 -2
- package/base/webcomponents/form/css/button.js.map +1 -0
- package/{bundle/base/css/form → base/webcomponents/form/css}/input.js +0 -1
- package/base/webcomponents/form/css/input.js.map +1 -0
- package/base/webcomponents/form/css/label.js.map +1 -0
- package/{bundle/base/css/form → base/webcomponents/form/css}/list.js +1 -2
- package/base/webcomponents/form/css/list.js.map +1 -0
- package/{bundle/base/webcomponents/drawer → base/webcomponents/form}/css/toggle.js +0 -1
- package/base/webcomponents/form/css/toggle.js.map +1 -0
- package/base/webcomponents/form/forgot.d.ts +15 -0
- package/base/webcomponents/form/forgot.js +66 -0
- package/base/webcomponents/form/forgot.js.map +1 -0
- package/{bundle/base/webcomponents/drawer/input → base/webcomponents/form}/login.d.ts +3 -2
- package/base/webcomponents/form/login.js +158 -0
- package/base/webcomponents/form/login.js.map +1 -0
- package/{bundle/base/webcomponents/drawer/input/sign-up.d.ts → base/webcomponents/form/signup.d.ts} +3 -2
- package/{bundle/base/webcomponents/drawer/input/sign-up.js → base/webcomponents/form/signup.js} +75 -49
- package/base/webcomponents/form/signup.js.map +1 -0
- package/{bundle/base → base}/webcomponents/icon/css/icon.js +0 -5
- package/base/webcomponents/icon/css/icon.js.map +1 -0
- package/{bundle/base → base}/webcomponents/icon/icon.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/icon/icon.js +7 -5
- package/base/webcomponents/icon/icon.js.map +1 -0
- package/base/webcomponents/login/css/auth.d.ts +2 -0
- package/base/webcomponents/login/css/auth.js +37 -0
- package/base/webcomponents/login/css/auth.js.map +1 -0
- package/base/webcomponents/login/css/link.d.ts +2 -0
- package/base/webcomponents/login/css/link.js +13 -0
- package/base/webcomponents/login/css/link.js.map +1 -0
- package/base/webcomponents/login/css/paragraph.d.ts +2 -0
- package/base/webcomponents/login/css/paragraph.js +11 -0
- package/base/webcomponents/login/css/paragraph.js.map +1 -0
- package/base/webcomponents/login/page.d.ts +55 -0
- package/base/webcomponents/login/page.js +114 -0
- package/base/webcomponents/login/page.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/css/navigation.js +6 -7
- package/base/webcomponents/settings/css/navigation.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/input/delete.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/settings/input/delete.js +15 -13
- package/base/webcomponents/settings/input/delete.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/input/email.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/settings/input/email.js +37 -35
- package/base/webcomponents/settings/input/email.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/input/name.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/settings/input/name.js +24 -20
- package/base/webcomponents/settings/input/name.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/input/password.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/settings/input/password.js +53 -39
- package/base/webcomponents/settings/input/password.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/input/uploader.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/settings/input/uploader.js +14 -14
- package/base/webcomponents/settings/input/uploader.js.map +1 -0
- package/{bundle/base → base}/webcomponents/settings/settings.d.ts +2 -1
- package/{bundle/base → base}/webcomponents/settings/settings.js +53 -44
- package/base/webcomponents/settings/settings.js.map +1 -0
- package/demonstration/index.html +53 -77
- package/demonstration/styles.css +76 -0
- package/export/pwa-auth.ts +4 -5
- package/package.json +32 -23
- package/source/production/pwa-auth.js +1109 -0
- package/source/pwa-styles.css +2 -0
- package/bundle/base/css/form/button.js.map +0 -1
- package/bundle/base/css/form/input.js.map +0 -1
- package/bundle/base/css/form/label.js.map +0 -1
- package/bundle/base/css/form/list.js.map +0 -1
- package/bundle/base/css/svg.js.map +0 -1
- package/bundle/base/css/toggle.js.map +0 -1
- package/bundle/base/export/pwa-auth.js.map +0 -1
- package/bundle/base/firebase/authentication.js.map +0 -1
- package/bundle/base/firebase/interface.js.map +0 -1
- package/bundle/base/redux/backend.js.map +0 -1
- package/bundle/base/redux/drawer.js.map +0 -1
- package/bundle/base/redux/frontend.js.map +0 -1
- package/bundle/base/store.js.map +0 -1
- package/bundle/base/webcomponents/drawer/css/drawer.js.map +0 -1
- package/bundle/base/webcomponents/drawer/css/exit.js.map +0 -1
- package/bundle/base/webcomponents/drawer/css/link.js.map +0 -1
- package/bundle/base/webcomponents/drawer/css/paragraph.js.map +0 -1
- package/bundle/base/webcomponents/drawer/css/toggle.js.map +0 -1
- package/bundle/base/webcomponents/drawer/drawer.js.map +0 -1
- package/bundle/base/webcomponents/drawer/input/login.js +0 -133
- package/bundle/base/webcomponents/drawer/input/login.js.map +0 -1
- package/bundle/base/webcomponents/drawer/input/sign-up.js.map +0 -1
- package/bundle/base/webcomponents/icon/css/icon.js.map +0 -1
- package/bundle/base/webcomponents/icon/icon.js.map +0 -1
- package/bundle/base/webcomponents/settings/css/navigation.js.map +0 -1
- package/bundle/base/webcomponents/settings/input/delete.js.map +0 -1
- package/bundle/base/webcomponents/settings/input/email.js.map +0 -1
- package/bundle/base/webcomponents/settings/input/name.js.map +0 -1
- package/bundle/base/webcomponents/settings/input/password.js.map +0 -1
- package/bundle/base/webcomponents/settings/input/uploader.js.map +0 -1
- package/bundle/base/webcomponents/settings/settings.js.map +0 -1
- package/source/esm/pwa-auth.js +0 -881
- package/source/esm/pwa-auth.js.map +0 -1
- /package/{bundle/base → base}/firebase/authentication.d.ts +0 -0
- /package/{bundle/base → base}/firebase/authentication.js +0 -0
- /package/{bundle/base → base}/firebase/interface.d.ts +0 -0
- /package/{bundle/base → base}/firebase/interface.js +0 -0
- /package/{bundle/base → base}/redux/backend.d.ts +0 -0
- /package/{bundle/base → base}/redux/backend.js +0 -0
- /package/{bundle/base → base}/redux/drawer.d.ts +0 -0
- /package/{bundle/base → base}/redux/drawer.js +0 -0
- /package/{bundle/base → base}/store.js +0 -0
- /package/{bundle/base → base/webcomponents}/css/svg.d.ts +0 -0
- /package/{bundle/base → base/webcomponents}/css/svg.js +0 -0
- /package/{bundle/base → base/webcomponents}/css/toggle.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/drawer.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/exit.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/exit.js +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/link.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/link.js +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/paragraph.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/drawer/css/paragraph.js +0 -0
- /package/{bundle/base/css/form → base/webcomponents/form/css}/button.d.ts +0 -0
- /package/{bundle/base/css/form → base/webcomponents/form/css}/input.d.ts +0 -0
- /package/{bundle/base/css/form → base/webcomponents/form/css}/label.d.ts +0 -0
- /package/{bundle/base/css/form → base/webcomponents/form/css}/label.js +0 -0
- /package/{bundle/base/css/form → base/webcomponents/form/css}/list.d.ts +0 -0
- /package/{bundle/base/webcomponents/drawer → base/webcomponents/form}/css/toggle.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/icon/css/icon.d.ts +0 -0
- /package/{bundle/base → base}/webcomponents/settings/css/navigation.d.ts +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { html, LitElement } from 'lit';
|
|
11
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
|
+
import { connect } from 'pwa-helpers/connect-mixin';
|
|
13
|
+
import { store } from '../../store';
|
|
14
|
+
import { authStyles } from './css/auth';
|
|
15
|
+
import { linkStyle } from './css/link';
|
|
16
|
+
import { lineStyle } from './css/paragraph';
|
|
17
|
+
import { animation } from '../css/animation';
|
|
18
|
+
import { listStyle } from '../form/css/list';
|
|
19
|
+
import '../form/login';
|
|
20
|
+
import '../form/signup';
|
|
21
|
+
let UserLogin = class UserLogin extends connect(store)(LitElement) {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.subscribe = false;
|
|
25
|
+
this._name = "";
|
|
26
|
+
this._log = false;
|
|
27
|
+
this._sign = false;
|
|
28
|
+
}
|
|
29
|
+
stateChanged(state) {
|
|
30
|
+
this._name = state.backend.name;
|
|
31
|
+
this._log = state.frontend.login;
|
|
32
|
+
this._sign = state.frontend.registerTwo;
|
|
33
|
+
}
|
|
34
|
+
static get styles() {
|
|
35
|
+
return [
|
|
36
|
+
authStyles,
|
|
37
|
+
linkStyle,
|
|
38
|
+
lineStyle,
|
|
39
|
+
listStyle,
|
|
40
|
+
animation
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
;
|
|
44
|
+
render() {
|
|
45
|
+
return html `
|
|
46
|
+
|
|
47
|
+
<section class= "service">
|
|
48
|
+
|
|
49
|
+
<header>
|
|
50
|
+
<h3>${this._log ? this._name : this._sign === this.subscribe ?
|
|
51
|
+
'Subscribe'
|
|
52
|
+
:
|
|
53
|
+
'Login'} </h3>
|
|
54
|
+
</header>
|
|
55
|
+
|
|
56
|
+
<!-- Logged-out State -->
|
|
57
|
+
<div
|
|
58
|
+
class= "spec"
|
|
59
|
+
?on= "${this._log === false}">
|
|
60
|
+
|
|
61
|
+
<div class= "wrapper">
|
|
62
|
+
<div class= "inner">
|
|
63
|
+
|
|
64
|
+
<!-- Log-in State -->
|
|
65
|
+
<form-login
|
|
66
|
+
source= "page"
|
|
67
|
+
class= "content ${true === this._sign ? 'opened' : 'closed'} "></form-login>
|
|
68
|
+
|
|
69
|
+
<!-- Sign-up State -->
|
|
70
|
+
<form-signup
|
|
71
|
+
source= "page"
|
|
72
|
+
class= "content ${false === this._sign ? 'opened' : 'closed'}"></form-signup>
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<!-- Logged-in State -->
|
|
80
|
+
<div
|
|
81
|
+
class= "spec setLog"
|
|
82
|
+
?on= "${this._log === true}">
|
|
83
|
+
|
|
84
|
+
<slot></slot>
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
</section>
|
|
89
|
+
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
__decorate([
|
|
94
|
+
property({ type: Boolean, attribute: true, reflect: true }),
|
|
95
|
+
__metadata("design:type", Object)
|
|
96
|
+
], UserLogin.prototype, "subscribe", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
state(),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], UserLogin.prototype, "_name", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
state(),
|
|
103
|
+
__metadata("design:type", Object)
|
|
104
|
+
], UserLogin.prototype, "_log", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
state(),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], UserLogin.prototype, "_sign", void 0);
|
|
109
|
+
UserLogin = __decorate([
|
|
110
|
+
customElement('user-login'),
|
|
111
|
+
__metadata("design:paramtypes", [])
|
|
112
|
+
], UserLogin);
|
|
113
|
+
export { UserLogin };
|
|
114
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../typescript/webcomponents/login/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,UAAU,EAAE,MAAQ,KAAK,CAAC;A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AAK,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;YAC5D,WAAW;YACX,CAAC;gBACD,OACA;;;;;;2BAMkB,IAAI,CAAC,IAAI,KAAK,KAAM;;;;;;;;uCAQR,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAS;;;;;uCAK1C,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAS;;;;;;;;;;2BAUvD,IAAI,CAAC,IAAI,KAAK,IAAK;;;;;;;;KAQ1C,CAAC;IACJ,CAAC;CAEF,CAAA;AA1EC;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;4CAA0B;AAEnF;IAAC,KAAK,EAAE;;wCAA2B;AACnC;IAAC,KAAK,EAAE;;uCAA8B;AACtC;IAAC,KAAK,EAAE;;wCAA8B;AAP3B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;;GACf,SAAS,CA6ErB;SA7EY,SAAS"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
export const navigation = css `
|
|
3
3
|
|
|
4
|
-
nav { overflow: hidden; }
|
|
4
|
+
nav { overflow: hidden; padding-top: 16px; }
|
|
5
5
|
|
|
6
|
-
/* Navigation Menu */
|
|
7
6
|
nav > ul {
|
|
8
7
|
|
|
9
8
|
list-style-type: none;
|
|
@@ -15,7 +14,6 @@ export const navigation = css `
|
|
|
15
14
|
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
/* Navigation Button */
|
|
19
17
|
nav > ul > li > button {
|
|
20
18
|
|
|
21
19
|
color: var(--pwa_nav_button, grey);
|
|
@@ -31,22 +29,23 @@ export const navigation = css `
|
|
|
31
29
|
|
|
32
30
|
}
|
|
33
31
|
|
|
34
|
-
/* Navigation Button - Active */
|
|
35
32
|
nav > ul > li > button[on] {
|
|
36
33
|
|
|
37
34
|
color: var(--pwa_nav_select, black);
|
|
38
35
|
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
|
|
42
39
|
nav > ul > li > button:hover {
|
|
43
40
|
|
|
44
41
|
cursor: pointer;
|
|
45
42
|
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
section
|
|
49
|
-
|
|
45
|
+
section {
|
|
46
|
+
grid-template-rows: auto 1fr;
|
|
47
|
+
background-color: var( --section_background, white);
|
|
48
|
+
}
|
|
50
49
|
|
|
51
50
|
`;
|
|
52
51
|
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/css/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD5B,CAAC"}
|
|
@@ -11,12 +11,22 @@ import { LitElement, css, html } from "lit";
|
|
|
11
11
|
import { state } from "lit/decorators.js";
|
|
12
12
|
import { connect } from "pwa-helpers";
|
|
13
13
|
import store from "../../../store";
|
|
14
|
-
import { buttonStyle } from "
|
|
14
|
+
import { buttonStyle } from "../../form/css/button";
|
|
15
15
|
import { auth } from '../../../firebase/authentication';
|
|
16
16
|
export class DeleteUser extends connect(store)(LitElement) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.login = false;
|
|
20
|
+
this.email = '';
|
|
21
|
+
this.officialDelete = async () => {
|
|
22
|
+
if (auth.currentUser) {
|
|
23
|
+
return auth.currentUser.delete().then(() => { }).catch(() => { });
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
alert('Please Sign-in');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
20
30
|
firstUpdated() {
|
|
21
31
|
this.shadowRoot.querySelector('.deleteUser').addEventListener('click', () => {
|
|
22
32
|
this.alertDelete();
|
|
@@ -33,7 +43,7 @@ export class DeleteUser extends connect(store)(LitElement) {
|
|
|
33
43
|
|
|
34
44
|
:host {
|
|
35
45
|
display: grid;
|
|
36
|
-
grid-template-rows:
|
|
46
|
+
grid-template-rows: 1fr auto;
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
p {
|
|
@@ -70,14 +80,6 @@ export class DeleteUser extends connect(store)(LitElement) {
|
|
|
70
80
|
console.log("user here");
|
|
71
81
|
}
|
|
72
82
|
}
|
|
73
|
-
officialDelete = async () => {
|
|
74
|
-
if (auth.currentUser) {
|
|
75
|
-
return auth.currentUser.delete().then(() => { }).catch(() => { });
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
alert('Please Sign-in');
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
83
|
}
|
|
82
84
|
__decorate([
|
|
83
85
|
state(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/delete.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAmB,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAiB,aAAa,CAAC;AACjD,OAAO,KAAmB,MAAS,gBAAgB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAa,uBAAuB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAoB,kCAAkC,CAAC;AAEtE,MAAM,OAAO,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAKxD;QAAgB,KAAK,EAAE,CAAC;Q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;YAAE,IAAI,CAAC,cAAc,EAAE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;SAAE;aAClE;YAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;SAAE;IACrC,CAAC;CAaF;AAhEC;IAAC,KAAK,EAAE;;yCAAiC;AACzC;IAAC,KAAK,EAAE;;yCAA4B;AAiEtC,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -12,15 +12,31 @@ import { property, state } from "lit/decorators.js";
|
|
|
12
12
|
import { connect } from "pwa-helpers";
|
|
13
13
|
import store from "../../../store";
|
|
14
14
|
import { auth } from "../../../firebase/authentication";
|
|
15
|
-
import { labelStyle } from "
|
|
16
|
-
import { inputStyle } from "
|
|
17
|
-
import { buttonStyle } from "
|
|
15
|
+
import { labelStyle } from "../../form/css/label";
|
|
16
|
+
import { inputStyle } from "../../form/css/input";
|
|
17
|
+
import { buttonStyle } from "../../form/css/button";
|
|
18
18
|
import { updateEmail } from "firebase/auth";
|
|
19
19
|
export class ContactEmail extends connect(store)(LitElement) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.email = '';
|
|
23
|
+
this.login = false;
|
|
24
|
+
this.mail = "";
|
|
25
|
+
this.default = (e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
};
|
|
28
|
+
this.saveEmail = async () => {
|
|
29
|
+
if (auth.currentUser) {
|
|
30
|
+
let contactMail = this.shadowRoot?.querySelector('#pwa-email');
|
|
31
|
+
await updateEmail(auth.currentUser, contactMail.value).catch((error) => { console.log(error); });
|
|
32
|
+
const emailChangedEvent = new CustomEvent("userEmailChanged", {
|
|
33
|
+
detail: { email: contactMail.value }
|
|
34
|
+
});
|
|
35
|
+
window.dispatchEvent(emailChangedEvent);
|
|
36
|
+
alert('Email Updated');
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
24
40
|
stateChanged(state) {
|
|
25
41
|
this.login = state.frontend.login;
|
|
26
42
|
this.mail = state.backend.email;
|
|
@@ -36,11 +52,7 @@ export class ContactEmail extends connect(store)(LitElement) {
|
|
|
36
52
|
buttonStyle,
|
|
37
53
|
css `
|
|
38
54
|
|
|
39
|
-
:host {
|
|
40
|
-
display: grid;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
form { display: grid; }
|
|
55
|
+
:host, form { display: grid; }
|
|
44
56
|
|
|
45
57
|
`
|
|
46
58
|
];
|
|
@@ -52,16 +64,20 @@ export class ContactEmail extends connect(store)(LitElement) {
|
|
|
52
64
|
autocomplete="off"
|
|
53
65
|
@submit="${this.default}">
|
|
54
66
|
|
|
55
|
-
<label for="pwa-email" >E-mail
|
|
67
|
+
<label for="pwa-email" >E-mail:
|
|
68
|
+
|
|
69
|
+
<input
|
|
70
|
+
id = "pwa-email"
|
|
71
|
+
name = "email"
|
|
72
|
+
type = "email"
|
|
73
|
+
class = "email"
|
|
74
|
+
data-label = "Account Email"
|
|
75
|
+
@input = "${this.handleEmail}"
|
|
76
|
+
.value = "${this.mail}"/>
|
|
77
|
+
|
|
78
|
+
<span class="verified"></span>
|
|
56
79
|
|
|
57
|
-
|
|
58
|
-
id = "pwa-email"
|
|
59
|
-
name = "email"
|
|
60
|
-
type = "email"
|
|
61
|
-
class = "email"
|
|
62
|
-
data-label = "Account Email"
|
|
63
|
-
@input = "${this.handleEmail}"
|
|
64
|
-
.value = "${this.mail}"/>
|
|
80
|
+
</label>
|
|
65
81
|
|
|
66
82
|
<button
|
|
67
83
|
class = "action-button"
|
|
@@ -72,20 +88,6 @@ export class ContactEmail extends connect(store)(LitElement) {
|
|
|
72
88
|
|
|
73
89
|
`;
|
|
74
90
|
}
|
|
75
|
-
default = (e) => {
|
|
76
|
-
e.preventDefault();
|
|
77
|
-
};
|
|
78
|
-
saveEmail = async () => {
|
|
79
|
-
if (auth.currentUser) {
|
|
80
|
-
let contactMail = this.shadowRoot?.querySelector('#pwa-email');
|
|
81
|
-
await updateEmail(auth.currentUser, contactMail.value).catch((error) => { console.log(error); });
|
|
82
|
-
const emailChangedEvent = new CustomEvent("userEmailChanged", {
|
|
83
|
-
detail: { email: contactMail.value }
|
|
84
|
-
});
|
|
85
|
-
window.dispatchEvent(emailChangedEvent);
|
|
86
|
-
alert('Email Updated');
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
91
|
}
|
|
90
92
|
__decorate([
|
|
91
93
|
property({ type: String, reflect: true }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/email.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAO,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAe,aAAa,CAAC;AAC/C,OAAO,KAAmB,MAAO,gBAAgB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAkB,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAY,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAY,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAW,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAW,eAAe,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAQ1D;QAAgB,KAAK,EAAE,CAAC;QALkB,UAAK,GAAG,EAAE,CAAC;QAEpC,UAAK,GAAoB,KAAK,CAAC;QAC/B,SAAI,GAAqB,EAAE,CAAC;QA2DrC,YAAO,GAAG,CAAC,CAAO,EAAE,EAAE;YAC5B,CAAC,CAAC,cAAc,EAAE,CAAC;QAC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IAAI,CAAC,KAAK,KAAK,KAAK;;;;KAI1C,CAAC;IACJ,CAAC;CA8BF;AAzFC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;2CAAY;AAErD;IAAC,KAAK,EAAE;;2CAAwC;AAChD;IAAC,KAAK,EAAE;;0CAAqC;AAwF/C,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC"}
|
|
@@ -14,13 +14,28 @@ import { store } from "../../../store";
|
|
|
14
14
|
import { updateProfile } from "firebase/auth";
|
|
15
15
|
import { accName } from "../../../redux/backend";
|
|
16
16
|
import { auth } from "../../../firebase/authentication";
|
|
17
|
-
import { labelStyle } from "
|
|
18
|
-
import { inputStyle } from "
|
|
19
|
-
import { buttonStyle } from "
|
|
17
|
+
import { labelStyle } from "../../form/css/label";
|
|
18
|
+
import { inputStyle } from "../../form/css/input";
|
|
19
|
+
import { buttonStyle } from "../../form/css/button";
|
|
20
20
|
export class InputName extends connect(store)(LitElement) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.value = '';
|
|
24
|
+
this.login = false;
|
|
25
|
+
this.default = (e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
};
|
|
28
|
+
this.alertProfile = async () => {
|
|
29
|
+
if (auth.currentUser) {
|
|
30
|
+
await updateProfile(auth.currentUser, { displayName: this.value })
|
|
31
|
+
.then(() => { store.dispatch(accName(this.value)); })
|
|
32
|
+
.then(() => { alert('updated name:' + this.value); });
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
alert('Please Login');
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
24
39
|
stateChanged(state) {
|
|
25
40
|
this.login = state.frontend.login;
|
|
26
41
|
this.value = state.backend.name;
|
|
@@ -44,7 +59,7 @@ export class InputName extends connect(store)(LitElement) {
|
|
|
44
59
|
@submit="${this.default}">
|
|
45
60
|
|
|
46
61
|
<label
|
|
47
|
-
for="pwa-name"
|
|
62
|
+
for="pwa-name">Name:
|
|
48
63
|
|
|
49
64
|
<input
|
|
50
65
|
id = "pwa-name"
|
|
@@ -53,6 +68,8 @@ export class InputName extends connect(store)(LitElement) {
|
|
|
53
68
|
data-label = "Contact Name"
|
|
54
69
|
@input = "${this.handleInput}"
|
|
55
70
|
.value = "${this.value}" />
|
|
71
|
+
|
|
72
|
+
</label>
|
|
56
73
|
|
|
57
74
|
<!-- Save to Database -->
|
|
58
75
|
<button
|
|
@@ -64,23 +81,10 @@ export class InputName extends connect(store)(LitElement) {
|
|
|
64
81
|
|
|
65
82
|
`;
|
|
66
83
|
}
|
|
67
|
-
default = (e) => {
|
|
68
|
-
e.preventDefault();
|
|
69
|
-
};
|
|
70
84
|
handleInput(event) {
|
|
71
85
|
const input = event.target;
|
|
72
86
|
this.value = input.value;
|
|
73
87
|
}
|
|
74
|
-
alertProfile = async () => {
|
|
75
|
-
if (auth.currentUser) {
|
|
76
|
-
await updateProfile(auth.currentUser, { displayName: this.value })
|
|
77
|
-
.then(() => { store.dispatch(accName(this.value)); })
|
|
78
|
-
.then(() => { alert('updated name:' + this.value); });
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
alert('Please Login');
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
88
|
}
|
|
85
89
|
__decorate([
|
|
86
90
|
property({ type: String, reflect: true }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/name.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAS,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAiB,aAAa,CAAC;AACjD,OAA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C,KAAK,GAAI,KAAK,CAAC,OAAQ,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,MAAM;QAAqB,OAAO;YAC3C,UAAU;YACV,UAAU;YACV,WAAW;YACX,GAAG,CAAA;;;;KAIF;SAAE,CAAC;IAAC,CAAC;IAER,MAAM;QACJ,OAAO,IAAI,CAAA;;;mBAGI,IAAI,CAAC,OAAO;;;;;;;;;;+BAUC,IAAI,CAAC,WAAY;+BACjB,IAAI,CAAC,KAAM;;;;;;;oBAOvB,IAAI,CAAC,YAAY;uBACd,IAAI,CAAC,KAAK,KAAK,KAAK;;;;KAItC,CAAC;IACJ,CAAC;IAQO,WAAW,CAAC,KAAY;QAC9B,MAAM,KAAK,GAAK,KAAK,CAAC,MAA0B,CAAC;QACjD,IAAI,CAAC,KAAK,GAAM,KAAK,CAAC,KAAK,CAAC;IAC9B,CAAC;CAkBF;AA9EC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wCAAmB;AAE5D;IAAC,KAAK,EAAE;;wCAAiC;AA8E3C,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -12,15 +12,30 @@ import { state } from "lit/decorators.js";
|
|
|
12
12
|
import { connect } from "pwa-helpers";
|
|
13
13
|
import store from "../../../store";
|
|
14
14
|
import { auth } from "../../../firebase/authentication";
|
|
15
|
-
import { labelStyle } from "
|
|
16
|
-
import { inputStyle } from "
|
|
17
|
-
import { buttonStyle } from "
|
|
15
|
+
import { labelStyle } from "../../form/css/label";
|
|
16
|
+
import { inputStyle } from "../../form/css/input";
|
|
17
|
+
import { buttonStyle } from "../../form/css/button";
|
|
18
18
|
import { updatePassword } from "firebase/auth";
|
|
19
19
|
export class InputPassword extends connect(store)(LitElement) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.message = '';
|
|
23
|
+
this.password = '';
|
|
24
|
+
this.login = false;
|
|
25
|
+
this.default = (e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
};
|
|
28
|
+
this.updatePass = async (newPassword) => {
|
|
29
|
+
if (auth.currentUser) {
|
|
30
|
+
await updatePassword(auth.currentUser, newPassword)
|
|
31
|
+
.then(() => { console.log("Password successful!"); })
|
|
32
|
+
.catch((error) => { console.log("Problem: " + error.messge); });
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
alert('Please Login');
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
24
39
|
firstUpdated() {
|
|
25
40
|
this.shadowRoot.querySelector('.pass').addEventListener('click', () => {
|
|
26
41
|
this.alertPassword();
|
|
@@ -44,7 +59,7 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
44
59
|
display: grid;
|
|
45
60
|
}
|
|
46
61
|
|
|
47
|
-
form { display: grid; }
|
|
62
|
+
form { display: grid; grid-template-rows: 1fr 1fr auto;}
|
|
48
63
|
|
|
49
64
|
p.error { color: red; }
|
|
50
65
|
|
|
@@ -59,30 +74,35 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
59
74
|
@submit="${this.default}">
|
|
60
75
|
|
|
61
76
|
<!-- Input - 1 -->
|
|
62
|
-
<
|
|
77
|
+
<div>
|
|
78
|
+
|
|
79
|
+
<label for="pwa-new-password">New Password
|
|
80
|
+
|
|
81
|
+
<input
|
|
82
|
+
id = "pwa-new-password"
|
|
83
|
+
name = "new_password"
|
|
84
|
+
type = "password"
|
|
85
|
+
.value = "${this.password}"
|
|
86
|
+
@input = "${this.handleInputChange}"
|
|
87
|
+
aria-describedby = "password-help">
|
|
63
88
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
type = "password"
|
|
68
|
-
.value = "${this.password}"
|
|
69
|
-
@input = "${this.handleInputChange}"
|
|
70
|
-
aria-describedby = "password-help">
|
|
89
|
+
</label>
|
|
90
|
+
|
|
91
|
+
</div>
|
|
71
92
|
|
|
72
93
|
<!-- Input - 2 -->
|
|
73
|
-
<
|
|
94
|
+
<div>
|
|
74
95
|
|
|
75
|
-
|
|
76
|
-
id = "pwa-verify-password"
|
|
77
|
-
name = "verify_password"
|
|
78
|
-
type = "password">
|
|
96
|
+
<label for="pwa-verify-password">Verify Password
|
|
79
97
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
98
|
+
<input
|
|
99
|
+
id = "pwa-verify-password"
|
|
100
|
+
name = "verify_password"
|
|
101
|
+
type = "password">
|
|
84
102
|
|
|
85
|
-
|
|
103
|
+
</label>
|
|
104
|
+
|
|
105
|
+
${this.message ? html `
|
|
86
106
|
|
|
87
107
|
<p
|
|
88
108
|
class=${this.message.includes('Password entered') ? '' : 'error'}
|
|
@@ -94,13 +114,17 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
94
114
|
|
|
95
115
|
` : ''}
|
|
96
116
|
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<!-- Submit -->
|
|
120
|
+
<button
|
|
121
|
+
class="action-button pass"
|
|
122
|
+
?disabled="${this.login === false}">Update</button>
|
|
123
|
+
|
|
97
124
|
</form>
|
|
98
125
|
|
|
99
126
|
`;
|
|
100
127
|
}
|
|
101
|
-
default = (e) => {
|
|
102
|
-
e.preventDefault();
|
|
103
|
-
};
|
|
104
128
|
alertPassword() {
|
|
105
129
|
if (!this.password) {
|
|
106
130
|
this.message = 'Please enter a password';
|
|
@@ -123,16 +147,6 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
123
147
|
}
|
|
124
148
|
}
|
|
125
149
|
}
|
|
126
|
-
updatePass = async (newPassword) => {
|
|
127
|
-
if (auth.currentUser) {
|
|
128
|
-
await updatePassword(auth.currentUser, newPassword)
|
|
129
|
-
.then(() => { console.log("Password successful!"); })
|
|
130
|
-
.catch((error) => { console.log("Problem: " + error.messge); });
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
alert('Please Login');
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
150
|
}
|
|
137
151
|
__decorate([
|
|
138
152
|
state(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/password.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAiB,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAe,aAAa,CAAC;AAC/C,OAAO,KAAmB,MAAO,gBAAgB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAkB,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAY,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAY,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAG,MAAU,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAQ,eAAe,CAAC;AAEjD,MAAM,OAAO,aAAc,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAM3D;QAAgB,KAAK,EAAE,CAAC;QAJP,YAAO,GAAkB,EAAE,CAAC;QAC5B,aAAQ,GAAiB,EAAE,CAAC;QAC5B,UAAK,GAAoB,KAAK,CAAC;QAmGxC,YAAO,GAAG,CAAC,CAAO,EAAE,EAAE;YAC5B,CAAC,CAAC,cAAc,EAAE,CAAC;QACrB,CAAC,CAAA;QA0BO,eAAU,GAAG,KAAK,EAAE,WAAe,EAAE,EAAE;YAE7C,IAAI,IAAI,CAAC,WAAW,EAAE;gBAGpB,MAAM,cAAc,CAAG,IAAI,CAAC,WAAW,EAAE,WAAW,CAAE;qBACnD,IAAI,CAAG,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CA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,KAAK,KAAK;;;;KAItC,CAAC;IACJ,CAAC;IAQO,aAAa;QAEnB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;SAC1C;aAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACnC,IAAI,CAAC,OAAO,GAAG,6CAA6C,CAAC;SAC9D;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC;YAEnC,IAAI,CAAC,wCAAwC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBACjE,IAAI,CAAC,OAAO,GAAG,8DAA8D,CAAC;aAC/E;iBAAM;gBAEL,IAAI,IAAI,CAAC,WAAW,EAAM;oBAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAAE;qBACnC;oBAAE,KAAK,CAAC,cAAc,CAAC,CAAC;iBAAE;aAErD;SAEF;IAEH,CAAC;CAgBF;AA9IC;IAAC,KAAK,EAAE;;8CAAqC;AAC7C;IAAC,KAAK,EAAE;;+CAAqC;AAC7C;IAAC,KAAK,EAAE;;4CAAwC;AA8IlD,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -15,17 +15,23 @@ import { auth, storage, user } from '../../../firebase/authentication';
|
|
|
15
15
|
import { updateProfile } from 'firebase/auth';
|
|
16
16
|
import { accImage } from '../../../redux/backend';
|
|
17
17
|
import { ref, updateMetadata, getDownloadURL, uploadBytesResumable } from "@firebase/storage";
|
|
18
|
-
import { labelStyle } from '
|
|
18
|
+
import { labelStyle } from '../../form/css/label';
|
|
19
19
|
export class ContactPhoto extends connect(store)(LitElement) {
|
|
20
|
-
photo = '';
|
|
21
|
-
emptyArtwork = '';
|
|
22
|
-
user = '';
|
|
23
|
-
login = false;
|
|
24
|
-
progress = 0;
|
|
25
|
-
error = '';
|
|
26
|
-
status = '';
|
|
27
20
|
constructor() {
|
|
28
21
|
super();
|
|
22
|
+
this.photo = '';
|
|
23
|
+
this.emptyArtwork = '';
|
|
24
|
+
this.user = '';
|
|
25
|
+
this.login = false;
|
|
26
|
+
this.progress = 0;
|
|
27
|
+
this.error = '';
|
|
28
|
+
this.status = '';
|
|
29
|
+
this.dispatchPhoto = async (url) => {
|
|
30
|
+
if (auth.currentUser) {
|
|
31
|
+
await updateProfile(auth.currentUser, { photoURL: url }).catch((error) => { console.log(error); });
|
|
32
|
+
store.dispatch(accImage(url));
|
|
33
|
+
}
|
|
34
|
+
};
|
|
29
35
|
this.progress = 0;
|
|
30
36
|
this.error = '';
|
|
31
37
|
this.status = '';
|
|
@@ -197,12 +203,6 @@ export class ContactPhoto extends connect(store)(LitElement) {
|
|
|
197
203
|
});
|
|
198
204
|
}
|
|
199
205
|
}
|
|
200
|
-
dispatchPhoto = async (url) => {
|
|
201
|
-
if (auth.currentUser) {
|
|
202
|
-
await updateProfile(auth.currentUser, { photoURL: url }).catch((error) => { console.log(error); });
|
|
203
|
-
store.dispatch(accImage(url));
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
206
|
}
|
|
207
207
|
__decorate([
|
|
208
208
|
property(),
|