Compare commits

..

1 Commits

Author SHA1 Message Date
Kerry Archibald
5933950f24 add option to skip jitsi "join conference" screen
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-18 16:17:59 +01:00
14 changed files with 100 additions and 168 deletions

View File

@@ -58,9 +58,8 @@ body:
id: homeserver
attributes:
label: Homeserver
description: |
Which server is your account registered on? If it is a local or non-public homeserver, please tell us what is the homeserver implementation (ex: Synapse/Dendrite/etc.) and the version.
placeholder: e.g. matrix.org or Synapse 1.50.0rc1
description: Which server is your account registered on?
placeholder: e.g. matrix.org
validations:
required: false
- type: dropdown

View File

@@ -66,9 +66,8 @@ body:
id: homeserver
attributes:
label: Homeserver
description: |
Which server is your account registered on? If it is a local or non-public homeserver, please tell us what is the homeserver implementation (ex: Synapse/Dendrite/etc.) and the version.
placeholder: e.g. matrix.org or Synapse 1.50.0rc1
description: Which server is your account registered on?
placeholder: e.g. matrix.org
validations:
required: false
- type: dropdown

View File

@@ -1,8 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/vector-im/element-web/security/policy
about: Please review our security policy for more details
- name: Questions & support
url: https://matrix.to/#/#element-web:matrix.org
about: Please ask and answer questions here.

View File

@@ -23,7 +23,6 @@
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"defaultCountryCode": "GB",
"showLabsSettings": false,
"features": { },

View File

@@ -93,7 +93,7 @@ For a good example, see https://develop.element.io/config.json.
Defaults to `GB` if the given code is unknown or not provided.
1. `settingDefaults`: Defaults for settings that support the `config` level,
as an object mapping setting name to value (note that the "theme" setting
is special cased to the `default_theme` in the config file). See [Settings section](#settings)
is special cased to the `default_theme` in the config file).
1. `disable_custom_urls`: disallow the user to change the
default homeserver when signing up or logging in.
1. `permalinkPrefix`: Used to change the URL that Element generates permalinks with.
@@ -152,8 +152,8 @@ For a good example, see https://develop.element.io/config.json.
1. `sentry`: [Sentry](https://sentry.io/) configuration for rageshake data being sent to sentry.
1. `dsn`: the Sentry [DSN](https://docs.sentry.io/product/sentry-basics/dsn-explainer/)
2. `environment`: (optional) The [Environment](https://docs.sentry.io/product/sentry-basics/environments/) to pass to sentry
1. `map_style_url`: Map tile server style URL for location sharing. e.g.
'https://api.maptiler.com/maps/streets/style.json?key=YOUR_KEY_GOES_HERE'
1. `map_style_url`: Maptile server URL for location sharing. e.g.
'https://api.maptiler.com/maps/basic/style.json?key=YOUR_KEY_GOES_HERE'
1. `analyticsOwner`: The entity that analytics data is being sent to. Used in copy
when explaining to the user where data is being sent. If not set, defaults to `brand`.
@@ -200,80 +200,8 @@ Desktop app configuration
See https://github.com/vector-im/element-desktop#user-specified-configjson
# Settings
Defaults for settings that support the `config` level,
as an object mapping setting name to value
*Note* that the "theme" setting is special cased to the `default_theme` in the config file).
## Supported settings
* `alwaysShowTimestamps`: boolean
* `analyticsOptIn`: boolean
* `autocompleteDelay`: number
* `automaticErrorReporting`: boolean
* `autoplayGifs`: boolean
* `autoplayVideo`: boolean
* `baseFontSize`: number
* `breadcrumbs`: boolean
* `ctrlFForSearch`: boolean
* `custom_themes`
* `developerMode`: boolean
* `enableSyntaxHighlightLanguageDetection`: boolean
* `enableWidgetScreenshots`: boolean
* `expandCodeByDefault`: boolean
* `forceRoomExportParameters` - Override room export parameters. Accepts an object:
```
{
range: 'Beginning' | 'Timeline' | 'LastNMessages',
sizeMb: number, // max 100gb
format: 'Html' | 'PlainText' | 'Json',
numberOfMessages: number,
includeAttachments: boolean,
}
```
* `Images.size`: 'normal' | 'large'
* `language`: ISO language code
* `layout`: 'irc' | 'group' | 'bubble'
* `lowBandwidth`: boolean
* `MessageComposerInput.autoReplaceEmoji`: boolean
* `MessageComposerInput.ctrlEnterToSend`: boolean
* `MessageComposerInput.isRichTextEnabled`: boolean
* `MessageComposerInput.showFormatting`: boolean
* `MessageComposerInput.showLocationButton`: boolean
* `MessageComposerInput.showStickersButton`: boolean
* `MessageComposerInput.suggestEmoji`: boolean
* `MessageComposerInput.surroundWith`: boolean
* `Pill.shouldShowPillAvatar`: boolean
* `promptBeforeInviteUnknownUsers`: boolean
* `readMarkerInViewThresholdMs`: number
* `readMarkerOutOfViewThresholdMs`: number
* `RoomList.backgroundImage`
* `scrollToBottomOnMessageSent`: boolean
* `showAvatarChanges`: boolean
* `showCallButtonsInComposer`: boolean
* `showChatEffects`: boolean
* `showCodeLineNumbers`: boolean
* `showCookieBar`: boolean
* `showDeveloperTools`: boolean
* `showDisplaynameChanges`: boolean
* `showImages`: boolean
* `showJoinLeaves`: boolean
* `showReadReceipts`: boolean
* `showRedactions`: boolean
* `showTwelveHourTimestamps`: boolean
* `showTypingNotifications`: boolean
* `Spaces.allRoomsInHome`: boolean
* `TagPanel.enableTagPanel`: boolean
* `TextualBody.enableBigEmoji`: boolean
* `urlPreviewsEnabled`: boolean
* `useCustomFontSize`: number
* `VideoView.flipVideoHorizontally`: boolean
* `webRtcAllowPeerToPeer`: boolean
* `Widgets.leftPanel`
## UI Features
UI Features
===========
Parts of the UI can be disabled using UI features. These are settings which appear
under `settingDefaults` and can only be `true` (default) or `false`. When `false`,

View File

@@ -16,10 +16,6 @@ provide their own approaches for adding Jitsi widgets.
## Configuring Element to use your self-hosted Jitsi server
You can host your own Jitsi server to use with Element. It's usually advisable to use a recent
version of Jitsi. In particular, versions older than around 6826 will cause problems with
Element 1.9.10 or newer.
Element will use the Jitsi server that is embedded in the widget, even if it is not the
one you configured. This is because conference calls must be held on a single Jitsi
server and cannot be split over multiple servers.
@@ -34,8 +30,8 @@ to your [config](./config.md) the following:
}
```
Element's default is `meet.element.io` (a free service offered by Element). `meet.jit.si`
is an instance hosted by Jitsi themselves and is also free to use.
The default is `meet.element.io` (a free service offered by Element), and the demo site for
Jitsi uses `meet.jit.si` (also free).
Once you've applied the config change, refresh Element and press the call button. This
should start a new conference on your Jitsi server.

View File

@@ -126,6 +126,24 @@ and notification noises are suppressed. Not perfect, but can help reduce noise.
Enables sending hidden read receipts as per [MSC2285](https://github.com/matrix-org/matrix-doc/pull/2285)
## New layout switcher (with message bubbles) (`feature_new_layout_switcher`)
Adds a "Message layout" section under `Settings -> Appearance`, where the user can select their preferred message layout (e.g. IRC or Modern). Additionally, adds a new "Message bubbles" layout.
## Polls (`feature_polls`) [In Development]
Polls are a way to gauge interest from your community about a certain topic with a simple voting mechanic
within the message timeline. Note that this feature is currently under active development and therefore is
entirely incomplete and may not work at all - it is not recommended for general use at this time.
Bug reports, feature requests, etc are not currently accepted for this feature flag. A later stage of
development will provide opportunities for feedback.
## Metaspaces (`feature_spaces_metaspaces`) [In Development]
Metaspaces are automatically populated spaces you can enable in your Space panel.
By default, you'll have Home or All rooms, but you can opt in to a People, Favourites, and Other Rooms metaspace too.
## Location sharing (`feature_location_share`) [In Development]
Allows users to send and display location data using [maplibre](https://maplibre.org).
@@ -135,9 +153,9 @@ demonstrate viability and prove [MSC3488](https://github.com/matrix-org/matrix-d
and [MSC3489](https://github.com/matrix-org/matrix-doc/pull/3489) - **the UI has not yet
been designed, and it will not exit labs until it has**.
For this to work, you must specify the URL of a valid map tile server style file in
the `map_style_url` setting in config.json.
For example: "https://api.maptiler.com/maps/streets/style.json?key=YOUR_KEY_GOES_HERE"`
For this to work, you must specify a valid maptiler.com API key in
`"map_style_url": "https://api.maptiler.com/maps/basic/style.json?key=YOUR_KEY_GOES_HERE"`
in your config.json, or find an alternative map tile server.
## Breadcrumbs v2 (`feature_breadcrumbs_v2`)
@@ -163,12 +181,3 @@ the sender is using unknown/unrecognised event types.
Sending events with extensible events structure is always enabled - this should not affect any downstream
client.
## Right panel stays open (`feature_right_panel_default_open`)
This is an experimental default open right panel mode as a quick fix for those
who prefer to have the right panel open consistently across rooms.
If no right panel state is known for the room or it was closed on the last room
visit, it will default to the room member list. Otherwise, the saved card last
used in that room is shown.

View File

@@ -12,7 +12,6 @@
],
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"showLabsSettings": false,
"piwik": {
"url": "https://piwik.riot.im/",

View File

@@ -12,7 +12,6 @@
],
"hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web",
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"showLabsSettings": true,
"piwik": {
"url": "https://piwik.riot.im/",
@@ -58,6 +57,8 @@
"projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"apiHost": "https://posthog.hss.element.io"
},
"features": {},
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
"features": {
"feature_spaces_metaspaces": true
},
"map_style_url": "https://api.maptiler.com/maps/basic/style.json?key=JCdnMQY3oGklTYYLIvtI"
}

View File

@@ -46,7 +46,7 @@
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,reskindex-react,res,element-js \"yarn reskindex:watch\" \"yarn reskindex:watch-react\" \"yarn start:res\" \"yarn start:js\"",
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n reskindex,reskindex-react,res,element-js \"yarn reskindex:watch\" \"yarn reskindex:watch-react\" \"yarn start:res\" \"yarn start:js --https\"",
"start:res": "yarn build:jitsi && node scripts/copy-res.js -w",
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --mode development --disable-host-check --hot",
"start:js": "webpack-dev-server --host=0.0.0.0 --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --progress --mode development --disable-host-check --hot",
"lint": "yarn lint:types && yarn lint:js && yarn lint:style",
"lint:js": "eslint --max-warnings 0 src",
"lint:js-fix": "eslint --fix src",
@@ -131,7 +131,7 @@
"minimist": "^1.2.5",
"mkdirp": "^1.0.4",
"modernizr": "^3.11.7",
"node-fetch": "^2.6.7",
"node-fetch": "^2.6.1",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-easings": "^2.0.0",
"postcss-extend": "^1.0.5",

View File

@@ -12,8 +12,7 @@
"Dismiss": "Dismiss",
"Switch to space by number": "Switch to space by number",
"Open user settings": "Open user settings",
"Previous recently visited room or community": "Previous recently visited room or community",
"Next recently visited room or community": "Next recently visited room or community",
"Previous/next recently visited room or community": "Previous/next recently visited room or community",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
"Go to your browser to complete Sign In": "Go to your browser to complete Sign In",
"Unknown device": "Unknown device",

View File

@@ -47,6 +47,7 @@ let roomId: string;
let openIdToken: IOpenIDCredentials;
let roomName: string;
let startAudioOnly: boolean;
let launchJitsiImmediately: boolean;
let widgetApi: WidgetApi;
let meetApi: any; // JitsiMeetExternalAPI
@@ -57,6 +58,7 @@ let meetApi: any; // JitsiMeetExternalAPI
const widgetQuery = new URLSearchParams(window.location.hash.substring(1));
// The widget spec on the other hand requires the widgetId and parentUrl to show up in the regular query string.
const realQuery = new URLSearchParams(window.location.search.substring(1));
const qsParam = (name: string, optional = false): string => {
const vals = widgetQuery.has(name) ? widgetQuery.getAll(name) : realQuery.getAll(name);
if (!optional && vals.length !== 1) {
@@ -109,6 +111,11 @@ let meetApi: any; // JitsiMeetExternalAPI
roomId = qsParam('roomId', true);
roomName = qsParam('roomName', true);
startAudioOnly = qsParam('isAudioOnly', true) === "true";
launchJitsiImmediately = qsParam('launchImmediately', true) === "true";
if (launchJitsiImmediately) {
toggleConferenceVisibility(true);
}
if (widgetApi) {
await readyPromise;
@@ -147,6 +154,10 @@ let meetApi: any; // JitsiMeetExternalAPI
);
}
if (launchJitsiImmediately) {
joinConference();
}
enableJoinButton(); // always enable the button
} catch (e) {
logger.error("Error setting up Jitsi widget", e);
@@ -160,8 +171,13 @@ function enableJoinButton() {
function switchVisibleContainers() {
inConference = !inConference;
document.getElementById("jitsiContainer").style.visibility = inConference ? 'unset' : 'hidden';
document.getElementById("joinButtonContainer").style.visibility = inConference ? 'hidden' : 'unset';
if (!launchJitsiImmediately) {
toggleConferenceVisibility(inConference);
}
}
function toggleConferenceVisibility(isConferenceVisible) {
document.getElementById("jitsiContainer").style.visibility = isConferenceVisible ? 'unset' : 'hidden';
document.getElementById("joinButtonContainer").style.visibility = isConferenceVisible ? 'hidden' : 'unset';
}
/**
@@ -218,6 +234,12 @@ function joinConference() { // event handler bound in HTML
switchVisibleContainers();
if (widgetApi) {
// ignored promise because we don't care if it works
// noinspection JSIgnoredPromiseFromCall
widgetApi.setAlwaysOnScreen(true);
}
logger.warn(
"[Jitsi Widget] The next few errors about failing to parse URL parameters are fine if " +
"they mention 'external_api' or 'jitsi' in the stack. They're just Jitsi Meet trying to parse " +
@@ -246,16 +268,6 @@ function joinConference() { // event handler bound in HTML
if (userId) meetApi.executeCommand("email", userId);
if (roomName) meetApi.executeCommand("subject", roomName);
// fires once when user joins the conference
// (regardless of video on or off)
meetApi.on("videoConferenceJoined", () => {
if (widgetApi) {
// ignored promise because we don't care if it works
// noinspection JSIgnoredPromiseFromCall
widgetApi.setAlwaysOnScreen(true);
}
});
meetApi.on("readyToClose", () => {
switchVisibleContainers();
@@ -267,5 +279,10 @@ function joinConference() { // event handler bound in HTML
document.getElementById("jitsiContainer").innerHTML = "";
meetApi = null;
// return to jitsi splash if immediate join enabled
if (launchJitsiImmediately) {
joinConference();
}
});
}

View File

@@ -3,7 +3,6 @@ Copyright 2016 Aviral Dasgupta
Copyright 2016 OpenMarket Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2018 - 2021 New Vector Ltd
Copyright 2022 Šimon Brandner <simon.bra.ag@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -35,8 +34,10 @@ import Modal from "matrix-react-sdk/src/Modal";
import InfoDialog from "matrix-react-sdk/src/components/views/dialogs/InfoDialog";
import Spinner from "matrix-react-sdk/src/components/views/elements/Spinner";
import {
CategoryName,
Categories,
CMD_OR_CTRL,
DIGITS,
Modifiers,
registerShortcut,
} from "matrix-react-sdk/src/accessibility/KeyboardShortcuts";
import { isOnlyCtrlOrCmdKeyEvent, Key } from "matrix-react-sdk/src/Keyboard";
@@ -286,50 +287,43 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
// register OS-specific shortcuts
registerShortcut("KeyBinding.switchToSpaceByNumber", CategoryName.NAVIGATION, {
default: {
ctrlOrCmdKey: true,
registerShortcut(Categories.NAVIGATION, {
keybinds: [{
modifiers: [CMD_OR_CTRL],
key: DIGITS,
},
displayName: _td("Switch to space by number"),
}],
description: _td("Switch to space by number"),
});
if (isMac) {
registerShortcut("KeyBinding.openUserSettings", CategoryName.NAVIGATION, {
default: {
commandKey: true,
registerShortcut(Categories.NAVIGATION, {
keybinds: [{
modifiers: [Modifiers.COMMAND],
key: Key.COMMA,
},
displayName: _td("Open user settings"),
}],
description: _td("Open user settings"),
});
registerShortcut("KeyBinding.previousVisitedRoomOrCommunity", CategoryName.NAVIGATION, {
default: {
commandKey: true,
registerShortcut(Categories.NAVIGATION, {
keybinds: [{
modifiers: [Modifiers.COMMAND],
key: Key.SQUARE_BRACKET_LEFT,
},
displayName: _td("Previous recently visited room or community"),
});
registerShortcut("KeyBinding.nextVisitedRoomOrCommunity", CategoryName.NAVIGATION, {
default: {
commandKey: true,
}, {
modifiers: [Modifiers.COMMAND],
key: Key.SQUARE_BRACKET_RIGHT,
},
displayName: _td("Next recently visited room or community"),
}],
description: _td("Previous/next recently visited room or community"),
});
} else {
registerShortcut("KeyBinding.previousVisitedRoomOrCommunity", CategoryName.NAVIGATION, {
default: {
altKey: true,
registerShortcut(Categories.NAVIGATION, {
keybinds: [{
modifiers: [Modifiers.ALT],
key: Key.ARROW_LEFT,
},
displayName: _td("Previous recently visited room or community"),
});
registerShortcut("KeyBinding.nextVisitedRoomOrCommunity", CategoryName.NAVIGATION, {
default: {
altKey: true,
}, {
modifiers: [Modifiers.ALT],
key: Key.ARROW_RIGHT,
},
displayName: _td("Next recently visited room or community"),
}],
description: _td("Previous/next recently visited room or community"),
});
}

View File

@@ -8621,10 +8621,10 @@ node-fetch@^1.0.1:
encoding "^0.1.11"
is-stream "^1.0.1"
node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
node-fetch@^2.6.0, node-fetch@^2.6.1:
version "2.6.6"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89"
integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==
dependencies:
whatwg-url "^5.0.0"