forked from abner/for-legacy-web
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57e8c0e274 | ||
|
|
38f95897ca | ||
|
|
4cb8b370fe |
44
.github/workflows/harbor.yml
vendored
Normal file
44
.github/workflows/harbor.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name: Publish to Harbor
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
legacy-frontend:
|
||||||
|
name: Build and push to Harbor
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: "recursive"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Harbor
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.stoatinternal.com
|
||||||
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
registry.stoatinternal.com/stoat/legacy-frontend:${{ github.sha }}
|
||||||
|
registry.stoatinternal.com/stoat/legacy-frontend:latest
|
||||||
|
build-args: |
|
||||||
|
REVOLT_PUBLIC_URL=https://api.stoat.chat/
|
||||||
|
REVOLT_SAAS=https://git.stoatinternal.com/brand/assets.git
|
||||||
|
REVOLT_SAAS_BRANCH=for-legacy-web
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
10
Dockerfile
10
Dockerfile
@@ -8,11 +8,21 @@ COPY .env.build .env
|
|||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
RUN yarn build:deps
|
RUN yarn build:deps
|
||||||
# RUN yarn typecheck # lol no
|
# RUN yarn typecheck # lol no
|
||||||
|
|
||||||
|
ARG REVOLT_SAAS
|
||||||
|
ARG REVOLT_SAAS_BRANCH
|
||||||
|
ENV REVOLT_SAAS=$REVOLT_SAAS
|
||||||
|
ENV REVOLT_SAAS_BRANCH=$REVOLT_SAAS_BRANCH
|
||||||
|
|
||||||
RUN yarn build:highmem
|
RUN yarn build:highmem
|
||||||
RUN yarn workspaces focus --production --all
|
RUN yarn workspaces focus --production --all
|
||||||
|
|
||||||
FROM node:24-alpine
|
FROM node:24-alpine
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
ARG REVOLT_PUBLIC_URL=https://api.stoat.chat/
|
||||||
|
ENV REVOLT_PUBLIC_URL=$REVOLT_PUBLIC_URL
|
||||||
|
|
||||||
COPY docker/package.json docker/yarn.lock .
|
COPY docker/package.json docker/yarn.lock .
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
COPY --from=builder --exclude=package.json --exclude=yarn.lock --exclude=.yarn* --exclude=.git --exclude=external --exclude=node_modules /usr/src/app .
|
COPY --from=builder --exclude=package.json --exclude=yarn.lock --exclude=.yarn* --exclude=.git --exclude=external --exclude=node_modules /usr/src/app .
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en" background="#191919">
|
<html lang="en" background="#191919">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|
||||||
<!--App Title-->
|
<!--App Title-->
|
||||||
<title>Revolt</title>
|
<title>Stoat (Legacy)</title>
|
||||||
<meta name="apple-mobile-web-app-title" content="Revolt" />
|
<meta name="apple-mobile-web-app-title" content="Stoat (Legacy)" />
|
||||||
|
|
||||||
<!--App Scaling-->
|
<!--App Scaling-->
|
||||||
<meta
|
<meta
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default function UserBadges({ badges, uid }: Props) {
|
|||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.open(
|
window.open(
|
||||||
"https://wiki.revolt.chat/notes/project/financial-support/",
|
"https://ko-fi.com/stoatchat",
|
||||||
"_blank",
|
"_blank",
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default function MemberList({
|
|||||||
Offline users have temporarily been disabled for
|
Offline users have temporarily been disabled for
|
||||||
larger servers - see{" "}
|
larger servers - see{" "}
|
||||||
<a
|
<a
|
||||||
href="https://github.com/revoltchat/backend/issues/178"
|
href="https://github.com/stoatchat/stoatchat/issues/178"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
issue #178
|
issue #178
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export type Theme = Overrides & {
|
|||||||
css?: string;
|
css?: string;
|
||||||
monospaceFont?: MonospaceFonts;
|
monospaceFont?: MonospaceFonts;
|
||||||
"min-opacity"?: number;
|
"min-opacity"?: number;
|
||||||
|
"logo-filter"?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ComputedVariables = Theme & {
|
export type ComputedVariables = Theme & {
|
||||||
@@ -288,6 +289,7 @@ export const PRESETS: Record<string, Theme> = {
|
|||||||
"status-busy": "#F84848",
|
"status-busy": "#F84848",
|
||||||
"status-streaming": "#977EFF",
|
"status-streaming": "#977EFF",
|
||||||
"status-invisible": "#A5A5A5",
|
"status-invisible": "#A5A5A5",
|
||||||
|
"logo-filter": "unset",
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
accent: "#FD6671",
|
accent: "#FD6671",
|
||||||
@@ -316,6 +318,7 @@ export const PRESETS: Record<string, Theme> = {
|
|||||||
"status-busy": "#F84848",
|
"status-busy": "#F84848",
|
||||||
"status-streaming": "#977EFF",
|
"status-streaming": "#977EFF",
|
||||||
"status-invisible": "#A5A5A5",
|
"status-invisible": "#A5A5A5",
|
||||||
|
"logo-filter": "invert(1)",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,10 @@ export default observer(() => {
|
|||||||
<h3>
|
<h3>
|
||||||
<Text id="app.special.modals.onboarding.welcome" />
|
<Text id="app.special.modals.onboarding.welcome" />
|
||||||
<br />
|
<br />
|
||||||
<img src={wideSVG} />
|
<img
|
||||||
|
src={wideSVG}
|
||||||
|
style={{ filter: "var(--logo-filter)" }}
|
||||||
|
/>
|
||||||
</h3>
|
</h3>
|
||||||
<div className={styles.actions}>
|
<div className={styles.actions}>
|
||||||
<a
|
<a
|
||||||
@@ -164,18 +167,24 @@ export default observer(() => {
|
|||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Link to="/settings/feedback">
|
<a
|
||||||
|
href={
|
||||||
|
typeof window.native === "object"
|
||||||
|
? "https://stoat.chat/download"
|
||||||
|
: "https://stoat.chat/app"
|
||||||
|
}
|
||||||
|
target="_blank">
|
||||||
<CategoryButton
|
<CategoryButton
|
||||||
action="chevron"
|
action="chevron"
|
||||||
icon={<Megaphone size={32} />}
|
icon={<Megaphone size={32} />}
|
||||||
description={
|
description="Revolt is now Stoat and has a brand new app.">
|
||||||
<Text id="app.home.feedback_desc" />
|
{typeof window.native === "object"
|
||||||
}>
|
? "Download new app"
|
||||||
<Text id="app.home.feedback" />
|
: "Switch to new app"}
|
||||||
</CategoryButton>
|
</CategoryButton>
|
||||||
</Link>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://wiki.revolt.chat/notes/project/financial-support/"
|
href="https://ko-fi.com/stoatchat"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
<CategoryButton
|
<CategoryButton
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ export default observer(() => {
|
|||||||
href={action.href}
|
href={action.href}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
<div className="button">{action.text}</div>{" "}
|
<div className="button">
|
||||||
|
{action.text}
|
||||||
|
</div>{" "}
|
||||||
</a>
|
</a>
|
||||||
) : null,
|
) : null,
|
||||||
)}
|
)}
|
||||||
@@ -59,7 +61,11 @@ export default observer(() => {
|
|||||||
<div className={styles.nav}>
|
<div className={styles.nav}>
|
||||||
<a className={styles.logo}>
|
<a className={styles.logo}>
|
||||||
{!("native" in window) && (
|
{!("native" in window) && (
|
||||||
<img src={wideSVG} draggable={false} />
|
<img
|
||||||
|
src={wideSVG}
|
||||||
|
style={{ filter: "var(--logo-filter)" }}
|
||||||
|
draggable={false}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
<LocaleSelector />
|
<LocaleSelector />
|
||||||
|
|||||||
@@ -141,6 +141,10 @@
|
|||||||
color: goldenrod !important;
|
color: goldenrod !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.newApp {
|
||||||
|
color: green !important;
|
||||||
|
}
|
||||||
|
|
||||||
.logOut,
|
.logOut,
|
||||||
.deleteServer {
|
.deleteServer {
|
||||||
color: var(--error) !important;
|
color: var(--error) !important;
|
||||||
|
|||||||
@@ -207,11 +207,6 @@ export default observer(() => {
|
|||||||
icon: <Bot size={20} />,
|
icon: <Bot size={20} />,
|
||||||
title: <Text id="app.settings.pages.bots.title" />,
|
title: <Text id="app.settings.pages.bots.title" />,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "feedback",
|
|
||||||
icon: <Megaphone size={20} />,
|
|
||||||
title: <Text id="app.settings.pages.feedback.title" />,
|
|
||||||
},
|
|
||||||
]}
|
]}
|
||||||
children={
|
children={
|
||||||
<Switch>
|
<Switch>
|
||||||
@@ -263,16 +258,23 @@ export default observer(() => {
|
|||||||
category="pages"
|
category="pages"
|
||||||
custom={
|
custom={
|
||||||
<>
|
<>
|
||||||
<ButtonItem
|
{typeof window.native === "object" ? (
|
||||||
compact
|
|
||||||
onClick={() =>
|
|
||||||
modalController.push({ type: "changelog" })
|
|
||||||
}>
|
|
||||||
<ListUl size={20} />
|
|
||||||
<Text id="app.special.modals.changelogs.title" />
|
|
||||||
</ButtonItem>
|
|
||||||
<a
|
<a
|
||||||
href="https://github.com/revoltchat"
|
className={styles.newApp}
|
||||||
|
href="https://stoat.chat/download"
|
||||||
|
target="_blank">
|
||||||
|
<ButtonItem compact>Download new app</ButtonItem>
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<a
|
||||||
|
className={styles.newApp}
|
||||||
|
href="https://stoat.chat/app"
|
||||||
|
target="_blank">
|
||||||
|
<ButtonItem compact>Switch to new app</ButtonItem>
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
<a
|
||||||
|
href="https://github.com/stoatchat"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
<ButtonItem compact>
|
<ButtonItem compact>
|
||||||
@@ -281,7 +283,7 @@ export default observer(() => {
|
|||||||
</ButtonItem>
|
</ButtonItem>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="https://wiki.revolt.chat/notes/project/financial-support/"
|
href="https://ko-fi.com/stoatchat"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
<ButtonItem className={styles.donate} compact>
|
<ButtonItem className={styles.donate} compact>
|
||||||
@@ -309,7 +311,7 @@ export default observer(() => {
|
|||||||
<a
|
<a
|
||||||
href={
|
href={
|
||||||
GIT_BRANCH !== "DETACHED"
|
GIT_BRANCH !== "DETACHED"
|
||||||
? `https://github.com/revoltchat/revite/tree/${GIT_BRANCH}`
|
? `https://github.com/stoatchat/for-legacy-web/tree/${GIT_BRANCH}`
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -33,9 +33,8 @@ export function Audio() {
|
|||||||
|
|
||||||
const askOrGetPermission = async () => {
|
const askOrGetPermission = async () => {
|
||||||
try {
|
try {
|
||||||
const result = await navigator.mediaDevices.getUserMedia(
|
const result =
|
||||||
constraints,
|
await navigator.mediaDevices.getUserMedia(constraints);
|
||||||
);
|
|
||||||
|
|
||||||
setMediaStream(result);
|
setMediaStream(result);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -96,28 +95,14 @@ export function Audio() {
|
|||||||
<div className={styles.audio}>
|
<div className={styles.audio}>
|
||||||
<Tip palette="warning">
|
<Tip palette="warning">
|
||||||
<span>
|
<span>
|
||||||
We are currently{" "}
|
Legacy voice is no longer supported,{" "}
|
||||||
<a
|
<a
|
||||||
style={{ color: "inherit", fontWeight: "600" }}
|
style={{ color: "inherit", fontWeight: "600" }}
|
||||||
href="https://github.com/revoltchat/frontend/issues/14"
|
href="https://stoat.chat/app"
|
||||||
target="_blank"
|
target="_blank">
|
||||||
rel="noreferrer">
|
use the new app
|
||||||
rebuilding the client
|
</a>
|
||||||
</a>{" "}
|
.
|
||||||
and{" "}
|
|
||||||
<a
|
|
||||||
style={{ color: "inherit", fontWeight: "600" }}
|
|
||||||
href="https://trello.com/c/Ay6KdiOV/1-voice-overhaul-and-video-calling"
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer">
|
|
||||||
the voice server
|
|
||||||
</a>{" "}
|
|
||||||
from scratch.
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
The old voice should work in most cases, but it may
|
|
||||||
inexplicably not connect in some scenarios and / or
|
|
||||||
exhibit weird behaviour.
|
|
||||||
</span>
|
</span>
|
||||||
</Tip>
|
</Tip>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// Strings needs to be explictly stated here as they can cause type issues elsewhere.
|
// Strings needs to be explictly stated here as they can cause type issues elsewhere.
|
||||||
|
|
||||||
export const REPO_URL: string = "https://github.com/revoltchat/revite/commit";
|
export const REPO_URL: string = "https://github.com/stoatchat/for-legacy-web/commit";
|
||||||
export const GIT_REVISION: string = "__GIT_REVISION__";
|
export const GIT_REVISION: string = "__GIT_REVISION__";
|
||||||
export const GIT_BRANCH: string = "__GIT_BRANCH__";
|
export const GIT_BRANCH: string = "__GIT_BRANCH__";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user