chore: rename everything

This commit is contained in:
Tristan Yang
2022-06-27 10:37:03 +08:00
parent 69b4e7aac2
commit 585f8a3661
31 changed files with 79 additions and 79 deletions
+1 -1
View File
@@ -26,5 +26,5 @@
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"cSpell.words": ["btns", "oidc", "rustchat"] "cSpell.words": ["btns", "oidc", "vocechat"]
} }
+2 -2
View File
@@ -1,8 +1,8 @@
## Refs ## Refs
- preview demo: https://privoce.rustchat.com/ - preview demo: https://privoce.voce.chat/
- design: https://www.figma.com/file/EHnNr53kNmDWgUT86It6CH/UI - design: https://www.figma.com/file/EHnNr53kNmDWgUT86It6CH/UI
- backend APIs: https://dev.rustchat.com/api/swagger - backend APIs: https://dev.voce.chat/api/swagger
- text editor: https://plate.udecode.io/docs/installation - text editor: https://plate.udecode.io/docs/installation
- markdown editor: https://nhn.github.io/tui.editor/latest/ - markdown editor: https://nhn.github.io/tui.editor/latest/
- redux: [@reduxjs/toolkit](https://redux-toolkit.js.org/introduction/getting-started) - redux: [@reduxjs/toolkit](https://redux-toolkit.js.org/introduction/getting-started)
+3 -3
View File
@@ -1,8 +1,8 @@
{ {
"name": "rustchat-web", "name": "vocechat-web",
"version": "0.3.0", "version": "0.2.14",
"private": true, "private": true,
"homepage": "https://privoce.rustchat.com", "homepage": "https://privoce.voce.chat",
"dependencies": { "dependencies": {
"@emoji-mart/data": "^1.0.2", "@emoji-mart/data": "^1.0.2",
"@metamask/onboarding": "^1.0.1", "@metamask/onboarding": "^1.0.1",
+1 -1
View File
@@ -1 +1 @@
privoce.rustchat.com privoce.voce.chat
File diff suppressed because one or more lines are too long
+12 -12
View File
@@ -15,12 +15,12 @@ self.addEventListener("notificationclick", function (event) {
firstClient.focus(); firstClient.focus();
return; return;
} }
const { rustchat_from_uid, rustchat_to_uid, rustchat_to_gid } = customData; const { vocechat_from_uid, vocechat_to_uid, vocechat_to_gid } = customData;
let chatClient; let chatClient;
let redirectPath = rustchat_to_uid let redirectPath = vocechat_to_uid
? `/chat/dm/${rustchat_from_uid}` ? `/chat/dm/${vocechat_from_uid}`
: rustchat_to_gid : vocechat_to_gid
? `/chat/channel/${rustchat_to_gid}` ? `/chat/channel/${vocechat_to_gid}`
: ""; : "";
if (!redirectPath) { if (!redirectPath) {
firstClient.focus(); firstClient.focus();
@@ -49,13 +49,13 @@ importScripts(
// Initialize the Firebase app in the service worker by passing the generated config // Initialize the Firebase app in the service worker by passing the generated config
const firebaseConfig = { const firebaseConfig = {
apiKey: "AIzaSyDyJ6B1Ouenoha_gdGkBwIkBNStlwhlbO0", apiKey: "AIzaSyCc3VuCJZgzQLIH2wrYdQzsUOc1DuZiIOA",
authDomain: "rustchat-develop.firebaseapp.com", authDomain: "vocechatdev.firebaseapp.com",
projectId: "rustchat-develop", projectId: "vocechatdev",
storageBucket: "rustchat-develop.appspot.com", storageBucket: "vocechatdev.appspot.com",
messagingSenderId: "418687074928", messagingSenderId: "526613312184",
appId: "1:418687074928:web:753286adbf239f5af9eab5", appId: "1:526613312184:web:d13c92582baf470d487a4d",
measurementId: "G-XV476KEC8P" measurementId: "G-82RQ3YSCP7"
}; };
firebase.initializeApp(firebaseConfig); firebase.initializeApp(firebaseConfig);
+1 -1
View File
@@ -55,7 +55,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>Rustchat WebAPP</title> <title>VoceChat WebAPP</title>
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.0/styles/github.min.css"> --> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.0/styles/github.min.css"> -->
<style> <style>
html { html {
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "RustChat", "name": "VoceChat",
"short_name": "Your private chat APP", "short_name": "Your private chat APP",
"icons": [ "icons": [
{ {
+1 -1
View File
@@ -99,7 +99,7 @@ checkBrowsers(paths.appPath, isInteractive)
// version and md5 files // version and md5 files
fs.writeFileSync(`${buildFolder}/VERSION`, require("../package.json").version); fs.writeFileSync(`${buildFolder}/VERSION`, require("../package.json").version);
const hash = md5File.sync(`${buildFolder}/VERSION`); const hash = md5File.sync(`${buildFolder}/VERSION`);
fs.writeFileSync(`${buildFolder}/web.rustchat.md5`, hash); fs.writeFileSync(`${buildFolder}/web..md5`, hash);
}, },
(err) => { (err) => {
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === "true"; const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === "true";
+18 -18
View File
@@ -4,19 +4,19 @@ export const CACHE_VERSION = `0.3.0`;
export const ContentTypes = { export const ContentTypes = {
text: "text/plain", text: "text/plain",
markdown: "text/markdown", markdown: "text/markdown",
file: "rustchat/file", file: "vocechat/file",
archive: "rustchat/archive", archive: "vocechat/archive",
formData: "multipart/form-data", formData: "multipart/form-data",
json: "application/json" json: "application/json"
}; };
export const firebaseConfig = { export const firebaseConfig = {
apiKey: "AIzaSyDyJ6B1Ouenoha_gdGkBwIkBNStlwhlbO0", apiKey: "AIzaSyCc3VuCJZgzQLIH2wrYdQzsUOc1DuZiIOA",
authDomain: "rustchat-develop.firebaseapp.com", authDomain: "vocechatdev.firebaseapp.com",
projectId: "rustchat-develop", projectId: "vocechatdev",
storageBucket: "rustchat-develop.appspot.com", storageBucket: "vocechatdev.appspot.com",
messagingSenderId: "418687074928", messagingSenderId: "526613312184",
appId: "1:418687074928:web:753286adbf239f5af9eab5", appId: "1:526613312184:web:d13c92582baf470d487a4d",
measurementId: "G-XV476KEC8P" measurementId: "G-82RQ3YSCP7"
}; };
export const ChatPrefixs = { export const ChatPrefixs = {
channel: "#", channel: "#",
@@ -27,15 +27,15 @@ export const vapidKey = `BGXCn-5YRXSFw38Q9lUKJ5bibL212-yIQn1pCvthGhp6_KwA29FO1Ax
export const tokenHeader = "X-API-Key"; export const tokenHeader = "X-API-Key";
export const FILE_SLICE_SIZE = 1000 * 200 * 8; //200kb export const FILE_SLICE_SIZE = 1000 * 200 * 8; //200kb
export const FILE_IMAGE_SIZE = 1000 * 10000 * 8; //10mb export const FILE_IMAGE_SIZE = 1000 * 10000 * 8; //10mb
export const KEY_TOKEN = "RUSTCHAT_TOKEN"; export const KEY_TOKEN = "VOCECHAT_TOKEN";
export const KEY_EXPIRE = "RUSTCHAT_TOKEN_EXPIRE"; export const KEY_EXPIRE = "VOCECHAT_TOKEN_EXPIRE";
export const KEY_REFRESH_TOKEN = "RUSTCHAT_REFRESH_TOKEN"; export const KEY_REFRESH_TOKEN = "VOCECHAT_REFRESH_TOKEN";
export const KEY_UID = "RUSTCHAT_CURR_UID"; export const KEY_UID = "VOCECHAT_CURR_UID";
export const KEY_DEVICE_KEY = "RUSTCHAT_DEVICE_KEY"; export const KEY_DEVICE_KEY = "VOCECHAT_DEVICE_KEY";
export const KEY_USERS_VERSION = "RUSTCHAT_USERS_VERSION"; export const KEY_USERS_VERSION = "VOCECHAT_USERS_VERSION";
export const KEY_AFTER_MID = "RUSTCHAT_AFTER_MID"; export const KEY_AFTER_MID = "VOCECHAT_AFTER_MID";
export const KEY_PWA_INSTALLED = "RUSTCHAT_PWA_INSTALLED"; export const KEY_PWA_INSTALLED = "VOCECHAT_PWA_INSTALLED";
export const KEY_LOCAL_MAGIC_TOKEN = "RUSTCHAT_LOCAL_MAGIC_TOKEN"; export const KEY_LOCAL_MAGIC_TOKEN = "VOCECHAT_LOCAL_MAGIC_TOKEN";
export const Emojis = ["👍", "❤️", "😄", "👀", "👎", "🎉", "🙁", "🚀"]; export const Emojis = ["👍", "❤️", "😄", "👀", "👎", "🎉", "🙁", "🚀"];
export const Views = { export const Views = {
item: "item", item: "item",
+10 -10
View File
@@ -12,20 +12,20 @@
:root { :root {
/* border radius */ /* border radius */
--br: 8px; --br: 8px;
--rustchat-navs-bg: #e5e7eb; ---navs-bg: #e5e7eb;
--rustchat-body-bg: #f5f6f7; ---body-bg: #f5f6f7;
--rustchat-chat-bg: #fff; ---chat-bg: #fff;
--rustchat-channel-text-color: #1c1c1e; ---channel-text-color: #1c1c1e;
--rustchat-msg-text-color: #374151; ---msg-text-color: #374151;
} }
/* @media (prefers-color-scheme: dark) { /* @media (prefers-color-scheme: dark) {
:root{ :root{
--br:8px; --br:8px;
--rustchat-navs-bg:#121926; ---navs-bg:#121926;
--rustchat-body-bg:#1F2A37; ---body-bg:#1F2A37;
--rustchat-chat-bg:#384250; ---chat-bg:#384250;
--rustchat-channel-text-color:#fff; ---channel-text-color:#fff;
--rustchat-msg-text-color:#fff; ---msg-text-color:#fff;
} }
} */ } */
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "RustChat", "name": "VoceChat",
"short_name": "Your private chat APP", "short_name": "Your private chat APP",
"icons": [ "icons": [
{ {
+1 -1
View File
@@ -31,7 +31,7 @@ import useUploadFile from "../../hook/useUploadFile";
import Styled from "./styled"; import Styled from "./styled";
import { CONFIG } from "./config"; import { CONFIG } from "./config";
import Contact from "../Contact"; import Contact from "../Contact";
export const TEXT_EDITOR_PREFIX = "rustchat_text_editor"; export const TEXT_EDITOR_PREFIX = "_text_editor";
let components = createPlateUI({ let components = createPlateUI({
// [ELEMENT_IMAGE]: ImageElement, // [ELEMENT_IMAGE]: ImageElement,
+1 -1
View File
@@ -65,7 +65,7 @@ export default function useMessageFeed({ context = "channel", id = null }) {
}, [context, id]); }, [context, id]);
useEffect(() => { useEffect(() => {
if (items.length) { if (items.length) {
containerRef.current = document.querySelector(`#RUSTCHAT_FEED_${context}_${id}`); containerRef.current = document.querySelector(`#VOCECHAT_FEED_${context}_${id}`);
if (containerRef.current) { if (containerRef.current) {
const newScroll = containerRef.current.scrollHeight - containerRef.current.clientHeight; const newScroll = containerRef.current.scrollHeight - containerRef.current.clientHeight;
containerRef.current.scrollTop = curScrollPos + (newScroll - oldScroll); containerRef.current.scrollTop = curScrollPos + (newScroll - oldScroll);
+1 -1
View File
@@ -39,7 +39,7 @@ export default function useUploadFile(props = {}) {
if (!file) return; if (!file) return;
setData(null); setData(null);
const { const {
name = `rustchat-${+new Date()}.${file.type.split("/")[1]}`, name = `-${+new Date()}.${file.type.split("/")[1]}`,
type: file_type, type: file_type,
size: file_size size: file_size
} = file; } = file;
+1 -1
View File
@@ -215,7 +215,7 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
> >
<StyledChannelChat <StyledChannelChat
// ref={scrollObserveRef} // ref={scrollObserveRef}
id={`RUSTCHAT_FEED_channel_${cid}`} id={`VOCECHAT_FEED_channel_${cid}`}
> >
{/* <div className="anchor"></div> */} {/* <div className="anchor"></div> */}
{hasMore ? ( {hasMore ? (
+1 -1
View File
@@ -85,7 +85,7 @@ export default function DMChat({ uid = "", dropFiles = [] }) {
</StyledHeader> </StyledHeader>
} }
> >
<StyledDMChat id={`RUSTCHAT_FEED_user_${uid}`}> <StyledDMChat id={`VOCECHAT_FEED_user_${uid}`}>
{hasMore ? <LoadMore pullUp={pullUp} /> : null} {hasMore ? <LoadMore pullUp={pullUp} /> : null}
{[...feeds].map((mid, idx) => { {[...feeds].map((mid, idx) => {
const curr = messageData[mid]; const curr = messageData[mid];
+1 -1
View File
@@ -3,7 +3,7 @@ const StyledWrapper = styled.div`
display: flex; display: flex;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: var(--rustchat-navs-bg); background-color: var(---navs-bg);
> .col { > .col {
height: 100%; height: 100%;
display: flex; display: flex;
+1 -1
View File
@@ -122,7 +122,7 @@ export default function InvitePage() {
<div className="form animate__animated animate__fadeInDown animate__faster"> <div className="form animate__animated animate__fadeInDown animate__faster">
<div className="tips"> <div className="tips">
<img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" /> <img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" />
<h2 className="title">Sign Up to Rustchat</h2> <h2 className="title">Sign Up to VoceChat</h2>
<span className="desc">Please enter your details.</span> <span className="desc">Please enter your details.</span>
</div> </div>
<form onSubmit={handleReg}> <form onSubmit={handleReg}>
+1 -1
View File
@@ -58,7 +58,7 @@ export default function MetamaskLoginButton({ login }) {
console.log("get sn"); console.log("get sn");
const signature = await ethereum.request({ const signature = await ethereum.request({
method: "personal_sign", method: "personal_sign",
params: [nonce, address, "hello from rustchat"] params: [nonce, address, "hello from "]
}); });
return signature; return signature;
}; };
+1 -1
View File
@@ -134,7 +134,7 @@ export default function LoginPage() {
<div className="form"> <div className="form">
<div className="tips"> <div className="tips">
<img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" /> <img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" />
<h2 className="title">Login to Rustchat</h2> <h2 className="title">Login to VoceChat</h2>
<span className="desc">Please enter your details.</span> <span className="desc">Please enter your details.</span>
</div> </div>
<form onSubmit={handleLogin}> <form onSubmit={handleLogin}>
+1 -1
View File
@@ -49,7 +49,7 @@ export default function OnboardingPage() {
return ( return (
<> <>
<Helmet> <Helmet>
<title>Rustchat Setup</title> <title>VoceChat Setup</title>
</Helmet> </Helmet>
<StyledOnboardingPage> <StyledOnboardingPage>
<Navigator {...serverSetup} /> <Navigator {...serverSetup} />
+1 -1
View File
@@ -63,7 +63,7 @@ export default function DonePage({ serverName }) {
return ( return (
<StyledWrapper> <StyledWrapper>
<span className="primaryText">Welcome to {serverName}</span> <span className="primaryText">Welcome to {serverName}</span>
<span className="secondaryText">Proudly presented by Rustchat</span> <span className="secondaryText">Proudly presented by VoceChat</span>
<span className="tip"> <span className="tip">
More settings, including domain resolution, privileges, securities, and invites are More settings, including domain resolution, privileges, securities, and invites are
available in <span className="strong">Settings</span> available in <span className="strong">Settings</span>
+1 -1
View File
@@ -46,7 +46,7 @@ const StyledWrapper = styled.div`
export default function WelcomePage({ nextStep }) { export default function WelcomePage({ nextStep }) {
return ( return (
<StyledWrapper> <StyledWrapper>
<span className="primaryText">Welcome to your Rustchat!</span> <span className="primaryText">Welcome to your VoceChat!</span>
<span className="secondaryText"> <span className="secondaryText">
Everything in this space is owned by you. Lets set up your space! Everything in this space is owned by you. Lets set up your space!
</span> </span>
+1 -1
View File
@@ -28,7 +28,7 @@ export default function ExpiredTip() {
return ( return (
<Styled> <Styled>
<div className="title">Magic link expired</div> <div className="title">Magic link expired</div>
<p className="desc">Go back to your original Rustchat tab and request a new magic link.</p> <p className="desc">Go back to your original VoceChat tab and request a new magic link.</p>
<p className="desc">You can close this window now.</p> <p className="desc">You can close this window now.</p>
</Styled> </Styled>
); );
+1 -1
View File
@@ -102,7 +102,7 @@ export default function Reg() {
<> <>
<div className="tips"> <div className="tips">
<img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" /> <img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" />
<h2 className="title">Sign Up to Rustchat</h2> <h2 className="title">Sign Up to VoceChat</h2>
<span className="desc">Please enter your details.</span> <span className="desc">Please enter your details.</span>
</div> </div>
+1 -1
View File
@@ -71,7 +71,7 @@ export default function SendMagicLinkPage() {
<> <>
<div className="tips"> <div className="tips">
<img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" /> <img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="logo" />
<h2 className="title">Login to Rustchat</h2> <h2 className="title">Login to VoceChat</h2>
<span className="desc">Please enter your Email</span> <span className="desc">Please enter your Email</span>
</div> </div>
<form onSubmit={handleLogin}> <form onSubmit={handleLogin}>
+2 -2
View File
@@ -99,8 +99,8 @@ export default function APIConfig() {
<Button>Update Secret</Button> <Button>Update Secret</Button>
</Tippy> </Tippy>
<div className="tip"> <div className="tip">
Tip: The security key agreed between the rustchat server and the third-party app is used to Tip: The security key agreed between the server and the third-party app is used to encrypt
encrypt the communication data.{" "} the communication data.{" "}
</div> </div>
</Styled> </Styled>
); );
+4 -4
View File
@@ -107,7 +107,7 @@ export default function Logins() {
<div className="title"> <div className="title">
<div className="txt"> <div className="txt">
<Label>Google</Label> <Label>Google</Label>
<Tooltip link="https://doc.rustchat.com/en-us/login-google.html" /> <Tooltip link="https://doc.voce.chat/en-us/login-google.html" />
</div> </div>
<span className="desc">Allows members login with Google.</span> <span className="desc">Allows members login with Google.</span>
</div> </div>
@@ -130,7 +130,7 @@ export default function Logins() {
<div className="title"> <div className="title">
<div className="txt"> <div className="txt">
<Label>Github</Label> <Label>Github</Label>
<Tooltip link="https://doc.rustchat.com/en-us/login-github.html" /> <Tooltip link="https://doc.voce.chat/en-us/login-github.html" />
</div> </div>
<span className="desc">Allows members login with Github.</span> <span className="desc">Allows members login with Github.</span>
</div> </div>
@@ -161,7 +161,7 @@ export default function Logins() {
<div className="title"> <div className="title">
<div className="txt"> <div className="txt">
<Label>Metamask</Label> <Label>Metamask</Label>
<Tooltip link="https://doc.rustchat.com/en-us/login-metamask.html" /> <Tooltip link="https://doc.voce.chat/en-us/login-metamask.html" />
</div> </div>
<span className="desc">Allows members login with Metamask.</span> <span className="desc">Allows members login with Metamask.</span>
</div> </div>
@@ -176,7 +176,7 @@ export default function Logins() {
<div className="title"> <div className="title">
<div className="txt"> <div className="txt">
<Label htmlFor="desc">OIDC</Label> <Label htmlFor="desc">OIDC</Label>
<Tooltip link="https://doc.rustchat.com/en-us/login-webid.html" /> <Tooltip link="https://doc.voce.chat/en-us/login-webid.html" />
</div> </div>
<span className="desc">Save my login details for next time.</span> <span className="desc">Save my login details for next time.</span>
</div> </div>
+1 -1
View File
@@ -125,7 +125,7 @@ export default function ConfigSMTP() {
<div className="tip"> <div className="tip">
<img src={iconQuestion} alt="question icon" /> <img src={iconQuestion} alt="question icon" />
<a <a
href="https://rustchat.com/doc/smtp-setting" href="https://voce.chat/doc/smtp-setting"
target="_blank" target="_blank"
className="link" className="link"
rel="noreferrer" rel="noreferrer"
+1 -1
View File
@@ -2,7 +2,7 @@ export interface ChannelMember {}
export interface Message {} export interface Message {}
export type ContentType = "text/plain" | "text/markdown" | "rustchat/file" | "rustchat/archive"; export type ContentType = "text/plain" | "text/markdown" | "vocechat/file" | "vocechat/archive";
export interface PinnedMessage { export interface PinnedMessage {
mid: number; mid: number;