From 33cfc91ed9a6a2fe8b4a5b55ebd9accc24eaa1ae Mon Sep 17 00:00:00 2001 From: bobzel Date: Sat, 25 Nov 2023 22:57:16 -0500 Subject: cleanup of rootSelected to default to false. remove unused mobile classes. --- src/mobile/AudioUpload.tsx | 162 --------------------------------------------- 1 file changed, 162 deletions(-) delete mode 100644 src/mobile/AudioUpload.tsx (limited to 'src/mobile/AudioUpload.tsx') diff --git a/src/mobile/AudioUpload.tsx b/src/mobile/AudioUpload.tsx deleted file mode 100644 index 7a1dde9fb..000000000 --- a/src/mobile/AudioUpload.tsx +++ /dev/null @@ -1,162 +0,0 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { action, observable } from 'mobx'; -import { observer } from 'mobx-react'; -import { Docs } from '../client/documents/Documents'; -import { Transform } from '../client/util/Transform'; -import { ContextMenu } from '../client/views/ContextMenu'; -import { DictationOverlay } from '../client/views/DictationOverlay'; -import { MainViewModal } from '../client/views/MainViewModal'; -import { DocumentView } from '../client/views/nodes/DocumentView'; -import { RichTextMenu } from '../client/views/nodes/formattedText/RichTextMenu'; -import { Doc } from '../fields/Doc'; -import { listSpec } from '../fields/Schema'; -import { Cast, FieldValue } from '../fields/Types'; -import { nullAudio } from '../fields/URLField'; -import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue, emptyPath } from '../Utils'; -import './ImageUpload.scss'; -import { MobileInterface } from './MobileInterface'; -import React = require('react'); - -@observer -export class AudioUpload extends React.Component { - @observable public _audioCol: Doc = FieldValue( - Cast( - Docs.Create.FreeformDocument([Cast(Docs.Create.AudioDocument(nullAudio, { title: 'mobile audio', _width: 500, _height: 100 }), Doc) as Doc], { - title: 'mobile audio', - _width: 300, - _height: 300, - _layout_fitContentsToBox: true, - layout_boxShadow: '0 0', - }), - Doc - ) - ) as Doc; - - /** - * Handles the onclick functionality for the 'Restart' button - * Resets the document to its default view - */ - @action - clearUpload = () => { - for (let i = 1; i < 8; i++) { - this.setOpacity(i, '0.2'); - } - this._audioCol = FieldValue( - Cast( - Docs.Create.FreeformDocument( - [ - Cast( - Docs.Create.AudioDocument(nullAudio, { - title: 'mobile audio', - _width: 500, - _height: 100, - }), - Doc - ) as Doc, - ], - { title: 'mobile audio', _width: 300, _height: 300, _layout_fitContentsToBox: true, layout_boxShadow: '0 0' } - ), - Doc - ) - ) as Doc; - }; - - /** - * Handles the onClick of the 'Close' button - * Reset upload interface and toggle audio - */ - closeUpload = () => { - this.clearUpload(); - MobileInterface.Instance.toggleAudio(); - }; - - /** - * Handles the on click of the 'Upload' button. - * Pushing the audio doc onto Dash Web through the right side bar - */ - uploadAudio = () => { - const audioRightSidebar = Cast(Doc.SharingDoc(), Doc, null); - const audioDoc = this._audioCol; - const data = Cast(audioRightSidebar.data, listSpec(Doc)); - for (let i = 1; i < 8; i++) { - setTimeout(() => this.setOpacity(i, '1'), i * 200); - } - if (data) { - data.push(audioDoc); - } - // Resets uploader after 3 seconds - setTimeout(this.clearUpload, 3000); - }; - - // Returns the upload audio menu - private get uploadInterface() { - return ( - <> - - -
- -
-
this.closeUpload()}> - -
- -
- 600} - PanelHeight={() => 400} - renderDepth={0} - isDocumentActive={returnTrue} - isContentActive={emptyFunction} - focus={emptyFunction} - styleProvider={() => 'rgba(0,0,0,0)'} - docViewPath={returnEmptyDoclist} - whenChildContentsActiveChanged={emptyFunction} - bringToFront={emptyFunction} - /> -
-
- Restart -
-
- Upload -
-
-
-
-
-
-
-
-
-
- - ); - } - - // Handles the setting of the loading bar - setOpacity = (index: number, opacity: string) => { - const slab = document.getElementById('slab0' + index); - if (slab) { - slab.style.opacity = opacity; - } - }; - - @observable private dialogueBoxOpacity = 1; - @observable private overlayOpacity = 0.4; - - render() { - return ; - } -} -- cgit v1.2.3-70-g09d2