Skip to content

Commit

Permalink
Ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed May 26, 2023
1 parent 5740410 commit 38cc5d0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
8 changes: 5 additions & 3 deletions frontend/src/components/Audio/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useRef, useEffect, useState } from "react";

const LS_NAME = 'audioMessageRate';

export default function({url}) {
const Audio = ({url}) => {
const audioRef = useRef(null);
const [audioRate, setAudioRate] = useState( parseFloat(localStorage.getItem(LS_NAME) || "1") );
const [showButtonRate, setShowButtonRate] = useState(false);
Expand Down Expand Up @@ -51,9 +51,11 @@ export default function({url}) {
return (
<>
<audio ref={audioRef} controls>
<source src={url} type="audio/ogg"></source>
<source src={url} type="audio/mp3"></source>
</audio>
{showButtonRate && <Button style={{marginLeft: "5px", marginTop: "-45px"}} onClick={toogleRate}>{audioRate}x</Button>}
</>
);
}
}

export default Audio;
12 changes: 8 additions & 4 deletions frontend/src/components/NotificationsPopOver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ const NotificationsPopOver = () => {
const UserQueues = user.queues.findIndex((users) => (users.id === data.ticket.queueId));
if (
(data.action === "create" &&
!data.message.read &&
(data.ticket.userId === user?.id || !data.ticket.userId)
&& (UserQueues !== -1 || !data.ticket.queueId))
!data.message.read &&
(data.ticket.userId === user?.id || !data.ticket.userId)
&& (UserQueues !== -1 || !data.ticket.queueId))
) {
setNotifications(prevState => {
const ticketIndex = prevState.findIndex(t => t.id === data.ticket.id);
Expand Down Expand Up @@ -196,7 +196,11 @@ const NotificationsPopOver = () => {
aria-label="Open Notifications"
color="inherit"
>
<Badge badgeContent={notifications.length} color="secondary" overlap="rectangular" >
<Badge
badgeContent={notifications.length}
color="secondary"
overlap="rectangular"
max={9999} >
<ChatIcon />
</Badge>
</IconButton>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/TicketListItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ const TicketListItem = ({ ticket, userId }) => {
className={classes.newMessagesCount}
badgeContent={ticket.unreadMessages}
overlap="rectangular"
max={9999}
classes={{
badge: classes.badgeStyle,
}}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/TicketsManager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ const TicketsManager = () => {
className={classes.badge}
badgeContent={openCount}
overlap="rectangular"
max={9999}
color="secondary"
>
{i18n.t("tickets.tabs.open.title")}
Expand All @@ -203,6 +204,7 @@ const TicketsManager = () => {
className={classes.badge}
badgeContent={pendingCount}
overlap="rectangular"
max={9999}
color="secondary"
>
{i18n.t("ticketsList.pendingHeader")}
Expand Down

0 comments on commit 38cc5d0

Please sign in to comment.