Skip to content

Commit

Permalink
feat: optimize MEI validate && add new empty file
Browse files Browse the repository at this point in the history
1. **Optimization:**
  - Optimized MEI validation (PR #121)

2. **Fixes:**
  - Prevented text content from being stored as an image (PR #120)
  - Removed MEI row in `meiData` when cleared (PR #118)
  - Ensured a cell without change doesn't alter save status (PR #116)
  - Displayed empty table when header is invalid (PR #114)

3. **Features:**
  - Added support for new empty files (PR #112)

Refs: PR #121, #120, #118, #116, #114, #112
  • Loading branch information
kunfang98927 committed Jul 12, 2024
1 parent ae4a0f7 commit 7129062
Show file tree
Hide file tree
Showing 6 changed files with 224 additions and 186 deletions.
7 changes: 7 additions & 0 deletions Cress-gh/assets/img/empty-file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Cress-gh/dashboard.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cress-gh/editor.js

Large diffs are not rendered by default.

179 changes: 100 additions & 79 deletions dashboard.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Cress</title>
Expand All @@ -8,109 +8,130 @@
crossorigin="anonymous"
></script>
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<link rel="stylesheet" href="./Cress-gh/assets/css/default-styles.css"/>
<link rel="stylesheet" href="./Cress-gh/assets/css/modal-window.css"/>
<link rel="stylesheet" href="./Cress-gh/assets/css/dashboard.css"/>
<script
defer
type="text/javascript"
src="./Cress-gh/dashboard.js"
></script>
<link rel="stylesheet" href="./Cress-gh/assets/css/default-styles.css" />
<link rel="stylesheet" href="./Cress-gh/assets/css/modal-window.css" />
<link rel="stylesheet" href="./Cress-gh/assets/css/dashboard.css" />
<script defer type="text/javascript" src="./Cress-gh/dashboard.js"></script>
</head>
<body>

<div class="navbar-section">

<div class="navbar-content-container">

<div class="cress-content-wrapper">
<a class="navbar-btn" id="home-link">
<!-- Image src attributes are ste programatically because paths are not the same in dev and prod -->
<img id="cress-main-icon" src="favicon.png">
</a>
</div>

<div class="cress-content-wrapper">
<a href="https://ddmal.music.mcgill.ca/">
<div class="navbar-link">DDMAL</div>
</a>
<a href="https://github.com/DDMAL/Cress/wiki">
<div class="navbar-link">Wiki</div>
</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfspol99BxJmIuZuSO-dVFDoo_absttgAo7czk9ecqDT4uF1A/viewform">
<div class="navbar-link">Feedback Form</div>
</a>
</div>

<div class="navbar-content-container">
<div class="cress-content-wrapper">
<a class="navbar-btn" id="home-link">
<!-- Image src attributes are ste programatically because paths are not the same in dev and prod -->
<img id="cress-main-icon" src="favicon.png" />
</a>
</div>

<div class="cress-content-wrapper">
<a href="https://ddmal.music.mcgill.ca/">
<div class="navbar-link">DDMAL</div>
</a>
<a href="https://github.com/DDMAL/Cress/wiki">
<div class="navbar-link">Wiki</div>
</a>
<a
href="https://docs.google.com/forms/d/e/1FAIpQLSfspol99BxJmIuZuSO-dVFDoo_absttgAo7czk9ecqDT4uF1A/viewform"
>
<div class="navbar-link">Feedback Form</div>
</a>
</div>
</div>
</div>

<div class="main-section">
<div id="main-section-content" class="main-section-content">
<div id="info-badge"></div>

<div id="main-section-content" class="main-section-content">
<div id="info-badge"></div>

<div id="documents-container" class="documents-container">
<div id="fs-top-zone" class="fs-top-zone">
<div id="nav-path-container" class="fs-title nav-path-container"></div>
<div id="fs-search-container" class="fs-search-container"></div>
</div>
<div id="fs-middle-zone" class="fs-middle-zone">
<div id="fs-btn-container">
<button id="fs-back-btn" class="fs-btn">Back↵</button>
<div class="fs-trash-btn">
<button id="fs-empty-btn" class="fs-btn">Empty</button>
<button id="fs-delete-btn" class="fs-btn">Delete</button>
</div>
</div>
<div id="fs-results-title" class="fs-results-results"></div>
</div>
<div id="fs-content-container" class="fs-content-container"></div>
<div id="documents-container" class="documents-container">
<div id="fs-top-zone" class="fs-top-zone">
<div
id="nav-path-container"
class="fs-title nav-path-container"
></div>
<div id="fs-search-container" class="fs-search-container"></div>
</div>
<div id="fs-middle-zone" class="fs-middle-zone">
<div id="fs-btn-container">
<button id="fs-back-btn" class="fs-btn">Back↵</button>
<div class="fs-trash-btn">
<button id="fs-empty-btn" class="fs-btn">Empty</button>
<button id="fs-delete-btn" class="fs-btn">Delete</button>
</div>
</div>

<div id="fs-results-title" class="fs-results-results"></div>
</div>
<div id="fs-content-container" class="fs-content-container"></div>
</div>
</div>

<div class="main-section-action-bar">
<img id="add-folder-button" class="action-bar-item-container active" src="./Cress-gh/assets/img/new-folder.svg" title="folder">
<img id="upload-new-doc-button" class="action-bar-item-container active" src="./Cress-gh/assets/img/new-doc.svg" title="upload">
<div class="dividing-line action-bar-item-container active"></div>
<img id="remove-doc" class="action-bar-item-container" src="./Cress-gh/assets/img/remove-doc.svg" title="move to trash">
<img id="open-doc" class="action-bar-item-container" src="./Cress-gh/assets/img/open-doc.svg" title="open">
</div>
<div class="main-section-action-bar">
<img
id="add-folder-button"
class="action-bar-item-container active"
src="./Cress-gh/assets/img/new-folder.svg"
title="folder"
/>
<img
id="add-file-button"
class="action-bar-item-container active"
src="./Cress-gh/assets/img/empty-file.svg"
title="file"
/>
<img
id="upload-new-doc-button"
class="action-bar-item-container active"
src="./Cress-gh/assets/img/new-doc.svg"
title="upload"
/>
<div class="dividing-line action-bar-item-container active"></div>
<img
id="remove-doc"
class="action-bar-item-container"
src="./Cress-gh/assets/img/remove-doc.svg"
title="move to trash"
/>
<img
id="open-doc"
class="action-bar-item-container"
src="./Cress-gh/assets/img/open-doc.svg"
title="open"
/>
</div>
</div>




<!-- Cress modal window -->
<div id="cress-modal-window-container">
<div tabindex="0" id="cress-modal-window">

<div id="cress-modal-window-header">
<div id="cress-modal-window-header-title"></div>
<div id="cress-modal-window-header-close">x</div>
</div>

<!-- Cress modal window content section -->
<div id="cress-modal-window-content-container"></div>
<div tabindex="0" id="cress-modal-window">
<div id="cress-modal-window-header">
<div id="cress-modal-window-header-title"></div>
<div id="cress-modal-window-header-close">x</div>
</div>

<!-- Cress modal window content section -->
<div id="cress-modal-window-content-container"></div>
</div>
</div>

<!-- Right-click menu -->
<div class="right-click-file-menu hidden">
<div class="context-menu-items-wrapper">
<!-- <div id="right-click-upload-file" class="context-menu-item">Upload file</div>
<div class="context-menu-items-wrapper">
<!-- <div id="right-click-upload-file" class="context-menu-item">Upload file</div>
<div id="right-click-new-folder" class="context-menu-item">New folder</div> -->
</div>
</div>
</div>

<!-- icons -->
<div class="preload-icons-container" hidden>
<img id="preload-folder-icon" src="./Cress-gh/assets/img/folder-icon.svg">
<img id="preload-file-icon" src="./Cress-gh/assets/img/file-icon.svg">
<img id="preload-warning-icon" src="./Cress-gh/assets/img/warning-icon.svg">
<img
id="preload-folder-icon"
src="./Cress-gh/assets/img/folder-icon.svg"
/>
<img id="preload-file-icon" src="./Cress-gh/assets/img/file-icon.svg" />
<img
id="preload-warning-icon"
src="./Cress-gh/assets/img/warning-icon.svg"
/>
</div>

</body>
</html>
16 changes: 9 additions & 7 deletions editor.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="width=device-width" />
<head>
<title>Cress</title>
<link rel="stylesheet" href="./Cress-gh/assets/css/style.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js">
</script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" />
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"
></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css"
/>
</head>

<body>
Expand Down
Loading

0 comments on commit 7129062

Please sign in to comment.