8 files changed
+1064
-804
No files matched your search
@@ -26,6 +26,14 @@ export default function initializeMockIPC (server) {
|
||||
return this.origin;
|
||||
}
|
||||
|
||||
resetOrigin() {
|
||||
this.origin = null;
|
||||
}
|
||||
|
||||
openExternal(href) {
|
||||
window.open(href);
|
||||
}
|
||||
|
||||
cliExists() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import Ember from 'ember';
|
||||
import jQuery from 'jquery';
|
||||
/* eslint-disable-next-line ember/no-mixins */
|
||||
import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
|
||||
import { inject as service } from '@ember/service';
|
||||
@@ -16,6 +17,7 @@ export default class ApplicationRoute extends Route.extend(
|
||||
|
||||
@service session;
|
||||
@service origin;
|
||||
@service ipc;
|
||||
|
||||
// =attributes
|
||||
|
||||
@@ -33,6 +35,18 @@ export default class ApplicationRoute extends Route.extend(
|
||||
return this.origin.updateOrigin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds listener on target=_blank links so that they may be opened in an
|
||||
* external browser.
|
||||
*/
|
||||
afterModel() {
|
||||
const ipc = this.ipc;
|
||||
/* eslint-disable-next-line ember/no-jquery */
|
||||
jQuery(document).on('click', 'a[href][target="_blank"]', function () {
|
||||
ipc.invoke('openExternal', this.href);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* After becoming authenticated, does nothing. This overrides the default
|
||||
* behavior of the ApplicationRouteMixin, which is to redirect after auth.
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.session.title_plural"}}</h2>
|
||||
<h2>
|
||||
{{t "resources.session.title_plural"}}
|
||||
<DocLink @doc="sessions" @iconSize="large" />
|
||||
</h2>
|
||||
<p>{{t "resources.session.description"}}</p>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<page.header>
|
||||
<h2>
|
||||
{{t "resources.target.title_plural"}}
|
||||
<DocLink @doc="targets" @iconSize="large" />
|
||||
</h2>
|
||||
<p>{{t "resources.target.description"}}</p>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
|
||||
@@ -44,6 +44,14 @@ module.exports = function (environment) {
|
||||
|
||||
notifyTimeout: 4000,
|
||||
sessionPollingTimeoutSeconds: 2.5,
|
||||
|
||||
documentation: {
|
||||
baseURL: 'https://boundaryproject.io/help/desktop',
|
||||
topics: {
|
||||
targets: '/targets',
|
||||
sessions: '/sessions'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.ENABLE_MIRAGE) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const { shell } = require('electron');
|
||||
const handle = require('./ipc-handler');
|
||||
const boundaryCli = require('./boundary-cli');
|
||||
const origin = require('./origin.js');
|
||||
@@ -24,6 +25,13 @@ handle('resetOrigin', async (requestOrigin) => {
|
||||
origin.resetOrigin();
|
||||
});
|
||||
|
||||
/**
|
||||
* Opens the specified URL in an external browser.
|
||||
*/
|
||||
handle('openExternal', async (href) => {
|
||||
shell.openExternal(href);
|
||||
});
|
||||
|
||||
/**
|
||||
* Check for boundary cli existence
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@doyensec/electronegativity": "^1.7.0",
|
||||
"@ember/jquery": "^1.1.0",
|
||||
"@ember/optional-features": "^1.3.0",
|
||||
"@ember/render-modifiers": "^1.0.2",
|
||||
"@glimmer/component": "^1.0.1",
|
||||
|
||||
Reference in new issue
Block a user