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 build:deps
|
||||
# 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 workspaces focus --production --all
|
||||
|
||||
FROM node:24-alpine
|
||||
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 .
|
||||
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 .
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en" background="#191919">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
<!--App Title-->
|
||||
<title>Revolt</title>
|
||||
<meta name="apple-mobile-web-app-title" content="Revolt" />
|
||||
<title>Stoat (Legacy)</title>
|
||||
<meta name="apple-mobile-web-app-title" content="Stoat (Legacy)" />
|
||||
|
||||
<!--App Scaling-->
|
||||
<meta
|
||||
|
||||
@@ -119,7 +119,7 @@ export default function UserBadges({ badges, uid }: Props) {
|
||||
}}
|
||||
onClick={() => {
|
||||
window.open(
|
||||
"https://wiki.revolt.chat/notes/project/financial-support/",
|
||||
"https://ko-fi.com/stoatchat",
|
||||
"_blank",
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -121,7 +121,7 @@ export default function MemberList({
|
||||
Offline users have temporarily been disabled for
|
||||
larger servers - see{" "}
|
||||
<a
|
||||
href="https://github.com/revoltchat/backend/issues/178"
|
||||
href="https://github.com/stoatchat/stoatchat/issues/178"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
issue #178
|
||||
|
||||
@@ -78,6 +78,7 @@ export type Theme = Overrides & {
|
||||
css?: string;
|
||||
monospaceFont?: MonospaceFonts;
|
||||
"min-opacity"?: number;
|
||||
"logo-filter"?: string;
|
||||
};
|
||||
|
||||
export type ComputedVariables = Theme & {
|
||||
@@ -288,6 +289,7 @@ export const PRESETS: Record<string, Theme> = {
|
||||
"status-busy": "#F84848",
|
||||
"status-streaming": "#977EFF",
|
||||
"status-invisible": "#A5A5A5",
|
||||
"logo-filter": "unset",
|
||||
},
|
||||
dark: {
|
||||
accent: "#FD6671",
|
||||
@@ -316,6 +318,7 @@ export const PRESETS: Record<string, Theme> = {
|
||||
"status-busy": "#F84848",
|
||||
"status-streaming": "#977EFF",
|
||||
"status-invisible": "#A5A5A5",
|
||||
"logo-filter": "invert(1)",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -107,7 +107,10 @@ export default observer(() => {
|
||||
<h3>
|
||||
<Text id="app.special.modals.onboarding.welcome" />
|
||||
<br />
|
||||
<img src={wideSVG} />
|
||||
<img
|
||||
src={wideSVG}
|
||||
style={{ filter: "var(--logo-filter)" }}
|
||||
/>
|
||||
</h3>
|
||||
<div className={styles.actions}>
|
||||
<a
|
||||
@@ -164,18 +167,24 @@ export default observer(() => {
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<Link to="/settings/feedback">
|
||||
<a
|
||||
href={
|
||||
typeof window.native === "object"
|
||||
? "https://stoat.chat/download"
|
||||
: "https://stoat.chat/app"
|
||||
}
|
||||
target="_blank">
|
||||
<CategoryButton
|
||||
action="chevron"
|
||||
icon={<Megaphone size={32} />}
|
||||
description={
|
||||
<Text id="app.home.feedback_desc" />
|
||||
}>
|
||||
<Text id="app.home.feedback" />
|
||||
description="Revolt is now Stoat and has a brand new app.">
|
||||
{typeof window.native === "object"
|
||||
? "Download new app"
|
||||
: "Switch to new app"}
|
||||
</CategoryButton>
|
||||
</Link>
|
||||
</a>
|
||||
<a
|
||||
href="https://wiki.revolt.chat/notes/project/financial-support/"
|
||||
href="https://ko-fi.com/stoatchat"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<CategoryButton
|
||||
|
||||
@@ -41,7 +41,9 @@ export default observer(() => {
|
||||
href={action.href}
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<div className="button">{action.text}</div>{" "}
|
||||
<div className="button">
|
||||
{action.text}
|
||||
</div>{" "}
|
||||
</a>
|
||||
) : null,
|
||||
)}
|
||||
@@ -59,7 +61,11 @@ export default observer(() => {
|
||||
<div className={styles.nav}>
|
||||
<a className={styles.logo}>
|
||||
{!("native" in window) && (
|
||||
<img src={wideSVG} draggable={false} />
|
||||
<img
|
||||
src={wideSVG}
|
||||
style={{ filter: "var(--logo-filter)" }}
|
||||
draggable={false}
|
||||
/>
|
||||
)}
|
||||
</a>
|
||||
<LocaleSelector />
|
||||
|
||||
@@ -141,6 +141,10 @@
|
||||
color: goldenrod !important;
|
||||
}
|
||||
|
||||
.newApp {
|
||||
color: green !important;
|
||||
}
|
||||
|
||||
.logOut,
|
||||
.deleteServer {
|
||||
color: var(--error) !important;
|
||||
|
||||
@@ -207,11 +207,6 @@ export default observer(() => {
|
||||
icon: <Bot size={20} />,
|
||||
title: <Text id="app.settings.pages.bots.title" />,
|
||||
},
|
||||
{
|
||||
id: "feedback",
|
||||
icon: <Megaphone size={20} />,
|
||||
title: <Text id="app.settings.pages.feedback.title" />,
|
||||
},
|
||||
]}
|
||||
children={
|
||||
<Switch>
|
||||
@@ -263,16 +258,23 @@ export default observer(() => {
|
||||
category="pages"
|
||||
custom={
|
||||
<>
|
||||
<ButtonItem
|
||||
compact
|
||||
onClick={() =>
|
||||
modalController.push({ type: "changelog" })
|
||||
}>
|
||||
<ListUl size={20} />
|
||||
<Text id="app.special.modals.changelogs.title" />
|
||||
</ButtonItem>
|
||||
{typeof window.native === "object" ? (
|
||||
<a
|
||||
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/revoltchat"
|
||||
href="https://github.com/stoatchat"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<ButtonItem compact>
|
||||
@@ -281,7 +283,7 @@ export default observer(() => {
|
||||
</ButtonItem>
|
||||
</a>
|
||||
<a
|
||||
href="https://wiki.revolt.chat/notes/project/financial-support/"
|
||||
href="https://ko-fi.com/stoatchat"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<ButtonItem className={styles.donate} compact>
|
||||
@@ -309,7 +311,7 @@ export default observer(() => {
|
||||
<a
|
||||
href={
|
||||
GIT_BRANCH !== "DETACHED"
|
||||
? `https://github.com/revoltchat/revite/tree/${GIT_BRANCH}`
|
||||
? `https://github.com/stoatchat/for-legacy-web/tree/${GIT_BRANCH}`
|
||||
: undefined
|
||||
}
|
||||
target="_blank"
|
||||
|
||||
@@ -33,9 +33,8 @@ export function Audio() {
|
||||
|
||||
const askOrGetPermission = async () => {
|
||||
try {
|
||||
const result = await navigator.mediaDevices.getUserMedia(
|
||||
constraints,
|
||||
);
|
||||
const result =
|
||||
await navigator.mediaDevices.getUserMedia(constraints);
|
||||
|
||||
setMediaStream(result);
|
||||
} catch (err) {
|
||||
@@ -96,28 +95,14 @@ export function Audio() {
|
||||
<div className={styles.audio}>
|
||||
<Tip palette="warning">
|
||||
<span>
|
||||
We are currently{" "}
|
||||
Legacy voice is no longer supported,{" "}
|
||||
<a
|
||||
style={{ color: "inherit", fontWeight: "600" }}
|
||||
href="https://github.com/revoltchat/frontend/issues/14"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
rebuilding the client
|
||||
</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.
|
||||
href="https://stoat.chat/app"
|
||||
target="_blank">
|
||||
use the new app
|
||||
</a>
|
||||
.
|
||||
</span>
|
||||
</Tip>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
// 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_BRANCH: string = "__GIT_BRANCH__";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user