chore: fixs tweaks and update texts
This commit is contained in:
@@ -164,7 +164,9 @@ export default function ManageMembers({ cid = null }) {
|
||||
</div>
|
||||
</div>
|
||||
<div className="right">
|
||||
<span className="role">{is_admin ? "Admin" : "User"}</span>
|
||||
<span className="role">
|
||||
{is_admin ? "Admin" : cid ? "Member" : "User"}
|
||||
</span>
|
||||
<Tippy
|
||||
duration={0}
|
||||
delay={[0, 0]}
|
||||
|
||||
@@ -51,9 +51,7 @@ export default function Prompt({ handleInstall, closePrompt }) {
|
||||
<IconClose className="close" onClick={closePrompt} />
|
||||
<div className="tip">
|
||||
<h2 className="title">Install web app on desktop?</h2>
|
||||
<p className="desc">
|
||||
Put it on your desktop for quick access to apps.
|
||||
</p>
|
||||
<p className="desc">Add to desktop for quick access to this app.</p>
|
||||
</div>
|
||||
<div className="btns">
|
||||
<Button className="ghost cancel small" onClick={closePrompt}>
|
||||
|
||||
@@ -5,7 +5,7 @@ import Prompt from "./Prompt";
|
||||
import usePrompt from "./usePrompt";
|
||||
|
||||
export default function Manifest() {
|
||||
const { setCanneled } = usePrompt();
|
||||
const { setCanneled, prompted } = usePrompt();
|
||||
const deferredPromptRef = useRef(null);
|
||||
const [popup, setPopup] = useState(false);
|
||||
// const { data, isSuccess } = useGetServerQuery();
|
||||
@@ -62,6 +62,6 @@ export default function Manifest() {
|
||||
setCanneled();
|
||||
setPopup(false);
|
||||
};
|
||||
if (!popup) return null;
|
||||
if (!popup || prompted) return null;
|
||||
return <Prompt handleInstall={handleInstall} closePrompt={handleClose} />;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// import React from "react";
|
||||
const Key = `RUSTCHAT_PWA_PROMPT`;
|
||||
import { KEY_PWA_INSTALLED } from "../../../app/config";
|
||||
export default function usePrompt() {
|
||||
const resetPrompt = () => {
|
||||
localStorage.removeItem(Key);
|
||||
localStorage.removeItem(KEY_PWA_INSTALLED);
|
||||
};
|
||||
const setPrompt = () => {
|
||||
localStorage.setItem(Key, true);
|
||||
localStorage.setItem(KEY_PWA_INSTALLED, true);
|
||||
};
|
||||
|
||||
return {
|
||||
setCanneled: setPrompt,
|
||||
prompted: !!localStorage.getItem(Key),
|
||||
prompted: !!localStorage.getItem(KEY_PWA_INSTALLED),
|
||||
resetPrompt,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -100,7 +100,9 @@ function Message({
|
||||
onContextMenu={handleContextMenuEvent}
|
||||
data-msg-mid={mid}
|
||||
ref={inviewRef}
|
||||
className={`message ${readOnly ? "readonly" : ""}`}
|
||||
className={`message ${readOnly ? "readonly" : ""} ${
|
||||
contextMenuVisible ? "contextVisible" : ""
|
||||
} `}
|
||||
>
|
||||
<Tippy
|
||||
disabled={readOnly}
|
||||
|
||||
@@ -16,6 +16,7 @@ const StyledMsg = styled.div`
|
||||
background: #f5f6f7;
|
||||
}
|
||||
&:hover,
|
||||
&.contextVisible,
|
||||
&.preview {
|
||||
content-visibility: inherit;
|
||||
contain-intrinsic-size: inherit;
|
||||
|
||||
@@ -15,7 +15,7 @@ import ContactsModal from "./ContactsModal";
|
||||
const StyledWrapper = styled.div`
|
||||
position: relative;
|
||||
min-height: 56px;
|
||||
padding: 0 10px 0 16px;
|
||||
padding: 6px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -12,8 +12,9 @@ import ContactsModal from "./ContactsModal";
|
||||
import { NavLink, useLocation } from "react-router-dom";
|
||||
|
||||
const StyledWrapper = styled.div`
|
||||
min-height: 56px;
|
||||
position: relative;
|
||||
padding: 15px 15px 15px 20px;
|
||||
padding: 6px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user