This commit is contained in:
Quan HL
2023-10-25 05:42:02 +07:00
parent 941fdb9e88
commit acd8fa9d45
6 changed files with 15 additions and 9 deletions

View File

@@ -14,7 +14,6 @@ import {
PhoneIncoming,
PhoneOutgoing,
Save,
Star,
Trash2,
} from "react-feather";
import { CallHistory, SipCallDirection } from "src/common/types";
@@ -25,12 +24,14 @@ type CallHistoryItemProbs = {
call: CallHistory;
onDataChange?: (call: CallHistory) => void;
onCallNumber?: (number: string, name: string | undefined) => void;
isSaved?: boolean;
};
export const CallHistoryItem = ({
call,
onDataChange,
onCallNumber,
isSaved,
}: CallHistoryItemProbs) => {
const [callEnable, setCallEnable] = useState(false);
const getDirectionIcon = (direction: SipCallDirection) => {
@@ -84,10 +85,14 @@ export const CallHistoryItem = ({
{dayjs(call.timeStamp).format("MMM D, hh:mm A")}
</Text>
</VStack>
<Tooltip label={call.isSaved ? "Remove" : "Save"}>
<Tooltip
label={
isSaved && call.isSaved ? "Delete" : call.isSaved ? "Unsaved" : "Save"
}
>
<IconButton
aria-label="save recents"
icon={call.isSaved ? <Trash2 /> : <Save />}
icon={isSaved && call.isSaved ? <Trash2 /> : <Save />}
onClick={() => {
const settings = getSettings();
if (settings.sipUsername) {

View File

@@ -53,6 +53,7 @@ export const Recents = ({
>
{callHistories.map((c) => (
<CallHistoryItem
isSaved={isSaved}
call={c}
onCallNumber={onCallNumber}
onDataChange={onDataChange}

View File

@@ -443,7 +443,7 @@ export const Phone = ({
<HStack spacing={2} align="start" w="full">
<IconButtonMenu
icon={<Users />}
tooltip="Call a user"
tooltip="Call an online user"
noResultLabel="No registered users"
onClick={(_, value) => {
setInputNumber(value);

View File

@@ -127,10 +127,10 @@ export const AdvancedSettings = () => {
Save
</Button>
<HStack w="full">
<HStack spacing={1}>
{/* <HStack spacing={1}>
<Image src={InfoIcon} w="30px" h="30px" />
<Text fontSize="14px">Get help</Text>
</HStack>
</HStack> */}
<Spacer />
<HStack spacing={1}>

View File

@@ -141,10 +141,10 @@ export const BasicSettings = () => {
Save
</Button>
<HStack w="full">
<HStack spacing={1}>
{/* <HStack spacing={1}>
<Image src={InfoIcon} w="30px" h="30px" />
<Text fontSize="14px">Get help</Text>
</HStack>
</HStack> */}
<Spacer />
<HStack spacing={1}>

View File

@@ -184,7 +184,7 @@ function getHtmlPlugins(chunks) {
return chunks.map(
(chunk) =>
new HTMLPlugin({
title: "Jambonz Webrtc Client",
title: "Jambonz Webphone",
filename: `${chunk}.html`,
chunks: [chunk],
})