Skip to content
Snippets Groups Projects
Commit 7a2ed997 authored by Léo Banno-Cloutier's avatar Léo Banno-Cloutier
Browse files

jams-react-client: minor ui fixes on customization tab

- encodeURI the backgroundUrl to escape space correctly
- Fix minor border issues with JamiIdCard
- Set English as the first language in the LanguagePicker
- Changed the main enable Checkbox to a Switch
- hasTips is now true, to match the default on Jami

Change-Id: I0d611e720efd99ec726f321a2bd77aff237543ca
parent 7baf3052
No related branches found
No related tags found
No related merge requests found
...@@ -138,7 +138,7 @@ export default function CustomUiPreview({ ...@@ -138,7 +138,7 @@ export default function CustomUiPreview({
backgroundColor = "white"; backgroundColor = "white";
} }
if (backgroundUrl) { if (backgroundUrl) {
backgroundUrl = `${url_path}:${url_port}/${backgroundUrl}`; backgroundUrl = encodeURI(`${url_path}:${url_port}/${backgroundUrl}`);
} }
const isCompactDisplay = !hasTitle && !hasDescription && !hasTips; const isCompactDisplay = !hasTitle && !hasDescription && !hasTips;
......
...@@ -21,11 +21,10 @@ const styles = { ...@@ -21,11 +21,10 @@ const styles = {
}, },
logo: { logo: {
position: "absolute", position: "absolute",
left: 0, left: "-1px",
top: 0, top: 0,
backgroundColor: infoColor[0], backgroundColor: infoColor[0],
borderRadius: (props) => borderRadius: "20px 20px 20px 0px",
props.isCompactDisplay ? "20px" : "20px 20px 20px 0px",
padding: "0px 5px 0px 5px", padding: "0px 5px 0px 5px",
}, },
nameplate: { nameplate: {
......
...@@ -32,8 +32,8 @@ export default function LanguagePicker(props) { ...@@ -32,8 +32,8 @@ export default function LanguagePicker(props) {
.then((result) => { .then((result) => {
const response = result.data.map(({ attributes }) => attributes); const response = result.data.map(({ attributes }) => attributes);
let translates_languages = [ let translates_languages = [
...response,
{ code: "en", name: "English" }, { code: "en", name: "English" },
...response,
]; ];
const exists = translates_languages const exists = translates_languages
......
import React, { useState } from "react"; import React, { useState } from "react";
import Checkbox from "@material-ui/core/Checkbox"; import Checkbox from "@material-ui/core/Checkbox";
import Switch from "@material-ui/core/Switch";
import { SketchPicker } from "react-color"; import { SketchPicker } from "react-color";
import FormGroup from "@material-ui/core/FormGroup"; import FormGroup from "@material-ui/core/FormGroup";
import FormControlLabel from "@material-ui/core/FormControlLabel"; import FormControlLabel from "@material-ui/core/FormControlLabel";
...@@ -43,7 +44,7 @@ const IsCustomizationEnabledForm = ({ ...@@ -43,7 +44,7 @@ const IsCustomizationEnabledForm = ({
<FormGroup row> <FormGroup row>
<FormControlLabel <FormControlLabel
control={ control={
<Checkbox <Switch
checked={isCustomizationEnabled} checked={isCustomizationEnabled}
color="primary" color="primary"
onChange={(e) => { onChange={(e) => {
......
...@@ -4,7 +4,7 @@ export const DEFAULT_UI_CUSTOMIZATION = { ...@@ -4,7 +4,7 @@ export const DEFAULT_UI_CUSTOMIZATION = {
title: "", title: "",
hasDescription: true, hasDescription: true,
description: "", description: "",
hasTips: false, hasTips: true,
hasBackground: false, hasBackground: false,
backgroundColor: "", backgroundColor: "",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment