From 88ca9eb8ff7c53182a68a97890d668b407dd393a Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Thu, 26 Feb 2026 20:03:03 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20Android=20=D0=B2=20Download=20Center?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/build.yaml | 36 +++++++++++++++++++ index.html | 2 +- .../DownloadCenter/DownloadCenter.tsx | 27 +++++++++++--- 3 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 .gitea/build.yaml diff --git a/.gitea/build.yaml b/.gitea/build.yaml new file mode 100644 index 0000000..dd4ff3f --- /dev/null +++ b/.gitea/build.yaml @@ -0,0 +1,36 @@ +name: Build and Publish Landing Page + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + build: + runs-on: macos + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Install Node.js + uses: actions/setup-node@v6 + with: + node-version: '22' + + - name: Install npm dependencies + run: npm install + + - name: Build the landing page + run: npm run build + + - name: Upload to SSH + uses: appleboy/scp-action@master + with: + host: ${{ secrets.LAND_SSH_HOST }} + username: ${{ secrets.LAND_SSH_USERNAME }} + password: ${{ secrets.LAND_SSH_PASSWORD }} + port: 22 + source: "dist/*" + target: "/var/www/html" + rm: true \ No newline at end of file diff --git a/index.html b/index.html index a9e3bcd..10a02f3 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@ "description": "Secure end-to-end encrypted messaging application", "url": "https://rosetta.im", "applicationCategory": "CommunicationApplication", - "operatingSystem": ["Windows", "macOS", "Linux"], + "operatingSystem": ["Windows", "macOS", "Linux", "Android"], "offers": { "@type": "Offer", "price": "0", diff --git a/src/components/DownloadCenter/DownloadCenter.tsx b/src/components/DownloadCenter/DownloadCenter.tsx index 4d5a228..6cf1c24 100644 --- a/src/components/DownloadCenter/DownloadCenter.tsx +++ b/src/components/DownloadCenter/DownloadCenter.tsx @@ -12,7 +12,7 @@ import classes from './DownloadCenter.module.css'; import { RosettaLogo } from '../RosettaLogo/RosettaLogo'; import { useEffect, useState } from 'react'; import { FaApple, FaWindows } from 'react-icons/fa'; -import { FcLinux } from 'react-icons/fc'; +import { FcAndroidOs, FcLinux } from 'react-icons/fc'; import { Switch } from '../Switch/Switch'; import { IconDownload } from '@tabler/icons-react'; @@ -40,7 +40,15 @@ const fetchUpdates = async (): Promise => { arch: item.arch, version: item.version, link: new URL(item.downloadUrl, 'https://sdu.rosetta.im').toString(), - })); + })).sort((a : any, b : any) => { + const platformOrder = ['darwin', 'linux', 'win32', 'android']; + const archOrder = ['arm64', 'x64', 'universal'] + const platformComparison = platformOrder.indexOf(a.platform) - platformOrder.indexOf(b.platform); + if (platformComparison !== 0) { + return platformComparison; + } + return archOrder.indexOf(a.arch) - archOrder.indexOf(b.arch); + }); } catch (error) { console.error('Failed to fetch updates:', error); return []; @@ -51,7 +59,7 @@ export function DownloadCenter() { const theme = useMantineTheme(); const colorScheme = useComputedColorScheme(); const [kernels, setKernels] = useState([]); - const [targetPlatforms, setTargetPlatforms] = useState(['darwin', 'linux', 'win32']); + const [targetPlatforms, setTargetPlatforms] = useState(['darwin', 'linux', 'win32', 'android']); useEffect(() => { fetchUpdates().then(setKernels); @@ -61,7 +69,7 @@ export function DownloadCenter() { let targetPlatforms: string[] = []; switch(value){ case 'All': - targetPlatforms = ['darwin', 'linux', 'win32']; + targetPlatforms = ['darwin', 'linux', 'win32', 'android']; break; case 'Windows': targetPlatforms = ['win32']; @@ -69,6 +77,9 @@ export function DownloadCenter() { case 'macOS': targetPlatforms = ['darwin']; break; + case 'Android': + targetPlatforms = ['android']; + break; case 'Linux': targetPlatforms = ['linux']; break; @@ -84,6 +95,8 @@ export function DownloadCenter() { return 'Linux'; case 'win32': return 'Windows'; + case 'android': + return 'Android'; default: return platform; } @@ -97,6 +110,8 @@ export function DownloadCenter() { return arch === 'arm64' ? 'ARM64' : 'x64'; case 'win32': return arch === 'arm64' ? 'ARM64' : 'x64'; + case 'android': + return 'universal'; default: return arch; } @@ -111,6 +126,7 @@ export function DownloadCenter() { } />} {feature.platform === 'linux' && } {feature.platform === 'win32' && } + {feature.platform === 'android' && } {translatePlatformToOsName(feature.platform)} - {translatePlatformAndArchToCpuName(feature.platform, feature.arch)} @@ -125,6 +141,7 @@ export function DownloadCenter() { } {feature.platform == 'linux' && <>This version is for Linux and comes as an AppImage for the GUI versions.} {feature.platform == 'win32' && <>Download this version of you have computer on Windows 10 or later.} + {feature.platform == 'android' && <>This version is for Android devices and all architectures.}