chore: solve merge from main
This commit is contained in:
@@ -144,7 +144,7 @@ const Session: FC<IProps> = ({
|
||||
<div className="flex items-center justify-between">
|
||||
<span className={clsx("text-xs text-gray-500 dark:text-gray-400 truncate", unreads > 0 ? `w-36` : ``)}>{renderPreviewMessage(previewMsg)}</span>
|
||||
{unreads > 0 && !isCurrentPath && (
|
||||
<strong className={clsx(`text-white h-5 min-w-[20px] bg-primary-400 font-bold text-[10px] rounded-[10px] flex-center`, unreads > 99 && 'w-1.5 !h-1.5 p-0 min-w-[unset]', muted && "bg-gray-500")}>
|
||||
<strong className={clsx(`text-white px-1.5 py-[3px] bg-primary-400 font-bold text-[10px] leading-[10px] rounded-[10px]`, unreads > 99 && 'w-1.5 !h-1.5 p-0 min-w-[unset]', muted && "bg-gray-500")}>
|
||||
{unreads > 99 ? null : unreads}
|
||||
</strong>
|
||||
)}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { NavLink, useSearchParams } from 'react-router-dom';
|
||||
import { isMobile } from '../../common/utils';
|
||||
|
||||
export default function SignInLink({ token }: { token?: string }) {
|
||||
const { t } = useTranslation("auth");
|
||||
let [searchParams] = useSearchParams(new URLSearchParams(location.search));
|
||||
const ctx = searchParams.get("ctx") ?? "app";
|
||||
useEffect(() => {
|
||||
// 移动端访问,则跳转
|
||||
if (isMobile() && !!token) {
|
||||
location.href = `https://join.voce.chat/download?link=${encodeURIComponent(`${location.origin}&magic_token=${token}`)}`;
|
||||
if (isMobile() && !!token && ctx == "app") {
|
||||
location.href = `https://join.voce.chat/download?link=${encodeURIComponent(`${location.origin}?magic_token=${token}`)}`;
|
||||
}
|
||||
}, [token]);
|
||||
}, [token, ctx]);
|
||||
|
||||
return (
|
||||
<div className="flex gap-1 mt-7 text-sm text-slate-500 dark:text-gray-100 justify-center">
|
||||
|
||||
@@ -27,7 +27,7 @@ const Item = ({ label, data, foldable = false, ...rest }: ItemProps) => {
|
||||
export default function License() {
|
||||
const { t, i18n } = useTranslation("setting");
|
||||
// const { t: ct } = useTranslation();
|
||||
const { license: licenseInfo, reachLimit, upsertLicense, upserting, upserted } = useLicense();
|
||||
const { license: licenseInfo, reachLimit, upsertLicense, upserting, upserted } = useLicense(true);
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
const [updateVisible, setUpdateVisible] = useState(false);
|
||||
const [base58Fold, setBase58Fold] = useState(true);
|
||||
|
||||
@@ -14,7 +14,6 @@ import Version from "../../common/component/Version";
|
||||
import ConfigAgora from "./config/Agora";
|
||||
import { useAppSelector } from "../../app/store";
|
||||
import ServerVersionChecker from "../../common/component/ServerVersionChecker";
|
||||
import useLicense from "../../common/hook/useLicense";
|
||||
|
||||
const navs = [
|
||||
{
|
||||
@@ -98,10 +97,9 @@ const navs = [
|
||||
];
|
||||
|
||||
const useNavs = () => {
|
||||
const { upgraded } = useLicense();
|
||||
const { t } = useTranslation("setting");
|
||||
const loginUser = useAppSelector((store) => {
|
||||
return store.authData.user;
|
||||
const { loginUser, upgraded } = useAppSelector((store) => {
|
||||
return { loginUser: store.authData.user, upgraded: store.server.upgraded };
|
||||
});
|
||||
const transformedNavs = navs.map(n => {
|
||||
const { name, items, ...rest } = n;
|
||||
|
||||
Reference in New Issue
Block a user