Skip to content

Commit

Permalink
Merge pull request #807 from cs136/master
Browse files Browse the repository at this point in the history
Project export and small UI fixes - master into stable
  • Loading branch information
yc2lee authored Sep 9, 2017
2 parents 23f4343 + 514219d commit f64d94c
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.o
*.a
*.aux
.*.swp
.DS_Store
._.DS_Store
_build/
Expand Down
2 changes: 1 addition & 1 deletion src/collects/seashell/backend/project.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@
;;
;; Args:
;; target - path of directory to export everything under
(: export-all (-> String Void))
(: export-all (-> Path-String Void))
(define (export-all target)
(unless (directory-exists? target)
(make-directory target))
Expand Down
4 changes: 3 additions & 1 deletion src/collects/seashell/backend/server.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,13 @@

(define (garbage-collection-loop)
(define hour (* 60 60))
(logf 'info "Compacting database.")
(seashell-collect-garbage)
(sleep hour)
(logf 'info "Database compaction completed.")
(logf 'info "Exporting all projects.")
(export-all (read-config 'export-path))
(logf 'info "Export of all projects completed.")
(sleep hour)
(garbage-collection-loop))

;; make-udp-ping-listener our-port -> (values integer? custodian?)
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"dexie-syncable": "https://www.student.cs.uwaterloo.ca/~cs136/Dexie-Syncable-1.0.0-beta3.patched.tar.gz",
"file-saver": "^1.3.3",
"js-cookie": "^2.1.3",
"moment": "^2.18.1",
"jszip": "^3.1.3",
"md5": "^2.2.1",
"moment": "^2.18.1",
"monaco-editor": "~0.10.0",
"mousetrap": "^1.6.0",
"node-webcrypto-ossl": "^1.0.20",
Expand All @@ -48,6 +48,7 @@
"redux-socket.io": "^1.3.1",
"redux-thunk": "^2.1.0",
"seashell-clang-js": "https://bintray.com/cs136/seashell-clang-js/download_file?file_path=seashell-clang-js-B43.tar.gz",
"typeface-overpass": "0.0.35",
"webcrypto-shim": "^0.1.1",
"ws": "^2.2.1",
"xterm": "^2.3.2"
Expand Down
5 changes: 2 additions & 3 deletions src/frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
<title>Seashell</title>
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Overpass:100,300,400,700" rel="stylesheet">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="PWA">
<meta name="apple-mobile-web-app-title" content="Seashell">
</head>
<body style="margin:0;height:100%;padding:0;">
<div id="root" style="height:100%;"></div>
</body>
</body>
</html>
3 changes: 2 additions & 1 deletion src/frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {getDispatch} from "./actions";
import {DebugLogs} from "./helpers/DebugLogs";
import {composeWithDevTools} from "redux-devtools-extension";
import * as Raven from "raven-js";
require("imports-loader?this=>window!webcrypto-shim"); // inject webcrypto polyfill into window scope
require("typeface-overpass");
require("imports-loader?this=>window!webcrypto-shim"); // Inject webcrypto polyfill into window scope

DebugLogs.enable();
console.log(`Seashell ${VERSION} starting up in ${DEBUG ? "debug" : "release"} mode for ${DOMAIN}.`);
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/Project/Files/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Actions extends React.Component<ActionsProps & actionsInterface, ActionsSt
this.currentFile &&
this.props.filename === this.currentFile.name &&
this.versions &&
<MenuItem text="Old Versions">
<MenuItem className={styles.scrollableSubmenu} text="Old Versions">
{this.versions.map((cnts: S.Contents) =>
(<MenuItem key={cnts.id} text={dateString(cnts.time)} onClick={() => {
this.props.dispatch.file.revertFile(
Expand Down
6 changes: 6 additions & 0 deletions src/frontend/src/views/Project/Project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,9 @@
from {transform:rotate(0deg);}
to {transform:rotate(360deg);}
}

.scrollableSubmenu~* ul {
max-height: 40em;
overflow: auto;
overflow-x: hidden;
}
5 changes: 4 additions & 1 deletion src/frontend/src/views/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ class SignIn extends React.Component<SignInProps&actionsInterface, SignInState>
render() {
const projects = this.props.appState.projects;
return (<div className={styles.container}>
<img src={logo} className={styles.logo}/><h5>Sign in to Seashell</h5>
<img src={logo} className={styles.logo}/>
<h6>Sign in to Seashell with your <a href="https://www.student.cs.uwaterloo.ca/password/">student.cs credentials</a> using the
latest <a href="https://www.google.com/chrome/">Google Chrome</a> or <a href="https://www.mozilla.org/firefox/">Firefox</a>.
</h6>
<form className="pt-control-group pt-vertical" onSubmit={this.signin}>
<div className="pt-input-group pt-large">
<span className="pt-icon pt-icon-person"></span>
Expand Down

0 comments on commit f64d94c

Please sign in to comment.