Skip to content
Snippets Groups Projects
Commit dcfba2bc authored by Larbi Gharib's avatar Larbi Gharib
Browse files

Add tool tips permissions

Change-Id: I2b7d29c987af73ce4521f36e002fe87303a51161
parent db8ff1a3
No related branches found
No related tags found
No related merge requests found
......@@ -147,8 +147,6 @@
"search_blueprints": "Search blueprints",
"no_blueprints_found": "No blueprints found",
"no_blueprint_name": "No blueprint name",
"no_description": "No description",
"no_users_count": "No users count",
"add_contact": "Add contact…",
"remove_contact": "Remove contact",
"are_you_sure_you_want_to_remove": "Are you sure you want to remove",
......@@ -239,5 +237,13 @@
"select_blueprint": "Select a blueprint",
"add_moderator_to_blueprint": "Add moderator to blueprint ...",
"add_moderator_to": "Add moderator to",
"remove_moderator": "Remove moderator"
"remove_moderator": "Remove moderator",
"rendezvous": "Rendezvous",
"standalone": "Standalone",
"allow_incoming_calls_from_unknown_allow_video_calls_info": "If this option is disabled, only audio calls will be allowed.",
"allow_incoming_calls_from_unknown_contacts_info": "If this option is disabled, only contacts from your list will be allowed to contact you.",
"auto_answer_calls_info": "If this option is enabled, incomming calls will be automaticly answered. This option can be usefull if you want for example to monitor your house or a particular room when you are away from home.",
"local_lan_info": "If this option is enabled, you will be able to communicate with connected contacts on you local lan, even if your lan is disconnected from internet.",
"rendezvous_info": "If this option is enabled, incomming calls will automaticly be added to a conference room.",
"rendezvous_moderators_info": "Moderators are people allowed to manage rendezvous points and conferences even if they are not hosted on their devices."
}
......@@ -147,8 +147,6 @@
"search_blueprints": "Rechercher un gabarit",
"no_blueprints_found": "Aucun gabarit trouvé",
"no_blueprint_name": "Aucun nom disponible",
"no_description": "Aucune description disponible",
"no_users_count": "Aucun utilisateur",
"add_contact": "Ajouter un contact...",
"remove_contact": "Supprimer le contact",
"are_you_sure_you_want_to_remove": "Êtes-vous certain de vouloir supprimer",
......@@ -239,5 +237,13 @@
"select_blueprint": "Select a blueprint",
"add_moderator_to_blueprint": "Add moderator to blueprint ...",
"add_moderator_to": "Add moderator to",
"remove_moderator": "Remove moderator"
"remove_moderator": "Remove moderator",
"rendezvous": "Rendezvous",
"standalone": "Standalone",
"allow_incoming_calls_from_unknown_allow_video_calls_info": "If this option is disabled, only audio calls will be allowed.",
"allow_incoming_calls_from_unknown_contacts_info": "If this option is disabled, only contacts from your list will be allowed to contact you.",
"auto_answer_calls_info": "If this option is enabled, incomming calls will be automaticly answered. This option can be usefull if you want for example to monitor your house or a particular room when you are away from home.",
"local_lan_info": "If this option is enabled, you will be able to communicate with connected contacts on you local lan, even if your lan is disconnected from internet.",
"rendezvous_info": "If this option is enabled, incomming calls will automaticly be added to a conference room.",
"rendezvous_moderators_info": "Moderators are people allowed to manage rendezvous points and conferences even if they are not hosted on their devices."
}
......@@ -15,7 +15,7 @@ export default function CustomPopupState(props) {
<PopupState variant="popover" popupId="demo-popup-popover">
{(popupState) => (
<div>
<InfoIcon color="primary" fontSize="small" {...bindTrigger(popupState)} />
<InfoIcon color="disabled" fontSize="small" {...bindTrigger(popupState)} />
<Popover
{...bindPopover(popupState)}
anchorOrigin={{
......
......@@ -15,6 +15,7 @@ import CardIcon from "components/Card/CardIcon.js";
import CardBody from "components/Card/CardBody.js";
import FormGroup from "@material-ui/core/FormGroup";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import FormLabel from "@material-ui/core/FormLabel";
import Button from "components/CustomButtons/Button.js";
import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';
......@@ -54,6 +55,10 @@ import i18next from "i18next";
import auth from "auth.js";
import CustomPopupState from "../../components/CustomPopupState/CustomPopupState";
import Switch from "@material-ui/core/Switch";
const styles = (theme) => ({
...dashboardStyle,
root: {
......@@ -353,6 +358,9 @@ export default function EditBlueprintPermissions(props) {
<div className={classes.root}>
<Grid container spacing={5}>
<Grid item xs={12} sm={12} md={12}>
<Grid container spacing={2}>
<Grid item xs={12} sm={12} md={12}>
<FormLabel component="legend">Call parameters</FormLabel>
<FormGroup row>
<FormControlLabel
control={
......@@ -371,6 +379,7 @@ export default function EditBlueprintPermissions(props) {
}
label={i18next.t("allow_video_calls", "Allow video calls")}
/>
<CustomPopupState message={i18next.t("allow_incoming_calls_from_unknown_allow_video_calls_info", "If this option is disabled, only audio calls will be allowed.")} />
</FormGroup>
<FormGroup row>
<FormControlLabel
......@@ -390,6 +399,7 @@ export default function EditBlueprintPermissions(props) {
}
label={i18next.t("allow_incoming_calls_from_unknown_contacts", "Allow incoming calls from unknown contacts")}
/>
<CustomPopupState message={i18next.t("allow_incoming_calls_from_unknown_contacts_info", "If this option is disabled, only contacts from your list will be allowed to contact you.")} />
</FormGroup>
<FormGroup row>
<FormControlLabel
......@@ -409,7 +419,11 @@ export default function EditBlueprintPermissions(props) {
}
label={i18next.t("auto_answer_calss", "Auto answer calls")}
/>
<CustomPopupState message={i18next.t("auto_answer_calls_info", "If this option is enabled, incomming calls will be automaticly answered. This option can be usefull if you want for example to monitor your house or a particular room when you are away from home.")} />
</FormGroup>
</Grid>
<Grid item xs={12} sm={12} md={12}>
<FormLabel component="legend">Local LAN</FormLabel>
<FormGroup row>
<FormControlLabel
control={
......@@ -428,11 +442,26 @@ export default function EditBlueprintPermissions(props) {
}
label={i18next.t("allow_use_of_jami_in_local_lan", "Allow Jami usage on the local LAN")}
/>
<CustomPopupState message={i18next.t("local_lan_info", "If this option is enabled, you will be able to communicate with connected contacts on you local lan, even if your lan is disconnected from internet.")} />
</FormGroup>
<FormGroup row>
<FormControlLabel
control={
<Checkbox
</Grid>
<Grid item xs={12} sm={12} md={12}>
</Grid>
</Grid>
</Grid>
</Grid>
</div>
</CardBody>
</Card>
</GridItem>
<GridItem xs={12} sm={12} md={12}>
<h3>Rendezvous mode</h3>
<FormGroup row>
<FormControlLabel
control={
<Switch
checked={rendezVous}
color="primary"
onChange={(e) => {
......@@ -443,19 +472,15 @@ export default function EditBlueprintPermissions(props) {
);
}}
name="rendezVous"
inputProps={{ "aria-label": "secondary checkbox" }}
/>
}
label={i18next.t("convert_your_account_into_a_rendezvous_point", "Activate this account into rendezvous mode")}
/>
</FormGroup>
</Grid>
</Grid>
</div>
</CardBody>
</Card>
</GridItem>
<GridItem xs={12} sm={12} md={12}>
<Button color="primary" onClick={() => {setOpenDrawer(true)}}><AddCircleOutlineIcon /> {i18next.t("add_moderator_to", "Add moderator to")} {props.blueprintName}</Button>
}
label={i18next.t("convert_your_account_into_a_rendezvous_point", "Activate this account into rendezvous mode")}
/>
<CustomPopupState message={i18next.t("rendezvous_info", "If this option is enabled, incomming calls will automaticly be added to a conference room.")}/>
<Button disabled={!rendezVous} color="primary" onClick={() => {setOpenDrawer(true)}}><AddCircleOutlineIcon /> {i18next.t("add_moderator_to", "Add moderator to")} {props.blueprintName}</Button>
<CustomPopupState message={i18next.t("rendezvous_moderators_info", "Moderators are people allowed to manage rendezvous points and conferences even if they are not hosted on their devices.")} />
</FormGroup>
<Table className={classes.table}>
<TableHead>
<TableRow>
......@@ -492,7 +517,7 @@ export default function EditBlueprintPermissions(props) {
<Link to={`/user/${user.username}`}>{user.lastName}</Link>
</TableCell>
<TableCell align="right" className={classes.tableActions}>
<Button color="primary" onClick={() => removeModeratorFromBlueprint(user)}>{i18next.t("remove_moderator", "Remove moderator")}</Button>
<Button disabled={!rendezVous} color="primary" onClick={() => removeModeratorFromBlueprint(user)}>{i18next.t("remove_moderator", "Remove moderator")}</Button>
</TableCell>
</TableRow>
)}
......
......@@ -18,6 +18,7 @@ import Input from "@material-ui/core/Input";
import InputAdornment from "@material-ui/core/InputAdornment";
import GroupIcon from "@material-ui/icons/Group";
import PersonIcon from '@material-ui/icons/Person';
import Search from "@material-ui/icons/Search";
import DeleteOutlineIcon from "@material-ui/icons/DeleteOutline";
import InfoIcon from "@material-ui/icons/Info";
......@@ -379,17 +380,16 @@ export default function Blueprints() {
? blueprint.name
: i18next.t("no_blueprint_name", "No blueprint name")}
</h3>
<strong>Description:</strong>
<p>{i18next.t("no_description", "No description")}</p>
<ul>
<li>
<GroupIcon
{JSON.parse(blueprint.policyData).rendezVous == true ? (<p><GroupIcon
fontSize="small"
style={{ marginRight: "10px" }}
/>{" "}
{blueprint.usersCount
? blueprint.usersCount + " user(s)"
: i18next.t("no_users_count", "No users count")}
/>{i18next.t("rendezvous", "Rendezvous")}</p>) : <p><PersonIcon
fontSize="small"
style={{ marginRight: "10px" }}
/>{i18next.t("standalone", "Standalone")}</p>
}
</li>
</ul>
</CardBody>
......
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