mirror of
https://github.com/coaidev/coai.git
synced 2025-05-19 21:10:18 +09:00
feat: add custom mask login tooltip
This commit is contained in:
parent
7e421f7cec
commit
e8718d3386
@ -62,6 +62,7 @@ import EditorProvider from "@/components/EditorProvider.tsx";
|
||||
import { deleteMask, saveMask } from "@/api/mask.ts";
|
||||
import { toastState } from "@/api/common.ts";
|
||||
import { useToast } from "@/components/ui/use-toast.ts";
|
||||
import { selectAuthenticated } from "@/store/auth.ts";
|
||||
|
||||
function getEmojiSource(emoji: string): string {
|
||||
return `https://cdn.staticfile.net/emoji-datasource-apple/15.0.1/img/apple/64/${emoji}.png`;
|
||||
@ -265,6 +266,8 @@ function CustomMaskDialog({
|
||||
}: CustomMaskDialogProps) {
|
||||
const { t } = useTranslation();
|
||||
const { toast } = useToast();
|
||||
|
||||
const auth = useSelector(selectAuthenticated);
|
||||
const theme = useSelector(themeSelector);
|
||||
|
||||
const [picker, setPicker] = useState(false);
|
||||
@ -469,8 +472,8 @@ function CustomMaskDialog({
|
||||
</DrawerDescription>
|
||||
</DrawerHeader>
|
||||
<DrawerFooter>
|
||||
<Button loading={true} onClick={post}>
|
||||
{t("submit")}
|
||||
<Button loading={true} onClick={post} disabled={!auth}>
|
||||
{auth ? t("submit") : t("login-require")}
|
||||
</Button>
|
||||
<DrawerClose asChild>
|
||||
<Button variant="outline">{t("cancel")}</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user