Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor44 committed Jan 11, 2024
2 parents 94b4ddc + f86cc57 commit be0cd32
Show file tree
Hide file tree
Showing 108 changed files with 294 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
runtime = electron
disturl = https://electronjs.org/headers
target = 25.9.4
target = 25.9.8
4 changes: 3 additions & 1 deletion app/app-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export default class BrowserXAppMain extends EventEmitter {
if (typeof this.onOpen === 'function') {
await this.onOpen();
}

});
app.on('session-created', (session) => {
enhanceSession(session);
})
}

// eslint-disable-next-line class-methods-use-this
Expand Down
4 changes: 4 additions & 0 deletions app/applications/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export interface OwnProps {
applicationIcon: Maybe<string>,
themeColor: Maybe<string>,
notUseNativeWindowOpen: Maybe<boolean>,
useDefaultSession: Maybe<boolean>,

appFocus: Maybe<number>,
isOnline: Maybe<boolean>,
Expand Down Expand Up @@ -407,6 +408,7 @@ class ApplicationImpl extends React.PureComponent {
crashed, errorCode, errorDescription,
canGoBack, themeGradient, email,
promptBasicAuth, performBasicAuth, basicAuthInfo,
useDefaultSession,
} = this.props;

return (
Expand Down Expand Up @@ -454,6 +456,7 @@ class ApplicationImpl extends React.PureComponent {
allowpopups={true}
loading={this.props.loading}
webviewRef={this.setWebviewRef}
partition={useDefaultSession ? '' : `persist:${applicationId}`}
onPageTitleUpdated={this.handleTitleUpdated}
onPageFaviconUpdated={this.handleFaviconUpdated}
onDidStartLoading={this.handleDidStartLoading}
Expand Down Expand Up @@ -489,6 +492,7 @@ const Application = compose(
applicationIcon: manifestData.interpretedIconURL(),
themeColor: manifestData.theme_color(),
notUseNativeWindowOpen: manifestData.bx_not_use_native_window_open_on_host(),
useDefaultSession: manifestData.bx_use_default_session(),

isOnline: stationStatus.isOnline(),
appFocus: stationStatus.focus(),
Expand Down
1 change: 1 addition & 0 deletions app/applications/manifest-provider/bxAppManifest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface BxAppManifest {
bx_keep_always_loaded?: boolean;
bx_not_use_native_window_open_on_host?: boolean;
bx_no_dock?: boolean;
bx_use_default_session?: boolean;
bx_single_page?: boolean;
bx_multi_instance_config?: MultiInstanceConfig;
bx_legacy_service_id?: string;
Expand Down
1 change: 1 addition & 0 deletions app/applications/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ query GetApplicationState($applicationId: String!, $tabId: String) @live @local
instance_wording,
},
bx_not_use_native_window_open_on_host,
bx_use_default_session,
bx_legacy_service_id,
},
isSnoozed,
Expand Down
2 changes: 2 additions & 0 deletions app/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ type ManifestData {
bx_legacy_service_id: String,
"""Native window on host"""
bx_not_use_native_window_open_on_host: Boolean,
"""true - use default shared session. false or unset - isolated session for each app instance"""
bx_use_default_session: Boolean,
"""Application Chrome Extension ID"""
cxExtensionId: ID,
}
Expand Down
3 changes: 1 addition & 2 deletions app/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* tslint:disable global-require, no-import-side-effect */
import './dotenv';
import { app, session, BrowserWindow, ipcMain, dialog } from 'electron';
import { app, BrowserWindow, ipcMain, dialog } from 'electron';
import log, { LevelOption } from 'electron-log';
// @ts-ignore: no declaration file
import { format } from 'electron-log/lib/format';
Expand All @@ -11,7 +11,6 @@ import { BrowserWindowManagerServiceImpl } from './services/services/browser-win
import services from './services/servicesManager';
import { getUrlToLoad } from './utils/dev';
import { isPackaged } from './utils/env';
import { enhanceSession } from './session';
import * as remoteMain from '@electron/remote/main';

bootServices(); // all side effects related to services (in main process)
Expand Down
18 changes: 16 additions & 2 deletions app/services/services/tab-webcontents/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,17 @@ export class TabWebContentsServiceImpl extends TabWebContentsService implements
*/
isNewWindowForUserRequest(details: HandlerDetails): boolean {

if (details.url.startsWith('about:blank')) {
if (details.url.startsWith('about:blank')
|| details.url.startsWith('https://accounts.google.com/o/oauth2/')) {
return true;
}

if (details.features) {
let noLocation = false;
let noToolbar = false;
let noMenubar = false;
let popup = false;
const trueValues = ['yes', 'true', '1'];
const falseValues = ['no', 'false', '0'];
for (const featureString of details.features.split(',')) {
const pair = featureString.split('=');
Expand All @@ -240,12 +243,23 @@ export class TabWebContentsServiceImpl extends TabWebContentsService implements
else if (key === 'menubar') {
noMenubar = falseValues.includes(value);
}
else if (key === 'popup') {
popup = trueValues.includes(value);
}
}
}
if (noLocation && noToolbar && noMenubar) {
if (popup
|| noLocation && noToolbar && noMenubar) {
return true;
}
}

if (details.frameName) {
if (!['_self', '_blank', '_parent', '_top'].includes(details.frameName)) {
return true;
}
}

return false;
}

Expand Down
2 changes: 1 addition & 1 deletion appstore/src/applications/mockedMostPopularApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ const TMP_MOST_POP_APPS = {
},
themeColor: '#66CC66',
iconURL: 'https://cdn.filestackcontent.com/sBL5CRfZQYqJwEdx7CPg',
startURL: 'https://3.basecamp.com/sign_in',
startURL: 'https://launchpad.37signals.com/signin',
isChromeExtension: false,
bxAppManifestURL:
'http://localhost:4001/application-recipe/87/bxAppManifest.json',
Expand Down
1 change: 1 addition & 0 deletions manifests/definitions/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"scope": "station://appstore",
"bx_no_dock": true,
"doNotList": true,
"bx_use_default_session": true,
"bx_legacy_service_id": "appstore"
}
14 changes: 14 additions & 0 deletions manifests/definitions/10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "ChatGPT",
"category": "Communication & Collaboration",
"start_url": "https://chat.openai.com/auth/login",
"icons": [
{
"src": "https://cdn.filestackcontent.com/qSWM6gNhTKWqRg843wIh",
"platform": "browserx"
}
],
"theme_color": "#FFFFFF",
"scope": "https://chat.openai.com/",
"bx_legacy_service_id": "chatgpt"
}
1 change: 1 addition & 0 deletions manifests/definitions/100.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"subdomain_ui_help": "Enter your account's domain.",
"subdomain_ui_suffix": ".atlassian.net"
},
"bx_use_default_session": true,
"recommendedPosition": "23"
}
3 changes: 2 additions & 1 deletion manifests/definitions/101.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"subdomain_title": "Desk domain",
"subdomain_ui_help": "Enter your Desk account's domain.",
"subdomain_ui_suffix": ".desk.com"
}
},
"bx_use_default_session": true
}
4 changes: 2 additions & 2 deletions manifests/definitions/118.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "Finamatic",
"category": "Accounting & Finance",
"start_url": "http://finamatic.fr",
"start_url": "https://finamatic.fr",
"icons": [
{
"src": "https://cdn.filestackcontent.com/y9OagSOoSP2Y0M8GFzh6",
"platform": "browserx"
}
],
"theme_color": "#507ABD",
"scope": "http://finamatic.fr",
"scope": "https://finamatic.fr",
"bx_legacy_service_id": "finamatic"
}
3 changes: 2 additions & 1 deletion manifests/definitions/119.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"subdomain_title": "AWS domain",
"subdomain_ui_help": "Enter your account's domain.",
"subdomain_ui_suffix": ".signin.aws.amazon.com"
}
},
"bx_use_default_session": true
}
3 changes: 2 additions & 1 deletion manifests/definitions/123.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"presets": [
"on-premise"
]
}
},
"bx_use_default_session": true
}
3 changes: 2 additions & 1 deletion manifests/definitions/124.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"subdomain_title": "Gitlab domain",
"subdomain_ui_help": "Enter your team's Gitlab domain.",
"subdomain_ui_suffix": ".gitlab.com"
}
},
"bx_use_default_session": true
}
3 changes: 2 additions & 1 deletion manifests/definitions/125.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"subdomain_title": "Facebook workplace domain",
"subdomain_ui_help": "Enter your organization's Workplace domain.",
"subdomain_ui_suffix": ".facebook.com"
}
},
"bx_use_default_session": true
}
3 changes: 2 additions & 1 deletion manifests/definitions/132.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"presets": [
"on-premise"
]
}
},
"bx_use_default_session": true
}
4 changes: 2 additions & 2 deletions manifests/definitions/133.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "Discord",
"category": "Communication & Collaboration",
"start_url": "https://discordapp.com/login",
"start_url": "https://discord.com/login",
"icons": [
{
"src": "https://cdn.filestackcontent.com/jwLGcqjrT2iRg19pIUC4",
"platform": "browserx"
}
],
"theme_color": "#7289DA",
"scope": "https://discordapp.com",
"scope": "https://discord.com",
"bx_keep_always_loaded": true,
"bx_legacy_service_id": "discord",
"recommendedPosition": "15"
Expand Down
3 changes: 2 additions & 1 deletion manifests/definitions/13978.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"presets": [
"on-premise"
]
}
},
"bx_use_default_session": true
}
1 change: 1 addition & 0 deletions manifests/definitions/14.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"instance_label_tpl": "{{email}}",
"start_url_tpl": "https://accounts.google.com/AddSession?passive=true&Email={{userIdentity.profileData.email}}&continue=https://mail.google.com/mail/u/{{userIdentity.profileData.email}}"
},
"bx_use_default_session": true,
"recommendedPosition": "1"
}
2 changes: 1 addition & 1 deletion manifests/definitions/140.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Outlook",
"category": "Communication & Collaboration",
"start_url": "https://outlook.live.com",
"start_url": "https://outlook.office.com/mail/",
"icons": [
{
"src": "https://cdn.filestackcontent.com/XdVhfkeSZyYeRGAc3yc3",
Expand Down
3 changes: 2 additions & 1 deletion manifests/definitions/14076.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"instance_wording": "account",
"instance_label_tpl": "{{email}}",
"start_url_tpl": "https://accounts.google.com/AddSession?passive=true&Email={{userIdentity.profileData.email}}&continue=https://play.google.com/console"
}
},
"bx_use_default_session": true
}
7 changes: 4 additions & 3 deletions manifests/definitions/142.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "Active Campaign",
"category": "Marketing & Analytics",
"start_url": "http://www.activecampaign.com/login/",
"start_url": "https://www.activecampaign.com/login/",
"icons": [
{
"src": "https://cdn.filestackcontent.com/hjsKmsPR7mOFSvPQdzqr",
"platform": "browserx"
}
],
"theme_color": "#255EAF",
"scope": "http://www.activecampaign.com",
"scope": "https://www.activecampaign.com",
"bx_legacy_service_id": "active-campaign",
"bx_multi_instance_config": {
"presets": [
"on-premise"
]
}
},
"bx_use_default_session": true
}
4 changes: 2 additions & 2 deletions manifests/definitions/14658.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "Outlook Calendar",
"category": "Communication & Collaboration",
"start_url": "https://outlook.office365.com/calendar/",
"start_url": "https://outlook.office.com/calendar/",
"icons": [
{
"src": "https://cdn.filestackcontent.com/7XA7crEyT5awT59ziTd1",
"platform": "browserx"
}
],
"theme_color": "#0470C7",
"scope": "https://outlook.office365.com/"
"scope": "https://outlook.office.com/"
}
3 changes: 2 additions & 1 deletion manifests/definitions/152.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"presets": [
"on-premise"
]
}
},
"bx_use_default_session": true
}
1 change: 1 addition & 0 deletions manifests/definitions/156.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"instance_label_tpl": "{{email}}",
"start_url_tpl": "https://keep.google.com/{{#if moreThanOneIdentity}}u/{{userIdentity.profileData.email}}{{/if}}"
},
"bx_use_default_session": true,
"recommendedPosition": "14"
}
1 change: 1 addition & 0 deletions manifests/definitions/16.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"start_url_tpl": "https://accounts.google.com/AddSession?passive=true&Email={{userIdentity.profileData.email}}&continue=https://drive.google.com/drive/{{#if moreThanOneIdentity}}u/{{userIdentity.profileData.email}}{{/if}}",
"new_page_url_tpl": "https://drive.google.com/drive/{{#if moreThanOneIdentity}}u/{{userIdentity.profileData.email}}{{/if}}"
},
"bx_use_default_session": true,
"recommendedPosition": "3"
}
1 change: 1 addition & 0 deletions manifests/definitions/18.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"instance_label_tpl": "{{email}}",
"start_url_tpl": "https://accounts.google.com/AddSession?passive=true&Email={{userIdentity.profileData.email}}&continue=https://calendar.google.com/calendar/{{#if moreThanOneIdentity}}b/{{userIdentity.profileData.email}}{{/if}}"
},
"bx_use_default_session": true,
"recommendedPosition": "2"
}
3 changes: 2 additions & 1 deletion manifests/definitions/208.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"instance_wording": "account",
"instance_label_tpl": "{{email}}",
"start_url_tpl": "https://accounts.google.com/AddSession?passive=true&Email={{userIdentity.profileData.email}}&continue=https://tagmanager.google.com"
}
},
"bx_use_default_session": true
}
1 change: 1 addition & 0 deletions manifests/definitions/21.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"subdomain_ui_help": "Enter your team's Slack domain.",
"subdomain_ui_suffix": ".slack.com"
},
"bx_use_default_session": true,
"main": "slack/main",
"renderer": "slack/renderer",
"recommendedPosition": "5"
Expand Down
3 changes: 2 additions & 1 deletion manifests/definitions/214.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"instance_wording": "account",
"instance_label_tpl": "{{email}}",
"start_url_tpl": "https://accounts.google.com/AddSession?passive=true&Email={{userIdentity.profileData.email}}&continue=https://contacts.google.com"
}
},
"bx_use_default_session": true
}
Loading

0 comments on commit be0cd32

Please sign in to comment.