refactor: organize desktop vs. mobile into separate folders

This commit is contained in:
Arjun Patel
2026-04-29 08:42:56 -07:00
parent 3d9fe67936
commit 3a11a82cd3
194 changed files with 213 additions and 213 deletions
+5 -5
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
defaults: defaults:
run: run:
working-directory: js working-directory: js/desktop
env: env:
APP_ENV: prod APP_ENV: prod
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
@@ -31,7 +31,7 @@ jobs:
with: with:
node-version: 20 node-version: 20
cache: yarn cache: yarn
cache-dependency-path: js/yarn.lock cache-dependency-path: js/desktop/yarn.lock
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout 600000 run: yarn install --frozen-lockfile --network-timeout 600000
@@ -51,7 +51,7 @@ jobs:
$dlib = Join-Path $env:RUNNER_TEMP "trusted-signing\Microsoft.Trusted.Signing.Client\bin\x64\Azure.CodeSigning.Dlib.dll" $dlib = Join-Path $env:RUNNER_TEMP "trusted-signing\Microsoft.Trusted.Signing.Client\bin\x64\Azure.CodeSigning.Dlib.dll"
if (-not (Test-Path $dlib)) { throw "Dlib not found at $dlib" } if (-not (Test-Path $dlib)) { throw "Dlib not found at $dlib" }
"AZURE_DLIB_PATH=$dlib" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 "AZURE_DLIB_PATH=$dlib" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
"AZURE_METADATA_JSON_PATH=$env:GITHUB_WORKSPACE\js\signing-metadata.json" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 "AZURE_METADATA_JSON_PATH=$env:GITHUB_WORKSPACE\js\desktop\signing-metadata.json" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Locate signtool.exe - name: Locate signtool.exe
shell: pwsh shell: pwsh
@@ -84,7 +84,7 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: flowy-llink-windows-signed name: flowy-llink-windows-signed
path: js/out/make/**/* path: js/desktop/out/make/**/*
if-no-files-found: warn if-no-files-found: warn
# When Squirrel reports a generic "Failed to sign", the real error from # When Squirrel reports a generic "Failed to sign", the real error from
@@ -94,5 +94,5 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: electron-windows-sign-log name: electron-windows-sign-log
path: js/node_modules/electron-winstaller/vendor/electron-windows-sign.log path: js/desktop/node_modules/electron-winstaller/vendor/electron-windows-sign.log
if-no-files-found: ignore if-no-files-found: ignore

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 667 B

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 1001 B

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 1001 B

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

+124 -124
View File
@@ -1,124 +1,124 @@
import type { ForgeConfig } from '@electron-forge/shared-types'; import type { ForgeConfig } from '@electron-forge/shared-types';
import { MakerSquirrel } from '@electron-forge/maker-squirrel'; import { MakerSquirrel } from '@electron-forge/maker-squirrel';
import { MakerZIP } from '@electron-forge/maker-zip'; import { MakerZIP } from '@electron-forge/maker-zip';
import { MakerDeb } from '@electron-forge/maker-deb'; import { MakerDeb } from '@electron-forge/maker-deb';
import { MakerRpm } from '@electron-forge/maker-rpm'; import { MakerRpm } from '@electron-forge/maker-rpm';
import { VitePlugin } from '@electron-forge/plugin-vite'; import { VitePlugin } from '@electron-forge/plugin-vite';
import { FusesPlugin } from '@electron-forge/plugin-fuses'; import { FusesPlugin } from '@electron-forge/plugin-fuses';
import { FuseV1Options, FuseVersion } from '@electron/fuses'; import { FuseV1Options, FuseVersion } from '@electron/fuses';
// Windows code signing via Azure Trusted Signing. Dormant unless the workflow // Windows code signing via Azure Trusted Signing. Dormant unless the workflow
// provisions the dlib + metadata file and exports these env vars, so local // provisions the dlib + metadata file and exports these env vars, so local
// `yarn make` and unsigned CI builds both work unchanged. // `yarn make` and unsigned CI builds both work unchanged.
// @electron/windows-sign prepends `sign /tr <timestampServer> /td sha256 /fd sha256` // @electron/windows-sign prepends `sign /tr <timestampServer> /td sha256 /fd sha256`
// to the sha256 pass, so `signWithParams` only carries the Azure Trusted Signing // to the sha256 pass, so `signWithParams` only carries the Azure Trusted Signing
// bits. Skip the sha1 pass (deprecated; not supported by Trusted Signing). // bits. Skip the sha1 pass (deprecated; not supported by Trusted Signing).
const windowsSign = process.env.AZURE_METADATA_JSON_PATH ? { const windowsSign = process.env.AZURE_METADATA_JSON_PATH ? {
debug: true, debug: true,
signToolPath: process.env.SIGNTOOL_PATH, signToolPath: process.env.SIGNTOOL_PATH,
hashes: ['sha256' as any], hashes: ['sha256' as any],
timestampServer: 'http://timestamp.acs.microsoft.com', timestampServer: 'http://timestamp.acs.microsoft.com',
signWithParams: [ signWithParams: [
'/v', '/v',
'/dlib', process.env.AZURE_DLIB_PATH, '/dlib', process.env.AZURE_DLIB_PATH,
'/dmdf', process.env.AZURE_METADATA_JSON_PATH, '/dmdf', process.env.AZURE_METADATA_JSON_PATH,
].join(' '), ].join(' '),
} : undefined; } : undefined;
const config: ForgeConfig = { const config: ForgeConfig = {
packagerConfig: { packagerConfig: {
asar: true, asar: true,
icon: './assets/flowy', icon: './assets/flowy',
appBundleId: 'live.flowy.llink', appBundleId: 'live.flowy.llink',
protocols: [ protocols: [
{ name: 'llink', schemes: ['llink'] }, { name: 'llink', schemes: ['llink'] },
], ],
extendInfo: { extendInfo: {
NSMicrophoneUsageDescription: 'llink needs microphone access to record audio messages.', NSMicrophoneUsageDescription: 'llink needs microphone access to record audio messages.',
NSCameraUsageDescription: 'llink needs camera access to record video messages.', NSCameraUsageDescription: 'llink needs camera access to record video messages.',
}, },
osxSign: {}, osxSign: {},
osxNotarize: { osxNotarize: {
keychainProfile: 'default', keychainProfile: 'default',
}, },
windowsSign windowsSign
}, },
publishers: [ publishers: [
{ {
name: '@electron-forge/publisher-gcs', name: '@electron-forge/publisher-gcs',
config: { config: {
storageOptions: { storageOptions: {
projectId: 'flowy-prod-440017' projectId: 'flowy-prod-440017'
}, },
bucket: 'flowy-releases', bucket: 'flowy-releases',
folder: 'llink', folder: 'llink',
// NOTE: commented out because we do not want to apply per object ACL which conflicts with uniform bucket-level access that's already public // NOTE: commented out because we do not want to apply per object ACL which conflicts with uniform bucket-level access that's already public
// public: true // public: true
} }
} }
], ],
rebuildConfig: {}, rebuildConfig: {},
makers: [ makers: [
new MakerSquirrel((arch) => ({ new MakerSquirrel((arch) => ({
remoteReleases: `https://storage.googleapis.com/flowy-releases/llink/win32/${arch}`, remoteReleases: `https://storage.googleapis.com/flowy-releases/llink/win32/${arch}`,
setupIcon: './assets/flowy.ico', setupIcon: './assets/flowy.ico',
iconUrl: 'https://storage.googleapis.com/flowy-releases/llink/win32/x64/flowy.ico', iconUrl: 'https://storage.googleapis.com/flowy-releases/llink/win32/x64/flowy.ico',
windowsSign windowsSign
})), })),
new MakerZIP((arch) => ({ new MakerZIP((arch) => ({
macUpdateManifestBaseUrl: `https://storage.googleapis.com/flowy-releases/llink/darwin/${arch}` macUpdateManifestBaseUrl: `https://storage.googleapis.com/flowy-releases/llink/darwin/${arch}`
}), ['darwin']), }), ['darwin']),
new MakerRpm({}), new MakerRpm({}),
new MakerDeb({}), new MakerDeb({}),
], ],
plugins: [ plugins: [
new VitePlugin({ new VitePlugin({
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc. // `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
// If you are familiar with Vite configuration, it will look really familiar. // If you are familiar with Vite configuration, it will look really familiar.
build: [ build: [
{ {
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`. // `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
entry: 'src/main.ts', entry: 'src/main.ts',
config: 'vite.main.config.ts', config: 'vite.main.config.ts',
target: 'main', target: 'main',
}, },
{ {
entry: 'src/preload.ts', entry: 'src/preload.ts',
config: 'vite.preload.config.ts', config: 'vite.preload.config.ts',
target: 'preload', target: 'preload',
}, },
], ],
renderer: [ renderer: [
{ {
name: 'main_window', name: 'main_window',
config: 'vite.renderer.config.mts', config: 'vite.renderer.config.mts',
}, },
{ {
name: 'autoplay_window', name: 'autoplay_window',
config: 'vite.autoplay.config.mts', config: 'vite.autoplay.config.mts',
}, },
{ {
name: 'huddle_window', name: 'huddle_window',
config: 'vite.huddle.config.mts', config: 'vite.huddle.config.mts',
}, },
{ {
name: 'screen_record_window', name: 'screen_record_window',
config: 'vite.screen-record.config.mts', config: 'vite.screen-record.config.mts',
}, },
], ],
}), }),
// Fuses are used to enable/disable various Electron functionality // Fuses are used to enable/disable various Electron functionality
// at package time, before code signing the application // at package time, before code signing the application
new FusesPlugin({ new FusesPlugin({
version: FuseVersion.V1, version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false, [FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true, [FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false, [FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true, [FuseV1Options.OnlyLoadAppFromAsar]: true,
}), }),
], ],
}; };
export default config; export default config;
View File
+84 -84
View File
@@ -1,84 +1,84 @@
{ {
"name": "Flowy.llink", "name": "Flowy.llink",
"productName": "Flowy.llink", "productName": "Flowy.llink",
"version": "1.3.0", "version": "1.3.0",
"description": "Flowy.llink is a team communication app for teams", "description": "Flowy.llink is a team communication app for teams",
"main": ".vite/build/main.js", "main": ".vite/build/main.js",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "electron-forge start", "start": "electron-forge start",
"package:mac": "APP_ENV=prod electron-forge package --arch=arm64 && APP_ENV=prod electron-forge package --arch=x64", "package:mac": "APP_ENV=prod electron-forge package --arch=arm64 && APP_ENV=prod electron-forge package --arch=x64",
"make:mac": "APP_ENV=prod electron-forge make --arch=arm64 && APP_ENV=prod electron-forge make --arch=x64", "make:mac": "APP_ENV=prod electron-forge make --arch=arm64 && APP_ENV=prod electron-forge make --arch=x64",
"make:win": "electron-forge make --platform=win32 --arch=x64", "make:win": "electron-forge make --platform=win32 --arch=x64",
"publish:win": "electron-forge publish --platform=win32 --arch=x64", "publish:win": "electron-forge publish --platform=win32 --arch=x64",
"publish:mac": "echo '\n⚠️ Have you bumped the version in package.json? (current: '$(node -p \"require('./package.json').version\")') [y/N]' && read -r answer && [ \"$answer\" = \"y\" ] && APP_ENV=prod electron-forge publish --arch=arm64 && APP_ENV=prod electron-forge publish --arch=x64", "publish:mac": "echo '\n⚠️ Have you bumped the version in package.json? (current: '$(node -p \"require('./package.json').version\")') [y/N]' && read -r answer && [ \"$answer\" = \"y\" ] && APP_ENV=prod electron-forge publish --arch=arm64 && APP_ENV=prod electron-forge publish --arch=x64",
"invalidate-gcs-cache": "gsutil setmeta -h 'Cache-Control:no-cache, no-store, must-revalidate' gs://flowy-releases/llink/darwin/arm64/RELEASES.json && gsutil setmeta -h 'Cache-Control:no-cache, no-store, must-revalidate' gs://flowy-releases/llink/darwin/x64/RELEASES.json && gsutil setmeta -h 'Cache-Control:no-cache, no-store, must-revalidate' gs://flowy-releases/llink/win32/x64/RELEASES", "invalidate-gcs-cache": "gsutil setmeta -h 'Cache-Control:no-cache, no-store, must-revalidate' gs://flowy-releases/llink/darwin/arm64/RELEASES.json && gsutil setmeta -h 'Cache-Control:no-cache, no-store, must-revalidate' gs://flowy-releases/llink/darwin/x64/RELEASES.json && gsutil setmeta -h 'Cache-Control:no-cache, no-store, must-revalidate' gs://flowy-releases/llink/win32/x64/RELEASES",
"lint": "eslint --ext .ts,.tsx .", "lint": "eslint --ext .ts,.tsx .",
"compile": "npx tsc --noEmit 2>&1 | grep '^src/'" "compile": "npx tsc --noEmit 2>&1 | grep '^src/'"
}, },
"keywords": [], "keywords": [],
"author": { "author": {
"name": "talksik", "name": "talksik",
"email": "[email protected]" "email": "[email protected]"
}, },
"license": "MIT", "license": "MIT",
"packageManager": "[email protected]", "packageManager": "[email protected]",
"devDependencies": { "devDependencies": {
"@electron-forge/cli": "^7.11.1", "@electron-forge/cli": "^7.11.1",
"@electron-forge/maker-deb": "^7.11.1", "@electron-forge/maker-deb": "^7.11.1",
"@electron-forge/maker-rpm": "^7.11.1", "@electron-forge/maker-rpm": "^7.11.1",
"@electron-forge/maker-squirrel": "^7.11.1", "@electron-forge/maker-squirrel": "^7.11.1",
"@electron-forge/maker-zip": "^7.11.1", "@electron-forge/maker-zip": "^7.11.1",
"@electron-forge/plugin-auto-unpack-natives": "^7.11.1", "@electron-forge/plugin-auto-unpack-natives": "^7.11.1",
"@electron-forge/plugin-fuses": "^7.11.1", "@electron-forge/plugin-fuses": "^7.11.1",
"@electron-forge/plugin-vite": "^7.11.1", "@electron-forge/plugin-vite": "^7.11.1",
"@electron-forge/publisher-gcs": "^7.11.1", "@electron-forge/publisher-gcs": "^7.11.1",
"@electron/fuses": "^1.8.0", "@electron/fuses": "^1.8.0",
"@tailwindcss/vite": "^4.2.0", "@tailwindcss/vite": "^4.2.0",
"@tanstack/eslint-plugin-query": "^5.91.4", "@tanstack/eslint-plugin-query": "^5.91.4",
"@types/electron-squirrel-startup": "^1.0.2", "@types/electron-squirrel-startup": "^1.0.2",
"@types/node": "^25.3.0", "@types/node": "^25.3.0",
"@types/react": "^19.2.14", "@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0", "@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-react": "^5.1.4", "@vitejs/plugin-react": "^5.1.4",
"electron": "40.6.0", "electron": "40.6.0",
"eslint": "^8.57.1", "eslint": "^8.57.1",
"eslint-plugin-import": "^2.32.0", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-hooks": "^7.0.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"vite": "^5.4.21" "vite": "^5.4.21"
}, },
"dependencies": { "dependencies": {
"@livekit/components-react": "^2.9.20", "@livekit/components-react": "^2.9.20",
"@livekit/components-styles": "^1.2.0", "@livekit/components-styles": "^1.2.0",
"@sentry/electron": "^7.11.0", "@sentry/electron": "^7.11.0",
"@tanstack/react-query": "^5.90.21", "@tanstack/react-query": "^5.90.21",
"class-variance-authority": "^0.7.1", "class-variance-authority": "^0.7.1",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"electron-squirrel-startup": "^1.0.1", "electron-squirrel-startup": "^1.0.1",
"firebase": "^12.10.0", "firebase": "^12.10.0",
"highlight.js": "^11.11.1", "highlight.js": "^11.11.1",
"livekit-client": "^2.18.0", "livekit-client": "^2.18.0",
"lucide-react": "^0.575.0", "lucide-react": "^0.575.0",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"radix-ui": "^1.4.3", "radix-ui": "^1.4.3",
"react": "^19.2.4", "react": "^19.2.4",
"react-dom": "^19.2.4", "react-dom": "^19.2.4",
"react-error-boundary": "^6.1.1", "react-error-boundary": "^6.1.1",
"react-markdown": "^10.1.0", "react-markdown": "^10.1.0",
"react-router-dom": "^7.13.0", "react-router-dom": "^7.13.0",
"react-use": "^17.6.0", "react-use": "^17.6.0",
"rehype-highlight": "^7.0.2", "rehype-highlight": "^7.0.2",
"remark-gfm": "^4.0.1", "remark-gfm": "^4.0.1",
"shadcn": "^3.8.5", "shadcn": "^3.8.5",
"sonner": "^2.0.7", "sonner": "^2.0.7",
"tailwind-merge": "^3.5.0", "tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.0", "tailwindcss": "^4.2.0",
"tw-animate-css": "^1.4.0", "tw-animate-css": "^1.4.0",
"update-electron-app": "^3.1.2", "update-electron-app": "^3.1.2",
"zod": "^4.3.6", "zod": "^4.3.6",
"zustand": "^5.0.11" "zustand": "^5.0.11"
} }
} }
View File

Some files were not shown because too many files have changed in this diff Show More