From 14c35574abc3c0f0b8fd86c5537b28828646f520 Mon Sep 17 00:00:00 2001
From: geireann <60007097+geireann@users.noreply.github.com>
Date: Tue, 30 Jun 2020 03:04:17 +0800
Subject: oops
small bug fixes
---
src/mobile/MobileInterface.tsx | 67 ++++++++++++------------------------------
1 file changed, 18 insertions(+), 49 deletions(-)
(limited to 'src')
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index bac18d975..dc36b2c09 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -9,7 +9,7 @@ import {
faThumbtack, faTree, faTv, faBook, faUndoAlt, faVideo, faAsterisk, faBrain, faImage, faPaintBrush, faTimes, faEye, faHome, faLongArrowAltLeft, faBars, faTh, faChevronLeft
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { action, computed, observable, reaction } from 'mobx';
+import { action, computed, observable, reaction, trace } from 'mobx';
import { observer } from 'mobx-react';
import { Doc, DocListCast } from '../fields/Doc';
import { CurrentUserUtils } from '../client/util/CurrentUserUtils';
@@ -464,20 +464,6 @@ export class MobileInterface extends React.Component {
e.stopPropagation();
}
- // Button for uploading mobile audio
- uploadAudioButton = () => {
- if (this._activeDoc.type === "audio") {
- return
-
-
;
- }
- }
-
// Button for switching between pen and ink mode
@action
onSwitchInking = () => {
@@ -506,8 +492,8 @@ export class MobileInterface extends React.Component {
}
}
- // uses UndoManager and handles the color change opacity change if CanUndo is true
- @computed get undo = () => {
+ // DocButton that uses UndoManager and handles the opacity change if CanUndo is true
+ @computed get undo() {
if (this._activeDoc.type === "collection" && this._activeDoc !== this._homeDoc && this._activeDoc !== this.userDoc.rightSidebarCollection && this._activeDoc.title !== "WORKSPACES") {
return (<>
{
+ // DocButton that uses UndoManager and handles the opacity change if CanRedo is true
+ @computed get redo() {
if (this._activeDoc.type === "collection" && this._activeDoc !== this._homeDoc && this._activeDoc !== this.userDoc.rightSidebarCollection && this._activeDoc.title !== "WORKSPACES") {
return (<>
{
- if (this._activeDoc.type === "collection" && this._activeDoc !== this._homeDoc) {
- return (
- <>
-
-
-
- >);
+ // DocButton: Button that appears on the bottom of the screen to initiate image upload
+ uploadImageButton = () => {
+ if (this._activeDoc.type === "collection" && this._activeDoc !== this._homeDoc && this._activeDoc._viewType !== "docking" && this._activeDoc.title !== "WORKSPACES") {
+ return
+
+
;
}
}
- // Button to download images on the mobile
+ // DocButton to download images on the mobile
downloadDocument = () => {
if (this._activeDoc.type === "image" || this._activeDoc.type === "pdf" || this._activeDoc.type === "video") {
const url = this._activeDoc["data-path"]?.toString();
@@ -591,7 +573,7 @@ export class MobileInterface extends React.Component {
}
}
- // Button for pinning images to presentation
+ // DocButton for pinning images to presentation
pinToPresentation = () => {
// Only making button available if it is an image
if (!(this._activeDoc.type === "collection" || this._activeDoc.type === "presentation")) {
@@ -727,19 +709,6 @@ export class MobileInterface extends React.Component {
e.stopPropagation();
}
- // Button that appears on the bottom of the screen to initiate image upload
- uploadImageButton = () => {
- if (this._activeDoc.type === "collection" && this._activeDoc !== this._homeDoc && this._activeDoc._viewType !== "docking" && this._activeDoc.title !== "WORKSPACES") {
- return
-
-
;
- }
- }
-
/**
* MENU BUTTON
* Switch view from mobile menu to access the mobile uploads
--
cgit v1.2.3-70-g09d2