feat: add auto reply (#49)

* feat: add auto reply

* feat: add auto reply

* feat: update readme

* feat: add auto reply
This commit is contained in:
Dream Hunter
2023-12-18 21:41:15 +08:00
committed by GitHub
parent af78248145
commit 95ae65dc03
14 changed files with 349 additions and 33 deletions

View File

@@ -2,7 +2,8 @@ import { useGlobalState } from '../store'
import axios from 'axios'
const API_BASE = import.meta.env.VITE_API_BASE || "";
const { loading, auth, jwt, openSettings, showAuth, adminAuth, showAdminAuth } = useGlobalState();
const { loading, auth, jwt, settings, openSettings } = useGlobalState();
const { showAuth, adminAuth, showAdminAuth } = useGlobalState();
const instance = axios.create({
baseURL: API_BASE,
@@ -65,9 +66,11 @@ const getSettings = async () => {
if (typeof jwt.value != 'string' || jwt.value.trim() === '' || jwt.value === 'undefined') {
return "";
}
loading.value = true;
const res = await apiFetch("/api/settings");;
return res["address"];
settings.value = {
address: res["address"],
auto_reply: res["auto_reply"]
};
}
const adminShowPassword = async (id) => {