Enable rageshake on PTT mode
By putting another 'Submit Feedback' button in the developer section of the setting modal (we can work out a better place for it).
This commit is contained in:
parent
2a19a9964d
commit
b3285974f9
3 changed files with 32 additions and 2 deletions
|
|
@ -37,6 +37,8 @@ import { getAvatarUrl } from "../matrix-utils";
|
||||||
import { ReactComponent as AudioIcon } from "../icons/Audio.svg";
|
import { ReactComponent as AudioIcon } from "../icons/Audio.svg";
|
||||||
import { usePTTSounds } from "../sound/usePttSounds";
|
import { usePTTSounds } from "../sound/usePttSounds";
|
||||||
import { PTTClips } from "../sound/PTTClips";
|
import { PTTClips } from "../sound/PTTClips";
|
||||||
|
import { GroupCallInspector } from "./GroupCallInspector";
|
||||||
|
import { FeedbackModal } from "./FeedbackModal";
|
||||||
|
|
||||||
function getPromptText(
|
function getPromptText(
|
||||||
showTalkOverError: boolean,
|
showTalkOverError: boolean,
|
||||||
|
|
@ -102,6 +104,8 @@ export const PTTCallView: React.FC<Props> = ({
|
||||||
useModalTriggerState();
|
useModalTriggerState();
|
||||||
const { modalState: settingsModalState, modalProps: settingsModalProps } =
|
const { modalState: settingsModalState, modalProps: settingsModalProps } =
|
||||||
useModalTriggerState();
|
useModalTriggerState();
|
||||||
|
const { modalState: feedbackModalState, modalProps: feedbackModalProps } =
|
||||||
|
useModalTriggerState();
|
||||||
const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver });
|
const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver });
|
||||||
const facepileSize = bounds.width < 800 ? "sm" : "md";
|
const facepileSize = bounds.width < 800 ? "sm" : "md";
|
||||||
const pttButtonSize = 232;
|
const pttButtonSize = 232;
|
||||||
|
|
@ -148,6 +152,13 @@ export const PTTCallView: React.FC<Props> = ({
|
||||||
startTalkingRemoteRef={startTalkingRemoteRef}
|
startTalkingRemoteRef={startTalkingRemoteRef}
|
||||||
blockedRef={blockedRef}
|
blockedRef={blockedRef}
|
||||||
/>
|
/>
|
||||||
|
<GroupCallInspector
|
||||||
|
client={client}
|
||||||
|
groupCall={groupCall}
|
||||||
|
// Never shown in PTT mode, but must be present to collect call state
|
||||||
|
// https://github.com/vector-im/element-call/issues/328
|
||||||
|
show={false}
|
||||||
|
/>
|
||||||
<Header className={styles.header}>
|
<Header className={styles.header}>
|
||||||
<LeftNav>
|
<LeftNav>
|
||||||
<RoomSetupHeaderInfo roomName={roomName} onPress={onLeave} />
|
<RoomSetupHeaderInfo roomName={roomName} onPress={onLeave} />
|
||||||
|
|
@ -232,6 +243,14 @@ export const PTTCallView: React.FC<Props> = ({
|
||||||
{...settingsModalProps}
|
{...settingsModalProps}
|
||||||
setShowInspector={setShowInspector}
|
setShowInspector={setShowInspector}
|
||||||
showInspector={showInspector}
|
showInspector={showInspector}
|
||||||
|
showFeedbackDialog={feedbackModalState.open}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{feedbackModalState.isOpen && (
|
||||||
|
<FeedbackModal
|
||||||
|
{...feedbackModalProps}
|
||||||
|
roomId={groupCall?.room.roomId}
|
||||||
|
inCall
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{inviteModalState.isOpen && (
|
{inviteModalState.isOpen && (
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React, { useCallback } from "react";
|
||||||
import { Modal } from "../Modal";
|
import { Modal } from "../Modal";
|
||||||
import styles from "./SettingsModal.module.css";
|
import styles from "./SettingsModal.module.css";
|
||||||
import { TabContainer, TabItem } from "../tabs/Tabs";
|
import { TabContainer, TabItem } from "../tabs/Tabs";
|
||||||
|
|
@ -29,7 +29,12 @@ import { Button } from "../button";
|
||||||
import { useDownloadDebugLog } from "./submit-rageshake";
|
import { useDownloadDebugLog } from "./submit-rageshake";
|
||||||
import { Body } from "../typography/Typography";
|
import { Body } from "../typography/Typography";
|
||||||
|
|
||||||
export function SettingsModal({ setShowInspector, showInspector, ...rest }) {
|
export function SettingsModal({
|
||||||
|
setShowInspector,
|
||||||
|
showInspector,
|
||||||
|
showFeedbackDialog,
|
||||||
|
...rest
|
||||||
|
}) {
|
||||||
const {
|
const {
|
||||||
audioInput,
|
audioInput,
|
||||||
audioInputs,
|
audioInputs,
|
||||||
|
|
@ -125,6 +130,7 @@ export function SettingsModal({ setShowInspector, showInspector, ...rest }) {
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
<Button onPress={downloadDebugLog}>Download Debug Logs</Button>
|
<Button onPress={downloadDebugLog}>Download Debug Logs</Button>
|
||||||
|
<Button onPress={showFeedbackDialog}>Submit Feedback</Button>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabContainer>
|
</TabContainer>
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@ export default defineConfig(({ mode }) => {
|
||||||
proxy: {
|
proxy: {
|
||||||
"/_matrix": env.VITE_DEFAULT_HOMESERVER || "http://localhost:8008",
|
"/_matrix": env.VITE_DEFAULT_HOMESERVER || "http://localhost:8008",
|
||||||
},
|
},
|
||||||
|
strictPort: true,
|
||||||
|
hmr: {
|
||||||
|
port: 443,
|
||||||
|
protocol: 'wss',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
dedupe: [
|
dedupe: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue