Skip to content

Commit

Permalink
chore: initial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Jul 9, 2024
1 parent 170f66b commit 7cdecdb
Show file tree
Hide file tree
Showing 25 changed files with 115 additions and 243 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/update_locales.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Revolt CI
author_email: revolt[email protected]
author_name: Upryzing CI
author_email: upryzing[email protected]
message: "chore: update locale strings"

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = https://github.com/revoltchat/revolt.js
[submodule "components/i18n/locales"]
path = packages/client/components/i18n/locales
url = https://github.com/revoltchat/translations
url = https://github.com/upryzing/translations
[submodule "packages/solid-styled-components"]
path = packages/solid-styled-components
url = https://github.com/revoltchat/solid-styled-components
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
// Force to follow the `GUIDELINES.md`
// follow the style guidlines in `GUIDELINES.md`
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.tabSize": 2,
// Tell `rust-analyzer` where the Tauri project is.
// tell `rust-analyzer` where the Tauri project is
"rust-analyzer.linkedProjects": [
"./packages/desktop/src-tauri/Cargo.toml"
],
"nixEnvSelector.nixFile": "${workspaceRoot}/default.nix"
}
}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Revolt Frontend
# Upryzing's Web App (Lavender)

This repository contains the code for Revolt's frontend, built with Solid.js.
This repository houses the source code for Lavender, Upryzing's web app, built with Solid.js.

## Development Guide

Before contributing, make yourself familiar with [our contribution guidelines](https://developers.revolt.chat/contrib.html), the [code style guidelines](./GUIDELINES.md), and the [technical documentation for this project](https://revoltchat.github.io/frontend/).

Before getting started, you'll want to install:

- Git
- Node.js
- pnpm (run `corepack enable`)
- Git,
- Node.js (v18+), and
- pnpm (run `corepack enable`).

Then proceed to setup:

```bash
# clone the repository
git clone --recursive https://github.com/revoltchat/frontend client
cd client
git clone --recursive https://github.com/upryzing/lavender lavender
cd lavender

# update submodules if you pull new changes
# git submodule init && git submodule update
Expand All @@ -28,7 +28,7 @@ pnpm i
# build deps:
pnpm build:deps

# or build a specific dep (e.g. revolt.js updates):
# ...or build a specific dep (e.g. revolt.js updates):
# pnpm --filter revolt.js run build

# run dev server
Expand Down Expand Up @@ -79,7 +79,7 @@ pnpm build:deps
# build for web
pnpm build:web

# ... when building for Revolt production, use this instead of :web
# ... when building for production, use this instead of :web
pnpm build:prod
```

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "resolvite",
"version": "1.0.0",
"description": "Revolt's front-end monorepo.",
"name": "@upryzing/lavender-mono",
"version": "0.1.0",
"description": "Upryzing's main web and desktop apps",
"scripts": {
"test": "pnpm --filter test-runner test",
"test:coverage": "pnpm --filter test-runner coverage",
Expand All @@ -10,19 +10,19 @@
"test:browser:report": "pnpm --filter browser-test-runner exec playwright show-report",
"lint": "eslint --ext .ts,.tsx components/ packages/",
"lint:fix": "pnpm lint --fix",
"dev:web": "pnpm --filter client dev",
"dev:desktop": "pnpm --filter desktop tauri dev",
"dev:web": "pnpm --filter @upryzing/lavender dev",
"dev:desktop": "pnpm --filter @upryzing/lavender-desktop tauri dev",
"build:deps": "pnpm --filter revolt.js build",
"build:web": "pnpm --filter client build",
"build:desktop": "pnpm --filter desktop tauri build",
"build:web": "pnpm --filter @upryzing/lavender build",
"build:desktop": "pnpm --filter @upryzing/lavender-desktop tauri build",
"start": "cd packages/client && pnpm run serve",
"fmt": "prettier --write '**/*.{ts,tsx,json}'",
"fmt:check": "prettier --check '**/*.{ts,tsx,json}'",
"typecheck": "cd packages/client && pnpm run typecheck"
},
"keywords": [],
"engines": {
"node": ">=16",
"node": ">=18",
"pnpm": ">=6"
},
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function Message(props: Props) {
}
>
<NewUser>
<Tooltip content="New to Revolt" placement="top">
<Tooltip content={t("app.main.channel.new_to_upryzing")} placement="top">
<MdSpa {...iconSize(16)} />
</Tooltip>
</NewUser>
Expand All @@ -196,15 +196,16 @@ export function Message(props: Props) {
}
>
<NewUser>
<Tooltip content="New to the server" placement="top">
<Tooltip content={t("app.main.channel.new_to_space")} placement="top">
<MdSpa {...iconSize(16)} />
</Tooltip>
</NewUser>
</Match>
{/* pronounce example
<Match when={props.message.authorId === "01EX2NCWQ0CHS3QJF0FEQS1GR4"}>
<span />
<span>he/him &middot; </span>
</Match>
</Match> */}
</Switch>
}
compact={
Expand All @@ -228,10 +229,10 @@ export function Message(props: Props) {
menuGenerator={(user) =>
user
? floatingUserMenus(
user!,
// TODO: try to fetch on demand member
props.message.server?.getMember(user!.id)
)
user!,
// TODO: try to fetch on demand member
props.message.server?.getMember(user!.id)
)
: {}
}
isServer={!!props.message.server}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function ManageAccount() {
const client = useClient();
const mfa = createMfaResource();

const stillOwnServers = createMemo(
const stillOwnSpaces = createMemo(
() =>
client().servers.filter((server) => server.owner?.self || false).length >
0
Expand Down Expand Up @@ -327,17 +327,17 @@ function ManageAccount() {
{t("app.settings.pages.account.manage.disable")}
</CategoryButton>
<CategoryButton
action={stillOwnServers() ? undefined : "chevron"}
disabled={mfa.isLoading || stillOwnServers()}
action={stillOwnSpaces() ? undefined : "chevron"}
disabled={mfa.isLoading || stillOwnSpaces()}
onClick={deleteAccount}
icon={
<MdDelete {...iconSize(22)} fill={theme!.customColours.error.color} />
}
description={t("app.settings.pages.account.manage.delete_description")}
>
{t(
stillOwnServers()
? "app.settings.pages.account.manage.delete_still_own_servers"
stillOwnSpaces()
? "app.settings.pages.account.manage.delete_still_own_spaces"
: "app.settings.pages.account.manage.delete"
)}
</CategoryButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function Feedback() {
</CategoryButton>
</Link>
<Link
href="https://github.com/revoltchat/frontend/issues/new/choose"
href="https://github.com/upryzing/lavender/issues/new/choose"
target="_blank"
>
<CategoryButton
Expand Down Expand Up @@ -82,7 +82,7 @@ export default function Feedback() {
onClick={() => void 0}
description="You can report issues and discuss improvements with us directly here."
>
Join the Revolt Lounge
Join the Upryzing Garden
</CategoryButton>
</CategoryButtonGroup>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Native() {
action={<Checkbox value onChange={(value) => void value} />}
onClick={() => void 0}
icon={<MdExitToApp {...iconSize(22)} />}
description="Launch Revolt when you log into your computer."
description="Launch Upryzing when you log into your computer."
>
Start with Computer
</CategoryButton>
Expand All @@ -34,7 +34,7 @@ export default function Native() {
action={<Checkbox value onChange={(value) => void value} />}
onClick={() => void 0}
icon={<MdCancelPresentation {...iconSize(22)} />}
description="Instead of closing, Revolt will hide in your tray."
description="Instead of closing, Upryzing will hide in your tray."
>
Minimise to Tray
</CategoryButton>
Expand All @@ -46,7 +46,7 @@ export default function Native() {
action={<Checkbox value onChange={(value) => void value} />}
onClick={() => void 0}
icon={<MdWebAsset {...iconSize(22)} />}
description="Let Revolt use its own custom titlebar."
description="Let Upryzing use its own custom titlebar."
>
Custom window frame
</CategoryButton>
Expand All @@ -57,7 +57,7 @@ export default function Native() {
icon={<MdDesktopWindows {...iconSize(22)} />}
description="Version 1.0.0"
>
Revolt Desktop
Upryzing Desktop
</CategoryButton>
</CategoryButtonGroup>
</Column>
Expand Down
10 changes: 4 additions & 6 deletions packages/client/components/auth/src/AuthPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BiLogosGithub, BiLogosMastodon, BiLogosTwitter } from "solid-icons/bi";
import { BiLogosGithub, BiLogosMastodon } from "solid-icons/bi";
import { JSX } from "solid-js";

import { styled } from "styled-system/jsx";
Expand Down Expand Up @@ -153,16 +153,14 @@ export function AuthPage(props: { children: JSX.Element }) {
<Nav>
<NavItems variant="stack">
<NavItems>
<LinkWithIcon href="https://github.com/revoltchat" target="_blank">
<LinkWithIcon href="https://github.com/upryzing" target="_blank">
<BiLogosGithub size={24} />
</LinkWithIcon>
<LinkWithIcon href="https://twitter.com/revoltchat" target="_blank">
<BiLogosTwitter size={24} />
</LinkWithIcon>
<LinkWithIcon
href="https://mastodon.social/web/@revoltchat"
href="https://lea.pet/@upryzing"
target="_blank"
>
{/* before you ask: if the package had a fedi icon I'd use it */}
<BiLogosMastodon size={24} />
</LinkWithIcon>
</NavItems>
Expand Down
5 changes: 2 additions & 3 deletions packages/client/components/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ export function useApi() {
return clientController.api;
}

export const IS_REVOLT =
import.meta.env.VITE_API_URL === "https://api.revolt.chat" ||
import.meta.env.VITE_API_URL === "https://revolt.chat/api" ||
export const IS_UPRYZING =
import.meta.env.VITE_API_URL === "https://upryzing.app/api" ||
typeof import.meta.env.VITE_API_URL !== "string";

export const IS_DEV = import.meta.env.DEV;
2 changes: 1 addition & 1 deletion packages/client/components/i18n/locales
Submodule locales updated 73 files
+2 −2 af.json
+2 −2 ar.json
+2 −2 as.json
+2 −2 ast.json
+2 −2 az.json
+2 −2 be.json
+2 −2 bg.json
+2 −2 bn.json
+39 −39 bottom.json
+2 −2 ca.json
+2 −2 [email protected]
+2 −2 ckb.json
+3 −3 cs.json
+2 −2 cy.json
+2 −2 da.json
+2 −2 de.json
+2 −2 de_CH.json
+2 −2 el.json
+39 −39 en.json
+2 −2 en_US.json
+39 −39 enchantment.json
+2 −2 eo.json
+2 −2 es.json
+2 −2 es_419.json
+2 −2 fa.json
+2 −2 fi.json
+2 −2 fil.json
+2 −2 fr.json
+2 −2 frm.json
+2 −2 ga.json
+2 −2 gl.json
+2 −2 hi.json
+2 −2 hr.json
+2 −2 hu.json
+2 −2 id.json
+2 −2 isv.json
+3 −3 it.json
+2 −2 ja.json
+2 −2 kk.json
+2 −2 kmr.json
+2 −2 ko.json
+39 −39 leet.json
+2 −2 lt.json
+3 −3 lv.json
+1 −1 lzh.json
+2 −2 mwl.json
+2 −2 nb_NO.json
+1 −1 nds.json
+2 −2 nl.json
+2 −2 nn.json
+2 −2 owo.json
+2 −2 piglatin.json
+3 −3 pl.json
+2 −2 pr.json
+2 −2 pt.json
+2 −2 pt_BR.json
+2 −2 pt_PT.json
+3 −3 ro.json
+2 −2 ru.json
+2 −2 si.json
+2 −2 sk.json
+2 −2 sl.json
+2 −2 sq.json
+2 −2 sv.json
+2 −2 th.json
+2 −2 tokipona.json
+3 −3 tr.json
+3 −3 uk.json
+2 −2 vec.json
+2 −2 vi.json
+2 −2 vls.json
+3 −3 zh_Hans.json
+2 −2 zh_Hant.json
9 changes: 5 additions & 4 deletions packages/client/components/modal/modals/CreateInvite.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Match, Switch, createSignal, onMount } from "solid-js";

import { IS_REVOLT, mapAnyError } from "@revolt/client";
import { IS_UPRYZING, mapAnyError } from "@revolt/client";
import { useTranslation } from "@revolt/i18n";
import { Column, styled } from "@revolt/ui";

Expand Down Expand Up @@ -38,9 +38,10 @@ const CreateInvite: PropGenerator<"create_invite"> = (props) => {
.createInvite()
.then(({ _id }) =>
setLink(
IS_REVOLT
? `https://rvlt.gg/${_id}`
: `${window.location.protocol}//${window.location.host}/invite/${_id}`
// IS_UPRYZING
// ? `https://upryzing.app/invite/${_id}`
// :
`${window.location.protocol}//${window.location.host}/invite/${_id}`
)
)
.catch((err) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
type="image/png"
href="./public/assets/logo_round.png"
/>
<title>Revolt</title>
<title>Upryzing</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
6 changes: 3 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "0.0.0",
"name": "@upryzing/lavender",
"version": "0.1.0",
"type": "module",
"scripts": {
"prepare": "panda codegen",
Expand Down Expand Up @@ -109,4 +109,4 @@
"workbox-precaching": "^7.0.0"
},
"private": true
}
}
3 changes: 2 additions & 1 deletion packages/client/src/Interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const Interface = (props: { children: JSX.Element }) => {
}}
>
<Notice>
⚠️ This is beta software, things will break! State:{" "}
⚠️ This is beta software. <b>Things will break!</b><br />
State:{" "}
<Switch>
<Match
when={clientController.lifecycle.state() === State.Connecting}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ attachDevtoolsOverlay();

/** TEMPORARY */
function MountTheme(props: { children: any }) {
const [accent, setAccent] = createSignal("#FF5733");
const [accent, setAccent] = createSignal("#dca3ff");
const [darkMode, setDarkMode] = createSignal(false);

(window as any)._demo_setAccent = setAccent;
Expand Down
Loading

0 comments on commit 7cdecdb

Please sign in to comment.