mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 04:09:49 +00:00
Rename files
This commit is contained in:
56
ts/components/CallingScreenSharingController.dom.tsx
Normal file
56
ts/components/CallingScreenSharingController.dom.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import { Button, ButtonVariant } from './Button.dom.js';
|
||||
import type { LocalizerType } from '../types/Util.std.js';
|
||||
import { ScreenShareStatus } from '../types/Calling.std.js';
|
||||
|
||||
export type PropsType = {
|
||||
i18n: LocalizerType;
|
||||
onCloseController: () => unknown;
|
||||
onStopSharing: () => unknown;
|
||||
status: ScreenShareStatus;
|
||||
presentedSourceName: string | undefined;
|
||||
};
|
||||
|
||||
export function CallingScreenSharingController({
|
||||
i18n,
|
||||
onCloseController,
|
||||
onStopSharing,
|
||||
status,
|
||||
presentedSourceName,
|
||||
}: PropsType): JSX.Element {
|
||||
let text: string;
|
||||
|
||||
if (status === ScreenShareStatus.Reconnecting) {
|
||||
text = i18n('icu:calling__presenting--reconnecting');
|
||||
} else if (presentedSourceName) {
|
||||
text = i18n('icu:calling__presenting--info', {
|
||||
window: presentedSourceName,
|
||||
});
|
||||
} else {
|
||||
text = i18n('icu:calling__presenting--info--unknown');
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="module-CallingScreenSharingController">
|
||||
<div className="module-CallingScreenSharingController__text">{text}</div>
|
||||
<div className="module-CallingScreenSharingController__buttons">
|
||||
<Button
|
||||
className="module-CallingScreenSharingController__button"
|
||||
onClick={onStopSharing}
|
||||
variant={ButtonVariant.Destructive}
|
||||
>
|
||||
{i18n('icu:calling__presenting--stop')}
|
||||
</Button>
|
||||
<button
|
||||
aria-label={i18n('icu:close')}
|
||||
className="module-CallingScreenSharingController__close"
|
||||
onClick={onCloseController}
|
||||
type="button"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user