aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2023-07-18 13:31:23 -0400
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2023-07-18 13:31:23 -0400
commitc9da65d4f81c437578303f9656b29ae320aa11c3 (patch)
tree3dc35189f08cbb8f61a0bca984c1a8873f711a23 /src
parentfc0409fc2996d7666c48bbd8abf5c530262c39ae (diff)
parent5da0b8c1e12abe13d60361af4f6bbb8454b6814d (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src')
-rw-r--r--src/client/util/CurrentUserUtils.ts7
-rw-r--r--src/client/util/ServerStats.tsx4
-rw-r--r--src/client/views/nodes/DocumentView.tsx1
-rw-r--r--src/client/views/topbar/TopBar.tsx9
4 files changed, 5 insertions, 16 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index e338d8e84..e8947f190 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -30,8 +30,7 @@ import { LinkManager } from "./LinkManager";
import { ScriptingGlobals } from "./ScriptingGlobals";
import { ColorScheme, SettingsManager } from "./SettingsManager";
import { UndoManager } from "./UndoManager";
-import { PresElementBox } from "../views/nodes/trails";
-import { ImportElementBox } from "../views/nodes/importBox/importElementBox";
+import { ImportElementBox } from "../views/nodes/importBox/ImportElementBox";
interface Button {
// DocumentOptions fields a button can set
@@ -967,10 +966,8 @@ export class CurrentUserUtils {
input.multiple = true;
input.accept = ".zip, application/pdf, video/*, image/*, audio/*";
input.onchange = async _e => {
- const upload = Utils.prepend("/uploadDoc");
- const formData = new FormData();
const file = input.files?.[0];
- if (file?.type === 'application/zip') {
+ if (file?.type === 'application/zip' || file?.type === 'application/x-zip-compressed') {
const doc = await Doc.importDocument(file);
// NOT USING SOLR, so need to replace this with something else // if (doc instanceof Doc) {
// setTimeout(() => SearchUtil.Search(`{!join from=id to=proto_i}id:link*`, true, {}).then(docs =>
diff --git a/src/client/util/ServerStats.tsx b/src/client/util/ServerStats.tsx
index b6aa4d95a..6a6ec158e 100644
--- a/src/client/util/ServerStats.tsx
+++ b/src/client/util/ServerStats.tsx
@@ -4,6 +4,8 @@ import * as React from 'react';
import { MainViewModal } from '../views/MainViewModal';
import './SharingManager.scss';
import { PingManager } from './PingManager';
+import { StrCast } from '../../fields/Types';
+import { Doc } from '../../fields/Doc';
@observer
export class ServerStats extends React.Component<{}> {
@@ -44,7 +46,7 @@ export class ServerStats extends React.Component<{}> {
display: "flex",
height: 300,
width: 400,
- background: "black",
+ background: StrCast(Doc.UserDoc().userBackgroundColor),
opacity: 0.6}}>
<div style={{width: 300,height: 100,margin: "auto",display: "flex",flexDirection: "column"}}>
{PingManager.Instance.IsBeating ? 'The server connection is active' :
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 6b47564a4..d7b4ca317 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -803,7 +803,6 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
constantItems.push({ description: 'Show Metadata', event: () => this.props.addDocTab(this.props.Document, (OpenWhere.addRight.toString() + 'KeyValue') as OpenWhere), icon: 'layer-group' });
if (!Doc.IsSystem(this.rootDoc)) {
constantItems.push({ description: 'Export as Zip file', icon: 'download', event: async () => Doc.Zip(this.props.Document) });
- constantItems.push({ description: 'Import Zipped file', icon: 'upload', event: ({ x, y }) => this.importDocument() });
(this.rootDoc._type_collection !== CollectionViewType.Docking || !Doc.noviceMode) && constantItems.push({ description: 'Share', event: () => SharingManager.Instance.open(this.props.DocumentView()), icon: 'users' });
if (this.props.removeDocument && Doc.ActiveDashboard !== this.props.Document) {
// need option to gray out menu items ... preferably with a '?' that explains why they're grayed out (eg., no permissions)
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 130e47a41..79f41fe9d 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -106,15 +106,6 @@ export class TopBar extends React.Component {
onClick={(e: React.MouseEvent) => {
const dashView = Doc.ActiveDashboard && DocumentManager.Instance.getDocumentView(Doc.ActiveDashboard);
ContextMenu.Instance.addItem({ description: 'Open Dashboard View', event: this.navigateToHome, icon: 'edit' });
- ContextMenu.Instance.addItem({
- description: 'Snapshot Dashboard',
- event: async () => {
- const batch = UndoManager.StartBatch('snapshot');
- await DashboardView.snapshotDashboard();
- batch.end();
- },
- icon: 'edit',
- });
dashView?.showContextMenu(e.clientX + 20, e.clientY + 30);
}}
/>