...with the singular exception of intro.js, where it's part of the
package name, not a file extension.
This is mostly to fix an issue where typescript doesn't want you to
import files with a .ts extension (it will accept .js, but that's super
weird if the file doesn't actually have that extension, and when I tried
it it broke the build for Kenton). Changing the import of .js files is
mainly for consistency.
This also changes some imports to use double quotes (") instead of
single quotes ('); I noticed these while searching for import sites to
replace.
...Filling the entire vertical space alotted for it.
I have found this difficult to press at its current size on mobile; this
essentially doubles the size, so it should be better.
Aesthetically it would be nice to also enlarge the grain icon for
symmetry, but just applying the same rule ends up with it overflowing
the bounds significantly. I am trying to resist the temptation to redo
this whole section with flexbox & grid.
This will serve as a place to store grain-specific settings and other
grain-specific information.
Right now it is *very* bare bones, just shows scheduled jobs, and is
ugly as sin.
Still TODO:
* i18n.
* Make it presentable.
* Add other useful stuff.
Doesn't quite work as expected; unlike the other icons, whatever we're
doing in the build to change the colors for dark backgrounds isn't
working for this icon, presumably because it doesn't appear to have the
Adjusted scrolling on topbar and navbar and fixed grain title to the top of the menu on mobile.
Here are the intended changes in pure css:
@media (min-width: 901px) {
body > .topbar > .navbar {
overflow-y: auto;
}
}
@media (max-width: 900px) {
body > .topbar.expanded {
overflow-y: auto;
}
body > .topbar > .menubar > .title {
position: fixed;
z-index: 1; /* above the rest of the menu */
}
body > .topbar > .menubar > .notifications {
z-index: 3; /* above the title and rest of menu */
}
.share {
margin-top: 48px; /* height of fixed title */
}
}
When there are many grains open on desktop or just a few grains open on Firefox on Android, the user needs to be able to scroll the navbar menu down to see them. These changes should allow that without breaking anything else. It was a little difficult to trace all the curly brackets for scss, but here are the intended changes:
@media (max-width: 900px) {
body > .topbar {
overflow: hidden; /* REMOVE THIS */
overflow: scroll; /* ADD THIS */
}
}
@media (min-width: 901px) {
body > .topbar > .navbar {
overflow: scroll; /* ADD THIS */
}
}
I'm absolutely terrible at UI code, but this works. It lets you:
- Manually upload certs.
- Configure Let's Encrypt (or any other ACME cert provider).
- Configure a variety of DNS plugins by typing in raw freeking JSON.
Looks like we'd previously extracted db-deprecated.js. Let's keep things
simple during this migration and have main.js be the only file that does
imports purely for side-effects.
Apparently the meteor typescript plugin doesn't actually do any
*checking* with typescript -- all it does is translate .ts files
into .js files so that the build works.
This patch adds a tsconfig.json and has the `lint` task run tsc
as well (with noEmit: true, so we're just doing the checking, letting
meteor take care of the translation).
The config is borrowed from the output of `meteor create --typescript`.
After adding this and running tsc, typescript complained about two
things:
1. `Crytpo = Npm.require('crypto')` in various parts of the server,
overwriting the built-in `Crypto` global that is available in the
browser.
2. The unused `Template` import in `client/main.ts`.
Unfortunately, the config format's "lib" option doesn't allow us to
specify different values for different subdirectories, so it thinks
the DOM apis are available everywhere. To solve (1) we just replaced
these statements with a proper import:
import Crypto from 'crypto';
To solve (2), we add the Template import to the modules that actually
use it, and remove the variable from `client/main.ts`. We keep the
import of that module in place, so as not to disturb import order,
though I'm not sure it matters in this case, maybe we can remove it
entirely.
Imported blaze templates don't appear to propagate <head> correctly, for
whatever reason. So ignore it and accept that we have one template not in
imports for <head> and <body>.
This appeared to have a dependency on a particular version of the
content-type package from npm. We can sort that out separately.
Additionally, this has a Meteor package dependency on
fongandrew:find-and-modify. I pinned the version because I vaguely recall this
particular library breaking in the past when we tried to update it and don't
want to deal with that right now either.
This is probably a good candidate for reworking later -- rethinking
how we expose loginServices on client and server seems pretty reasonable
given how little logic the two actually appear to share.
To get the remaining packages into imports, we need to hoist them up in the
reverse order they are loaded. `blackrock-payments` is a leaf in that
dependency tree; let's lift that one first.
We move Blackrock's Stripe dependency into sandstorm's top-level package.json.
We should be able to swap out Npm.require() for plain old imports.
The two asset files are placed in private/, per the Meteor Guide.
With this patch, sandstorm now supports "add to home screen" on modern
mobile browsers:
https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen
Notes:
* The new file `/public/sandstorm-gradient-logo.png` is the same image
as the corresponding `.svg`; At least Chrome requires images larger
than the small `icon32.png` we have, and doesn't support `.svg`.
* The service worker doesn't do anything right now; it's just
there because some browsers demand it to allow add to home screen.
At some point we could use this to cache static assets.
This makes it easy to mass-transfer grains to another Sandstorm server. A UI lets you choose which grains to transfer, watch the transfer happen, and check and retry any errors.