Compare commits

...

9 Commits

6 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,15 @@
### **0.3.4** (2021-03-22)
- Bugfix: Import assets from CSS
### **0.3.3** (2021-03-22)
- Fix submit not receving correct text
### **0.3.2** (2021-03-21)
- Fix broken previous release
### **0.3.1** (2021-03-21) ### **0.3.1** (2021-03-21)
- kcHeaderClass can be updated after initial mount - kcHeaderClass can be updated after initial mount

View File

@ -1,6 +1,6 @@
{ {
"name": "keycloakify", "name": "keycloakify",
"version": "0.3.1", "version": "0.3.4",
"description": "Keycloak theme generator for Reacts app", "description": "Keycloak theme generator for Reacts app",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -32,7 +32,7 @@ export function replaceImportFromStaticInCssCode(
const cssGlobalsToDefine: Record<string, string> = {}; const cssGlobalsToDefine: Record<string, string> = {};
new Set(cssCode.match(/(url\(\/[^)]+\))/g) ?? []) new Set(cssCode.match(/url\(\/[^)]+\)[^;}]*/g) ?? [])
.forEach(match => .forEach(match =>
cssGlobalsToDefine[ cssGlobalsToDefine[
"url" + crypto "url" + crypto
@ -73,12 +73,8 @@ export function generateCssCodeToDefineGlobals(
...Object.keys(cssGlobalsToDefine) ...Object.keys(cssGlobalsToDefine)
.map(cssVariableName => [ .map(cssVariableName => [
`--${cssVariableName}:`, `--${cssVariableName}:`,
[ cssGlobalsToDefine[cssVariableName]
"url(", .replace(/url\(/g, "url(${url.resourcesPath}/build")
"${url.resourcesPath}/build" +
cssGlobalsToDefine[cssVariableName].match(/^url\(([^)]+)\)$/)![1],
")"
].join("")
].join(" ")) ].join(" "))
.map(line => ` ${line};`), .map(line => ` ${line};`),
"}" "}"

View File

@ -66,7 +66,7 @@ export const LoginResetPassword = memo(({ kcContext, ...props }: { kcContext: Kc
props.kcButtonBlockClass, props.kcButtonLargeClass props.kcButtonBlockClass, props.kcButtonLargeClass
)} )}
type="submit" type="submit"
defaultValue={msgStr("doSubmit")} value={msgStr("doSubmit")}
/> />
</div> </div>
</div> </div>

View File

@ -113,7 +113,7 @@ export const Register = memo(({ kcContext, ...props }: { kcContext: KcContext.Re
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}> <div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
<input className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)} type="submit" <input className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)} type="submit"
defaultValue={msgStr("doRegister")} /> value={msgStr("doRegister")} />
</div> </div>
</div> </div>
</form > </form >

View File

@ -27,7 +27,6 @@ export type TemplateProps = {
infoNode?: ReactNode; infoNode?: ReactNode;
} & { kcContext: KcContext.Template; } & KcTemplateProps; } & { kcContext: KcContext.Template; } & KcTemplateProps;
export const Template = memo((props: TemplateProps) => { export const Template = memo((props: TemplateProps) => {
const { const {
@ -137,7 +136,7 @@ export const Template = memo((props: TemplateProps) => {
}; };
}, [props.kcHeaderClass]); }, [props.kcHtmlClass]);
if (!isExtraCssLoaded) { if (!isExtraCssLoaded) {
return null; return null;