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