@keycloakify/keycloak-account-ui 260305.0.0 → 260500.0.0
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/KcAccountUiLoader.d.ts +1 -0
- package/KcAccountUiLoader.js +19 -3
- package/KcAccountUiLoader.js.map +1 -1
- package/keycloak-theme/account/account-security/AccountRow.tsx +2 -2
- package/keycloak-theme/account/account-security/DeviceActivity.tsx +1 -1
- package/keycloak-theme/account/account-security/SigningIn.tsx +35 -4
- package/keycloak-theme/account/api/representations.ts +3 -1
- package/keycloak-theme/account/applications/Applications.tsx +2 -1
- package/keycloak-theme/account/i18n/messages_az.properties +226 -0
- package/keycloak-theme/account/i18n/messages_ca.properties +19 -1
- package/keycloak-theme/account/i18n/messages_cs.properties +222 -6
- package/keycloak-theme/account/i18n/messages_de.properties +19 -1
- package/keycloak-theme/account/i18n/messages_el.properties +19 -0
- package/keycloak-theme/account/i18n/messages_en.properties +3 -1
- package/keycloak-theme/account/i18n/messages_es.properties +19 -1
- package/keycloak-theme/account/i18n/messages_eu.properties +247 -0
- package/keycloak-theme/account/i18n/messages_fr.properties +74 -56
- package/keycloak-theme/account/i18n/messages_it.properties +19 -1
- package/keycloak-theme/account/i18n/messages_ja.properties +22 -4
- package/keycloak-theme/account/i18n/messages_ka.properties +11 -1
- package/keycloak-theme/account/i18n/messages_kk.properties +227 -0
- package/keycloak-theme/account/i18n/messages_nl.properties +11 -11
- package/keycloak-theme/account/i18n/messages_pt_BR.properties +19 -1
- package/keycloak-theme/account/i18n/messages_ro.properties +36 -1
- package/keycloak-theme/account/i18n/messages_ru.properties +19 -1
- package/keycloak-theme/account/i18n/messages_sl.properties +5 -1
- package/keycloak-theme/account/i18n/messages_tr.properties +77 -13
- package/keycloak-theme/account/i18n/{messages_zh_CN.properties → messages_zh_Hans.properties} +72 -28
- package/keycloak-theme/account/i18n/messages_zh_Hant.properties +244 -0
- package/keycloak-theme/account/oid4vci/Oid4Vci.tsx +1 -0
- package/keycloak-theme/account/resources/PermissionRequest.tsx +4 -4
- package/keycloak-theme/account/utils/usePromise.ts +1 -1
- package/package.json +8 -8
- package/src/KcAccountUiLoader.tsx +22 -1
- package/src/zKcContextLike.ts +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/zKcContextLike.js +2 -1
- package/zKcContextLike.js.map +1 -1
- package/keycloak-theme/account/i18n/messages_zh_TW.properties +0 -196
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# IMPORTANT: This file contains the base translation. Modifying it directly is not recommended.
|
|
2
|
+
# To override or add custom messages, create a file named messages_zh_Hant_override.properties in the same directory.
|
|
3
|
+
# This file will be automatically loaded and merged with the base translation.
|
|
4
|
+
# If you're implementing theme variants, you can also create variant-specific `.properties` files.
|
|
5
|
+
# For example let's say you have defined `themeName: ["vanilla", "chocolate"]` then you can create the following files:
|
|
6
|
+
# messages_zh_Hant_override_vanilla.properties
|
|
7
|
+
# messages_zh_Hant_override_chocolate.properties
|
|
8
|
+
|
|
9
|
+
cancel=取消
|
|
10
|
+
applicationType=應用程式類型
|
|
11
|
+
backTo=回到 {{app}}
|
|
12
|
+
removeConsentSuccess=成功移除授權
|
|
13
|
+
noGroupsText=您尚未加入任何群組
|
|
14
|
+
required=需要
|
|
15
|
+
path=路徑
|
|
16
|
+
password=我的密碼
|
|
17
|
+
setUpNew=設定 {{name}}
|
|
18
|
+
lastAccessedOn=最後存取時間
|
|
19
|
+
deviceActivity=已登入裝置
|
|
20
|
+
permissions=權限
|
|
21
|
+
credentialCreatedAt=<0>建立於</0> {{date}}。
|
|
22
|
+
error-username-invalid-character=「{{0}}」包含了非法字元。
|
|
23
|
+
usernamePlaceholder=使用者名稱或電子信箱
|
|
24
|
+
infoMessage=透過點擊取消授權,您將刪除該應用程式授予的權限。此應用程式將不再能夠存取您的權限。
|
|
25
|
+
scopesHelp=與該資源關聯的範圍。
|
|
26
|
+
unknownOperatingSystem=未知作業系統
|
|
27
|
+
deny=拒絕
|
|
28
|
+
edit=編輯
|
|
29
|
+
otp-display-name=OTP 驗證器名稱
|
|
30
|
+
selectALocale=選擇語言
|
|
31
|
+
signOut=登出
|
|
32
|
+
linkedEmpty=沒有已連結的帳號
|
|
33
|
+
directMembership=直屬成員
|
|
34
|
+
accept=同意
|
|
35
|
+
error-invalid-length-too-short=「{{0}}」的最小長度為 {{1}}。
|
|
36
|
+
resourceSharedWith_one=資源已共用給 <0>{{username}}</0>
|
|
37
|
+
error-number-out-of-range-too-big=「{{0}}」的最大值為 {{2}}。
|
|
38
|
+
updateEmail=更新電子信箱
|
|
39
|
+
two-factor=雙因素驗證
|
|
40
|
+
resourceSharedWith_zero=這個資源未被共享。
|
|
41
|
+
signedInDevicesExplanation=登出任何不明裝置。
|
|
42
|
+
addMultivaluedLabel=添加 {{fieldLabel}}
|
|
43
|
+
status=狀態
|
|
44
|
+
error-number-out-of-range-too-small=「{{0}}」的最小值為 {{1}}。
|
|
45
|
+
invalidEmailMessage={{0}}:無效的電子郵件地址。
|
|
46
|
+
lastName=姓氏
|
|
47
|
+
removeModalMessage=這將刪除目前授予 {{name}} 的存取權限。 如果您想重新使用此應用程序,則需要再次授予存取權限。
|
|
48
|
+
clients=應用程式
|
|
49
|
+
filterByName=透過名字搜尋...
|
|
50
|
+
refreshPage=重新整理頁面
|
|
51
|
+
save=儲存
|
|
52
|
+
error-user-attribute-required=請提供「{{0}}」。
|
|
53
|
+
currentSession=目前連線裝置
|
|
54
|
+
clientDescriptionHelp=指定應用程式的描述。 例如「我的時間表應用程式」。 也支援 i18n 鍵值。 例如:${my_client_description}
|
|
55
|
+
scopeTypeHelp=將應用程式範圍設為預設範圍,並新增至每個新建立的應用程式
|
|
56
|
+
error-empty=請提供「{{0}}」的數值。
|
|
57
|
+
error-invalid-uri-fragment=「{{0}}」是無效的 URL 片段。
|
|
58
|
+
error-invalid-blank=請指定「{{0}}」的數值。
|
|
59
|
+
missingFirstNameMessage={{0}}:請指定名字。
|
|
60
|
+
signedOutSession=已登出 {{browser}}/{{os}}
|
|
61
|
+
share=分享
|
|
62
|
+
close=關閉
|
|
63
|
+
email=電子信箱
|
|
64
|
+
signOutWarning=登出這個裝置?
|
|
65
|
+
removeConsentError=由於以下原因無法移除同意:{{error}}
|
|
66
|
+
signOutAllDevicesWarning=此操作將登出所有已登入的裝置,包括目前的裝置。
|
|
67
|
+
unShareSuccess=資源已成功取消共享。
|
|
68
|
+
signingIn=登入
|
|
69
|
+
stopUsingCred=停止使用 {{name}}?
|
|
70
|
+
groupsListHeader=群組清單標頭
|
|
71
|
+
error-number-out-of-range=「{{0}}」必須是一個在 {{1}} 到 {{2}} 之間的數字。
|
|
72
|
+
privacyPolicy=隱私權政策
|
|
73
|
+
thirdPartyApp=第三方應用
|
|
74
|
+
started=開始於
|
|
75
|
+
avatar=使用者頭像
|
|
76
|
+
scopeDescriptionHelp=應用程式授權的描述
|
|
77
|
+
confirm=確認
|
|
78
|
+
updateSuccess=資源已成功更新。
|
|
79
|
+
selectOne=選取一個選項
|
|
80
|
+
unShare=全部取消共享
|
|
81
|
+
linkedAccounts=已連結的帳號
|
|
82
|
+
personalInfoDescription=管理你的基本資訊
|
|
83
|
+
removeAccess=取消授權
|
|
84
|
+
signingInDescription=設定登入方式。
|
|
85
|
+
somethingWentWrongDescription=很抱歉,發生了未知的錯誤。
|
|
86
|
+
personalInfo=個人資訊
|
|
87
|
+
removeCred=移除 {{name}}
|
|
88
|
+
signOutAllDevices=登出所有裝置
|
|
89
|
+
scopeNameHelp=應用程式範圍的名稱。 在領域內必須是獨一無二的。 名稱不應包含空格字符,因為它被用於授權範圍的值
|
|
90
|
+
flowTypeHelp=甚麼類型的形式
|
|
91
|
+
error-invalid-email=無效的電子郵件地址。
|
|
92
|
+
myResources=我的資源
|
|
93
|
+
linkedAccountsIntroMessage=管理第三方登入的帳號。
|
|
94
|
+
accountSecurity=帳號安全性
|
|
95
|
+
groupDescriptionLabel=查看與你關聯的全組
|
|
96
|
+
manageAccount=管理帳號
|
|
97
|
+
resourceAlreadyShared=資源已經與此使用者共享。
|
|
98
|
+
error-invalid-length-too-long=「{{0}}」的長度必須小於 {{2}}。
|
|
99
|
+
accountUpdatedMessage=您的帳號資訊已更新。
|
|
100
|
+
shareError=由於以下錯誤無法共享資源 :{{error}}
|
|
101
|
+
logo=Logo
|
|
102
|
+
password-help-text=透過您的密碼進行登入。
|
|
103
|
+
deleteAccount=刪除帳號
|
|
104
|
+
permissionRequest=權限請求 - {{name}}
|
|
105
|
+
add=新增
|
|
106
|
+
error-invalid-value=「{{0}}」包含錯誤的數值。
|
|
107
|
+
somethingWentWrong=歐喔!有東西壞掉了
|
|
108
|
+
rolesScope=如果未定義角色範圍映射,則允許每個使用者使用此用戶端範圍。 如果定義了角色範圍映射,則使用者必須是至少其中一個角色的成員。
|
|
109
|
+
unShareError=由於以下原因無法取消共享資源:{{error}}
|
|
110
|
+
ipAddress=IP 位址
|
|
111
|
+
tryAgain=請重試
|
|
112
|
+
resourceName=資源名稱
|
|
113
|
+
unlinkedEmpty=沒有取消連結的提供者
|
|
114
|
+
done=已完成
|
|
115
|
+
basic-authentication=基本認證
|
|
116
|
+
socialLogin=社群登入
|
|
117
|
+
notInUse=尚未被使用
|
|
118
|
+
unShareAllConfirm=您確定要完全刪除所有共享嗎?
|
|
119
|
+
firstName=名字
|
|
120
|
+
name=應用名稱
|
|
121
|
+
clientTypeHelp=資源的類型。 它可用於將相同類型的不同資源實例分組。
|
|
122
|
+
unknownUser=未知使用者
|
|
123
|
+
offlineAccess=離線存取權
|
|
124
|
+
password-display-name=密碼
|
|
125
|
+
expires=過期時間
|
|
126
|
+
noGroups=沒有群組
|
|
127
|
+
notSetUp=尚未設定 {{name}}。
|
|
128
|
+
error-invalid-number=「{{0}}」不是一個合法的數字。
|
|
129
|
+
link=連結帳號
|
|
130
|
+
shareTheResource=共享資源 - {{name}}
|
|
131
|
+
description=描述
|
|
132
|
+
update=更新
|
|
133
|
+
choose=請選擇...
|
|
134
|
+
signedInDevices=已登入的裝置
|
|
135
|
+
delete=刪除
|
|
136
|
+
missingPasswordMessage=「{{0}}」:請設定密碼。
|
|
137
|
+
otp-help-text=輸入 OTP 驗證碼。
|
|
138
|
+
groupsListColumnsNames=群組清單列名稱
|
|
139
|
+
error-invalid-uri-scheme=「{{0}}」包含無效的 URL 協定。
|
|
140
|
+
error-user-attribute-read-only={{0}} 欄位為唯讀。
|
|
141
|
+
general=一般設定
|
|
142
|
+
error-invalid-date=「{{0}}」是無效的日期。
|
|
143
|
+
missingEmailMessage=「{{0}}」:請設定電子信箱。
|
|
144
|
+
accountUpdatedError=由於驗證錯誤而無法更新帳戶
|
|
145
|
+
unLinkError=由於以下原因無法解除連結:{{error}}
|
|
146
|
+
applicationsIntroMessage=查看有權存取您帳號的應用程式
|
|
147
|
+
error-invalid-length=「{{0}}」的長度必須在 {{1}} 和 {{2}} 之間。
|
|
148
|
+
missingLastNameMessage=「{{0}}」:請設定姓氏。
|
|
149
|
+
errorSignOutMessage=由於以下原因無法登出:{{error}}
|
|
150
|
+
linkedLoginProviders=已連結帳號
|
|
151
|
+
inUse=使用中
|
|
152
|
+
client=應用程式
|
|
153
|
+
error-invalid-uri=「{{0}}」是無效的 URL。
|
|
154
|
+
systemDefined=系統定義
|
|
155
|
+
hasAccessTo=有權存取
|
|
156
|
+
internalApp=內部應用
|
|
157
|
+
updateError=由於以下原因無法更新資源:{{error}}
|
|
158
|
+
accessGrantedOn=授權授予時間:
|
|
159
|
+
editTheResource=編輯資源 - {{name}}
|
|
160
|
+
permissionRequests=權限請求
|
|
161
|
+
shareSuccess=資源已成功共享。
|
|
162
|
+
missingUsernameMessage={{0}}:請設定使用者名稱。
|
|
163
|
+
aliasHelp=設定的名字
|
|
164
|
+
fullName={{givenName}} {{familyName}}
|
|
165
|
+
groups=群組
|
|
166
|
+
resources=資源
|
|
167
|
+
resourceIntroMessage=在團隊成員之間分享您的資源
|
|
168
|
+
unLink=取消連結帳號
|
|
169
|
+
errorRemovedMessage=由於以下原因無法移除 {{userLabel}} :{{error}}
|
|
170
|
+
termsOfService=服務條款
|
|
171
|
+
jumpToSection=快速導覽
|
|
172
|
+
linkError=由於以下原因無法連結:{{error}}
|
|
173
|
+
requestor=請求來源
|
|
174
|
+
shareWith=共享給
|
|
175
|
+
updateCredAriaLabel=更新密碼
|
|
176
|
+
error-pattern-no-match=「{{0}}」不符合設定的格式。
|
|
177
|
+
application=應用程式
|
|
178
|
+
unlinkedLoginProviders=取消連結帳號
|
|
179
|
+
applicationDetails={{clientId}} 應用程式詳細資訊
|
|
180
|
+
successRemovedMessage=已移除 {{userLabel}}。
|
|
181
|
+
deleteAccountWarning=這是不可恢復的。 您的所有資料將永久銷毀且無法恢復。
|
|
182
|
+
resourceSharedWith_other=資源已與 <0>{{username}}</0> 和 <1>{{other}}</1> 個其他使用者共用
|
|
183
|
+
error-person-name-invalid-character=「{{0}}」包含無效字元。
|
|
184
|
+
user=使用者
|
|
185
|
+
shareUser=新增使用者以共享您的資源
|
|
186
|
+
unLinkSuccess=成功解除帳號連結
|
|
187
|
+
applications=應用程式列表
|
|
188
|
+
sharedWithMe=與我共享
|
|
189
|
+
username=使用者名稱
|
|
190
|
+
webauthn-display-name=通行金鑰
|
|
191
|
+
webauthn-help-text=使用您的通行金鑰進行登入。
|
|
192
|
+
webauthn-passwordless-display-name=通行金鑰
|
|
193
|
+
webauthn-passwordless-help-text=使用您的通行金鑰進行免密碼登入。
|
|
194
|
+
passwordless=免密碼登入
|
|
195
|
+
error-invalid-multivalued-size=屬性 {{0}} 必須至少有 {{1}} 且最多 {{2}} 個值。
|
|
196
|
+
recovery-authn-code=我的復原驗證碼
|
|
197
|
+
recovery-authn-codes-display-name=復原驗證碼
|
|
198
|
+
recovery-authn-codes-help-text=如果您的其他 2FA 驗證方式無法使用,這些驗證碼可以讓您重新取得存取權限。
|
|
199
|
+
recovery-codes-number-used={{0}} 已使用的復原驗證碼
|
|
200
|
+
recovery-codes-number-remaining={{0}} 剩餘的復原驗證碼
|
|
201
|
+
recovery-codes-generate-new-codes=產生新的驗證碼來確保能存取您的帳號
|
|
202
|
+
oid4vci=可驗證憑證
|
|
203
|
+
verifiableCredentialsTitle=可驗證憑證
|
|
204
|
+
verifiableCredentialsDescription=選擇要存到錢包的憑證。
|
|
205
|
+
verifiableCredentialsIssuerAlert=無法獲取簽發者資訊。
|
|
206
|
+
verifiableCredentialsConfigAlert=無法獲取憑證設定。
|
|
207
|
+
verifiableCredentialsOfferAlert=無法獲取憑證發行要約。
|
|
208
|
+
verifiableCredentialsSelectionDefault=選擇一個憑證設定。
|
|
209
|
+
profileScopeConsentText=使用者個人資料
|
|
210
|
+
emailScopeConsentText=電子郵件地址
|
|
211
|
+
addressScopeConsentText=地址
|
|
212
|
+
phoneScopeConsentText=電話號碼
|
|
213
|
+
offlineAccessScopeConsentText=離線存取
|
|
214
|
+
samlRoleListScopeConsentText=我的角色
|
|
215
|
+
rolesScopeConsentText=使用者角色
|
|
216
|
+
organizations=組織
|
|
217
|
+
organizationDescription=檢視您已加入的組織
|
|
218
|
+
emptyUserOrganizations=沒有組織
|
|
219
|
+
emptyUserOrganizationsInstructions=您尚未加入任何組織。
|
|
220
|
+
searchOrganization=尋找組織
|
|
221
|
+
organizationList=組織清單
|
|
222
|
+
domains=領域
|
|
223
|
+
refresh=重新整理
|
|
224
|
+
termsAndConditionsDeclined=您需要同意使用者條款以繼續
|
|
225
|
+
defaultLocale=選擇...
|
|
226
|
+
webauthn-authenticator-provider=驗證器提供者
|
|
227
|
+
error-non-ascii-local-part-email=電子郵件地址中的域內部分只允許出現 ASCII 字元。
|
|
228
|
+
invalid_request=無效的請求
|
|
229
|
+
unauthorized_client=未授權的應用程式
|
|
230
|
+
access_denied=拒絕存取
|
|
231
|
+
unsupported_response_type=不支援的回應型態
|
|
232
|
+
invalid_scope=無效範圍
|
|
233
|
+
server_error=伺服器錯誤
|
|
234
|
+
temporarily_unavailable=暫時無法使用
|
|
235
|
+
interaction_required=需要交互
|
|
236
|
+
login_required=需要登入
|
|
237
|
+
account_selection_required=需要選擇帳號
|
|
238
|
+
consent_required=需要同意
|
|
239
|
+
invalid_request_uri=無效的 URI 請求
|
|
240
|
+
invalid_request_object=無效的請求物件
|
|
241
|
+
request_not_supported=不支援此請求
|
|
242
|
+
request_uri_not_supported=不支援此請求 URI
|
|
243
|
+
registration_not_supported=不支援註冊
|
|
244
|
+
webauthn-transports=移動媒體
|
|
@@ -55,6 +55,7 @@ export const Oid4Vci = () => {
|
|
|
55
55
|
|
|
56
56
|
useEffect(() => {
|
|
57
57
|
if (initialSelected !== selected && credentialsIssuer !== undefined) {
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
58
59
|
requestVCOffer(context, selectOptions[selected], credentialsIssuer).then(
|
|
59
60
|
(blob) => {
|
|
60
61
|
const reader = new FileReader();
|
|
@@ -109,15 +109,15 @@ export const PermissionRequest = ({
|
|
|
109
109
|
</Td>
|
|
110
110
|
<Td>
|
|
111
111
|
<Button
|
|
112
|
-
onClick={() => {
|
|
113
|
-
approveDeny(shareRequest, true);
|
|
112
|
+
onClick={async () => {
|
|
113
|
+
await approveDeny(shareRequest, true);
|
|
114
114
|
}}
|
|
115
115
|
>
|
|
116
116
|
{t("accept")}
|
|
117
117
|
</Button>
|
|
118
118
|
<Button
|
|
119
|
-
onClick={() => {
|
|
120
|
-
approveDeny(shareRequest);
|
|
119
|
+
onClick={async () => {
|
|
120
|
+
await approveDeny(shareRequest);
|
|
121
121
|
}}
|
|
122
122
|
className="pf-v5-u-ml-sm"
|
|
123
123
|
variant="danger"
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@keycloakify/keycloak-account-ui",
|
|
3
3
|
"main": "index.js",
|
|
4
4
|
"types": "index.d.ts",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "260500.0.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git://github.com/keycloakify/keycloak-account-ui.git"
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"@patternfly/react-core": "^5.4.14",
|
|
24
24
|
"@patternfly/react-icons": "^5.4.2",
|
|
25
25
|
"@patternfly/react-table": "^5.4.16",
|
|
26
|
-
"i18next": "^25.
|
|
26
|
+
"i18next": "^25.7.3",
|
|
27
27
|
"i18next-fetch-backend": "^6.0.0",
|
|
28
|
-
"keycloak-js": "^26.2.
|
|
29
|
-
"lodash-es": "^4.17.
|
|
28
|
+
"keycloak-js": "^26.2.2",
|
|
29
|
+
"lodash-es": "^4.17.22",
|
|
30
30
|
"react": "^18.3.1",
|
|
31
|
-
"react-hook-form": "^7.
|
|
32
|
-
"react-i18next": "^
|
|
33
|
-
"react-router-dom": "^6.30.
|
|
34
|
-
"@keycloakify/keycloak-ui-shared": "~
|
|
31
|
+
"react-hook-form": "^7.70.0",
|
|
32
|
+
"react-i18next": "^16.5.1",
|
|
33
|
+
"react-router-dom": "^6.30.2",
|
|
34
|
+
"@keycloakify/keycloak-ui-shared": "~260500.0.0",
|
|
35
35
|
"@types/lodash-es": "^4.17.12",
|
|
36
36
|
"@types/react": "^18.3.18"
|
|
37
37
|
}
|
|
@@ -93,6 +93,8 @@ export namespace KcContextLike {
|
|
|
93
93
|
* — meaning dark mode is allowed, since the restriction option didn’t exist yet.
|
|
94
94
|
*/
|
|
95
95
|
darkMode?: boolean;
|
|
96
|
+
|
|
97
|
+
referrerName?: string;
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
export type I18nApi = {
|
|
@@ -315,6 +317,8 @@ function init(params: {
|
|
|
315
317
|
const referrerUrl = readQueryParamOrRestoreFromSessionStorage({
|
|
316
318
|
name: "referrer_uri"
|
|
317
319
|
});
|
|
320
|
+
// NOTE: Only to remove from the URL.
|
|
321
|
+
readQueryParamOrRestoreFromSessionStorage({ name: "referrer" });
|
|
318
322
|
|
|
319
323
|
const environment = {
|
|
320
324
|
serverBaseUrl,
|
|
@@ -327,7 +331,10 @@ function init(params: {
|
|
|
327
331
|
logoUrl: referrerUrl === undefined ? "/" : referrerUrl.replace("_hash_", "#"),
|
|
328
332
|
baseUrl: `${kcContext.baseUrl.scheme}:${kcContext.baseUrl.rawSchemeSpecificPart}`,
|
|
329
333
|
locale: kcContext.locale,
|
|
330
|
-
referrerName:
|
|
334
|
+
referrerName: valueOrSessionStoragePersistedValue({
|
|
335
|
+
key: "referrerName",
|
|
336
|
+
value: kcContext.referrerName
|
|
337
|
+
}),
|
|
331
338
|
referrerUrl: referrerUrl ?? "",
|
|
332
339
|
features: {
|
|
333
340
|
isRegistrationEmailAsUsername: kcContext.realm.registrationEmailAsUsername,
|
|
@@ -654,3 +661,17 @@ function readQueryParamOrRestoreFromSessionStorage(params: { name: string }): st
|
|
|
654
661
|
|
|
655
662
|
return sessionStorage.getItem(`${PREFIX}${name}`) ?? undefined;
|
|
656
663
|
}
|
|
664
|
+
|
|
665
|
+
function valueOrSessionStoragePersistedValue(params: {
|
|
666
|
+
key: string;
|
|
667
|
+
value: string | undefined;
|
|
668
|
+
}): string | undefined {
|
|
669
|
+
const { key, value } = params;
|
|
670
|
+
|
|
671
|
+
if (value !== undefined) {
|
|
672
|
+
sessionStorage.setItem(key, value);
|
|
673
|
+
return value;
|
|
674
|
+
} else {
|
|
675
|
+
return sessionStorage.getItem(key) ?? undefined;
|
|
676
|
+
}
|
|
677
|
+
}
|
package/src/zKcContextLike.ts
CHANGED
|
@@ -30,7 +30,8 @@ const zKcContextLikeCommon = (() => {
|
|
|
30
30
|
updateEmailActionEnabled: z.boolean(),
|
|
31
31
|
isViewOrganizationsEnabled: z.boolean().optional(),
|
|
32
32
|
properties: z.record(z.string(), z.union([z.string(), z.undefined()])),
|
|
33
|
-
darkMode: z.boolean().optional()
|
|
33
|
+
darkMode: z.boolean().optional(),
|
|
34
|
+
referrerName: z.string().optional()
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
assert<Equals<z.infer<typeof zTargetType>, TargetType>>();
|