Skip to content

feat(client): added capacitor app for web#2740

Open
ayush-teon wants to merge 52 commits intoOutlineFoundation:masterfrom
nthlink:nthlink/capacitor-browser
Open

feat(client): added capacitor app for web#2740
ayush-teon wants to merge 52 commits intoOutlineFoundation:masterfrom
nthlink:nthlink/capacitor-browser

Conversation

@ayush-teon
Copy link
Copy Markdown

No description provided.

ayush-teon and others added 30 commits July 15, 2025 20:53
* Capacitor App added

* Updated Comments

* Updated Comments

* Comments addressed and updated

* Splash & Icon images removed

* Update README.md
* Capacitor App added

* Updated Comments

* Updated Comments

* Comments addressed and updated

* Splash & Icon images removed

* Update README.md

* Streamlined package.json

* Actions added to capacitor

* Addressed package.json review comments.

* Updated build and setup

* Package updated

* Setup and Build files updated

* Setup file updated

* Build and Setup files updated

* Build, Setup and Package files updated

* Build, Setup and Package files updated

* Gitignore, Setup and Package files updated

* Setup and Gradle settings updated

* Updated Readme and title

---------

Co-authored-by: Zahirul Islam <[email protected]>
Zahirul Islam and others added 22 commits October 22, 2025 16:33
…lidation

Nthlink/capacitor migration key validation
* UI fixes for Capacitor

* UI fixes for Capacitor

* Fixed Capacitor UI

* Removed listeners

* Event listeners updated

* Update client/web/views/root_view/add_access_key_dialog/index.ts

Co-authored-by: J. Yi <[email protected]>

---------

Co-authored-by: J. Yi <[email protected]>
…and iOS (#7)

* UI fixes for Capacitor

* UI fixes for Capacitor

* Fixed Capacitor UI

* Removed listeners

* Converted android project from Java to Kotlin

* Imported OutlineAndroidLib and added Plugin for capactior

* Imported OutlineAppleLib and added Plugin for capacitor

* Minor Fixes

* added capacitor outline plugin and web server

* Fixed sidebar and root-app height issue for ios

* Added capacitor outline plugin

* Updated cordova and capacitor build issues

* updated capacitor build for build params

* updated capacitor life cycle to register plugin

* Fixed status type casting for ios

* updated entry point html for capacitor

* Added capacitor android

* es lint fixed

* Updated ios build for vpn extension provisioning profile for PacketTunnel

* Fixed ios splash screen and external link issue on ios and android

* reverted settings.json

* Added android build folder to gitignore

* Added cordova outline plugin relative path to capacitor and removed capacitor plugin

* Added staging build configuration for capacitor ios and android

* fixed android language switch issue

* revert b6a663a server manager formatting

* revert b6a663a commit formatting

* Added templates to resolve dependencies, added generic pluginRegisterListener method and added platform based rootPath

* reverted 36e9c7b commit formatting

* revert b6a663a commit formatting

* added relative path for outline plugin

* Mac Catalyst support added

* Merge branch 'nthlink/capacitor-outline-cap-plugin', remote-tracking branch 'origin' into nthlink/capacitor-outline-debug

* revert server manager changes

* revert previous messages

* reverted to latest merged master branch

* revert outlinePlugin change in cordova plugins

* Build updated

* revert eslint.json

* added closing body tag

* removed logging tag from android main activity

* added vpn extension symbolic link

* updated copyright text

* Bundle IDs updated

* Spawn stream reverted

* Updated build config for production

* updated build action for android debug

* added hot reloading for android and ios for development and updated page UI issues

* reverted merged files

* reverted UI files

* added browser plugin for external link handling

* App Groups bundle ID updated

* removed patch package and revert lock file

* added comments in AppDelegate and refactored sync files

* removed ios integration

* Icon added for android build

* Update client/capacitor/README.md

Co-authored-by: J. Yi <[email protected]>

---------

Co-authored-by: Ayush Kumar Sethi <[email protected]>
Co-authored-by: Hasnainhanifse <[email protected]>
Co-authored-by: J. Yi <[email protected]>
)

* UI fixes for Capacitor

* UI fixes for Capacitor

* Fixed Capacitor UI

* Removed listeners

* Converted android project from Java to Kotlin

* Imported OutlineAndroidLib and added Plugin for capactior

* Imported OutlineAppleLib and added Plugin for capacitor

* Minor Fixes

* added capacitor outline plugin and web server

* Fixed sidebar and root-app height issue for ios

* Added capacitor outline plugin

* Updated cordova and capacitor build issues

* updated capacitor build for build params

* updated capacitor life cycle to register plugin

* Fixed status type casting for ios

* updated entry point html for capacitor

* Added capacitor android

* es lint fixed

* Updated ios build for vpn extension provisioning profile for PacketTunnel

* Fixed ios splash screen and external link issue on ios and android

* reverted settings.json

* Added android build folder to gitignore

* Added cordova outline plugin relative path to capacitor and removed capacitor plugin

* Added staging build configuration for capacitor ios and android

* fixed android language switch issue

* revert b6a663a server manager formatting

* revert b6a663a commit formatting

* Added templates to resolve dependencies, added generic pluginRegisterListener method and added platform based rootPath

* reverted 36e9c7b commit formatting

* revert b6a663a commit formatting

* added relative path for outline plugin

* Mac Catalyst support added

* Merge branch 'nthlink/capacitor-outline-cap-plugin', remote-tracking branch 'origin' into nthlink/capacitor-outline-debug

* revert server manager changes

* revert previous messages

* reverted to latest merged master branch

* revert outlinePlugin change in cordova plugins

* Build updated

* revert eslint.json

* added closing body tag

* removed logging tag from android main activity

* added vpn extension symbolic link

* updated copyright text

* Bundle IDs updated

* Spawn stream reverted

* Updated build config for production

* updated build action for android debug

* added hot reloading for android and ios for development and updated page UI issues

* reverted merged files

* reverted UI files

* added browser plugin for external link handling

* App Groups bundle ID updated

* removed patch package and revert lock file

* added comments in AppDelegate and refactored sync files

* Fixed iOS removed mac config

* Code Signing Updated for Capacitor iOS

* Bundle ID Updated for VPN extension on Capacitor iOS

---------

Co-authored-by: Hasnainhanifse <[email protected]>
* fix: feedback implemented

* updated capacitor build script with npx cap copy and removed scripts

* Updates to readme and package

---------

Co-authored-by: Muhammad Asad <[email protected]>
Co-authored-by: Hasnainhanifse <[email protected]>
* updated contact view unit tests

* updated taskfile.yml for go license check workflow task

* fixed parser project error for capacitor files

* fixed lint workflow by adding ignore  lint checking

* fixed swift package issue

---------

Co-authored-by: Hasnainhanifse <[email protected]>
* updated contact view unit tests

* updated taskfile.yml for go license check workflow task

* fixed parser project error for capacitor files

* fixed lint workflow by adding ignore  lint checking

* fixed swift package issue

* updated lint errors for remaining files

---------

Co-authored-by: Hasnainhanifse <[email protected]>
* updated contact view unit tests

* updated taskfile.yml for go license check workflow task

* fixed parser project error for capacitor files

* fixed lint workflow by adding ignore  lint checking

* fixed swift package issue

* updated lint errors for remaining files

* updated empty commit

---------

Co-authored-by: Ayush Kumar Sethi <[email protected]>
* updated contact view unit tests

* updated taskfile.yml for go license check workflow task

* fixed parser project error for capacitor files

* fixed lint workflow by adding ignore  lint checking

* fixed swift package issue

* updated lint errors for remaining files

* updated empty commit

* ensure receiver checks satisfy CodeQL intent verification

---------

Co-authored-by: Hasnainhanifse <[email protected]>
Co-authored-by: Hasnain Hanif <[email protected]>
* updated contact view unit tests

* updated taskfile.yml for go license check workflow task

* fixed parser project error for capacitor files

* fixed lint workflow by adding ignore  lint checking

* fixed swift package issue

* updated lint errors for remaining files

* updated empty commit

* ensure receiver checks satisfy CodeQL intent verification

* added codeql comment to suppress intent verification alert

* add timeout for chromium version fetching

---------

Co-authored-by: Hasnainhanifse <[email protected]>
Co-authored-by: Hasnain Hanif <[email protected]>
@ayush-teon ayush-teon requested a review from a team as a code owner April 6, 2026 18:21
window.onload = start;
function start() {
getDeviceInfo().then(info => {
document.body.innerHTML = JSON.stringify(info, null, 4);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you setting the document body? Also, setting the innerHTML is often unsafe. This is very strange.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate with mispeled name.

Please review the code and let us know when you've done so.

],
"scripts": {
"clean": "rm -rf node_modules",
"cap:sync:ios": "node build/cap-sync-ios.mjs",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you adding this? We should be able to just use cap sync directly.

**Debug mode:**

```sh
npm run action client/capacitor/build capacitor-ios
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the capacitor command line here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove Android code from this PR

return Boolean(capacitor?.isNativePlatform?.());
}

export function isCapacitorBrowserPlatform(): boolean {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unused. Delete

import {SentryErrorReporter, Tags} from '../shared/error_reporter';

const isCapacitorRuntime = isCapacitorPlatform();
const isNativeCapacitorPlatform = isCapacitorNativePlatform();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this? You are already in the Capacitor main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me we need this file, given we have a Capacitor-specific main. We can probably delete it.

},
"scripts": {
"clean": "rm -rf output node_modules www platforms plugins",
"clean": "rm -rf output node_modules www platforms plugins capacitor/android/app/src/main/res/mipmap-* capacitor/android/app/src/main/res/drawable/splash.png capacitor/android/app/src/main/res/drawable* capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/[email protected] capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Default@*",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me whether we should delete all the images.

.DS_Store
.sourcemaps
**/output/
**/icons/ No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear to me why we are ignoring the icons

// limitations under the License.

import * as Sentry from '@sentry/browser';
// eslint-disable-next-line n/no-extraneous-import
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add this?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this file? It seems exactly the same as the cordova one.

}

quitApplication() {
pluginExec<void>('quitApplication').catch((err: unknown) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call CapacitorPluginOutine.quitApplication() here instead of pluginExec

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this file. Capacitor already gives us this functionality.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

import {CapacitorVpnApi} from './outline_server_repository/vpn.capacitor';
import {FakeVpnApi} from './outline_server_repository/vpn.fake';
import {OutlinePlatform} from './platform';
import {pluginExec} from './plugin.capacitor';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't import pluginExec. Replace with calls to CapacitorPluginOutline instead

super(appVersion, dsn, tags);
this.hasNativeErrorReporting = Boolean(dsn && dsn.trim().length > 0);
if (this.hasNativeErrorReporting) {
pluginExec<void>('initializeErrorReporting', dsn.trim()).catch(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call CapacitorPluginOutline directly. Same in all the other places below.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revert the Android and iOS code in this web PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants