chore: updates

This commit is contained in:
Tristan Yang
2023-05-19 17:38:51 +08:00
parent 7902333eda
commit abe49bcb3c
2 changed files with 40 additions and 40 deletions
+13 -13
View File
@@ -1,14 +1,14 @@
import i18n from '../i18n'; import i18n from "../i18n";
import { Price } from "../types/common"; import { Price } from "../types/common";
let prices: Price[] = [ let prices: Price[] = [
{ {
type: "payment", type: "payment",
limit: 999999, limit: 999999,
pid: "price_1MbF30GGoUDRyc3jwOg30dVQ", pid: "price_1MbF30GGoUDRyc3jwOg30dVQ"
}, },
{ {
type: "booking", type: "booking"
} }
]; ];
const official_dev = `https://dev.voce.chat`; const official_dev = `https://dev.voce.chat`;
@@ -17,9 +17,7 @@ const local_dev = official_dev;
// const local_dev = `http://07333.qicp.vip:3030`; // const local_dev = `http://07333.qicp.vip:3030`;
// const local_dev = `https://im.ttt.td`; // const local_dev = `https://im.ttt.td`;
export const BASE_ORIGIN = process.env.REACT_APP_RELEASE export const BASE_ORIGIN = process.env.REACT_APP_RELEASE ? `${location.origin}` : local_dev;
? `${location.origin}`
: local_dev;
export const IS_OFFICIAL_DEMO = BASE_ORIGIN === official_dev; export const IS_OFFICIAL_DEMO = BASE_ORIGIN === official_dev;
const BASE_URL = `${BASE_ORIGIN}/api`; const BASE_URL = `${BASE_ORIGIN}/api`;
@@ -27,14 +25,16 @@ export const getLicensePriceList = () => {
const ps = prices.map((p, idx) => { const ps = prices.map((p, idx) => {
switch (idx) { switch (idx) {
// pro // pro
case 0: { case 0:
{
p.title = i18n.t("price.pro.title"); p.title = i18n.t("price.pro.title");
p.desc = i18n.t("price.pro.desc"); p.desc = i18n.t("price.pro.desc");
p.price = i18n.t("price.pro.price"); p.price = i18n.t("price.pro.price");
} }
break; break;
// supreme // supreme
case 1: { case 1:
{
p.title = i18n.t("price.supreme.title"); p.title = i18n.t("price.supreme.title");
p.desc = i18n.t("price.supreme.desc"); p.desc = i18n.t("price.supreme.desc");
p.price = i18n.t("price.supreme.price"); p.price = i18n.t("price.supreme.price");
@@ -47,8 +47,8 @@ export const getLicensePriceList = () => {
return p; return p;
}); });
return process.env.NODE_ENV === "development" return process.env.NODE_ENV === "development"
// 开发环境加入两个测试价格 ? // 开发环境加入两个测试价格
? [ [
...ps, ...ps,
{ {
type: "payment", type: "payment",
@@ -65,8 +65,8 @@ export const getLicensePriceList = () => {
pid: "price_1MMNNCGGoUDRyc3jSIGIsb3C", pid: "price_1MMNNCGGoUDRyc3jSIGIsb3C",
desc: "test subscription price", desc: "test subscription price",
type: "subscription", type: "subscription",
sub_dur: "year", //day month year sub_dur: "year" //day month year
}, }
] ]
: ps; : ps;
}; };
@@ -90,7 +90,7 @@ export const MessageTypes = {
markdown: "text/markdown", markdown: "text/markdown",
audio: "vocechat/audio", audio: "vocechat/audio",
file: "vocechat/file", file: "vocechat/file",
archive: "vocechat/archive", archive: "vocechat/archive"
}; };
export const firebaseConfig = { export const firebaseConfig = {
apiKey: "AIzaSyCc3VuCJZgzQLIH2wrYdQzsUOc1DuZiIOA", apiKey: "AIzaSyCc3VuCJZgzQLIH2wrYdQzsUOc1DuZiIOA",
+2 -2
View File
@@ -89,10 +89,10 @@ const VoiceFullscreen = ({ id, context }: Props) => {
data-uid={uid} data-uid={uid}
onDoubleClick={handleDoubleClick} onDoubleClick={handleDoubleClick}
className={clsx( className={clsx(
"bg-gray-700 group", "bg-gray-700 group overflow-hidden",
special special
? "absolute left-0 top-0 w-full h-[calc(100%_-_110px)] flex-center" ? "absolute left-0 top-0 w-full h-[calc(100%_-_110px)] flex-center"
: "relative rounded-lg py-1.5 px-12" : "relative border border-gray-600/50 rounded-lg py-1.5 px-12"
)} )}
> >
<div className={clsx("w-20 h-20 flex shrink-0 relative transition-opacity")}> <div className={clsx("w-20 h-20 flex shrink-0 relative transition-opacity")}>