@panomc/theme-core 1.2.1-dev.1 → 1.2.1-dev.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panomc/theme-core",
|
|
3
|
-
"version": "1.2.1-dev.
|
|
3
|
+
"version": "1.2.1-dev.2",
|
|
4
4
|
"description": "The Pano theme engine: hooks factories, plugin engine, headless page controllers, default views and the theme CLI. Themes depend on this package instead of forking vanilla-theme.",
|
|
5
5
|
"author": "PanoMC",
|
|
6
6
|
"pano": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@fortawesome/fontawesome-free": "^6.7.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@panomc/sdk": "^2.0.0-dev.
|
|
64
|
+
"@panomc/sdk": "^2.0.0-dev.2",
|
|
65
65
|
"@sveltejs/adapter-node": "^6.0.0",
|
|
66
66
|
"@sveltejs/kit": "^3.1.0",
|
|
67
67
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"vite": "^8.3.4"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@panomc/sdk": "2.0.0-dev.
|
|
74
|
+
"@panomc/sdk": "2.0.0-dev.2",
|
|
75
75
|
"@sveltejs/adapter-node": "^6.0.0",
|
|
76
76
|
"@sveltejs/kit": "^3.1.0",
|
|
77
77
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
@@ -106,12 +106,21 @@
|
|
|
106
106
|
|
|
107
107
|
const session = getContext("session");
|
|
108
108
|
|
|
109
|
+
// The username the password step was opened for. A browser or password manager that autofills the form fires
|
|
110
|
+
// `input` on the username field with the same value: that must not close the password step again, or the
|
|
111
|
+
// manager refills, the field closes again, and the form flickers forever.
|
|
112
|
+
let passwordStepIdentifier = null;
|
|
113
|
+
|
|
109
114
|
function onUsernameOrEmailFieldInput() {
|
|
110
115
|
const c = stripIdentifierWhitespace($usernameOrEmail);
|
|
111
116
|
if (c !== $usernameOrEmail) {
|
|
112
117
|
$usernameOrEmail = c;
|
|
113
118
|
}
|
|
119
|
+
if ($passwordVisible && passwordStepIdentifier !== null && c === passwordStepIdentifier) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
114
122
|
if (!$emailRequired && !($session?.siteInfo?.isDemo && $usernameOrEmail === "demo")) {
|
|
123
|
+
passwordStepIdentifier = null;
|
|
115
124
|
$passwordVisible = false;
|
|
116
125
|
$password = "";
|
|
117
126
|
}
|
|
@@ -143,6 +152,7 @@
|
|
|
143
152
|
$error = null;
|
|
144
153
|
$autoVerifyDone = false;
|
|
145
154
|
$linkCode = "";
|
|
155
|
+
passwordStepIdentifier = null;
|
|
146
156
|
$passwordVisible = false;
|
|
147
157
|
$emailRequired = false;
|
|
148
158
|
$email = "";
|
|
@@ -333,6 +343,7 @@
|
|
|
333
343
|
}
|
|
334
344
|
|
|
335
345
|
if (errorCode === "LOGIN_IS_INVALID" && !$passwordVisible) {
|
|
346
|
+
passwordStepIdentifier = stripIdentifierWhitespace($usernameOrEmail);
|
|
336
347
|
$passwordVisible = true;
|
|
337
348
|
if ($session?.siteInfo?.isDemo && $usernameOrEmail === "demo") {
|
|
338
349
|
$password = "123456";
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
bind:value={$usernameOrEmail}
|
|
122
122
|
class="pano-login-view__input form-control {$passwordVisible ? 'rounded-bottom-0' : 'rounded'}"
|
|
123
123
|
id="usernameOrEmail"
|
|
124
|
+
autocomplete="username"
|
|
124
125
|
on:input={onUsernameOrEmailFieldInput}
|
|
125
126
|
disabled={$loading || $emailRequired}
|
|
126
127
|
type="text" />
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
bind:value={$password}
|
|
136
137
|
class="pano-login-view__input-2 form-control rounded-0 {$emailRequired ? '' : 'rounded-bottom'}"
|
|
137
138
|
id="password"
|
|
139
|
+
autocomplete="current-password"
|
|
138
140
|
on:input={() => {
|
|
139
141
|
$error = null;
|
|
140
142
|
}}
|