Moving things off of CDNs.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3698 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
9faa4c9ca6
commit
ba87f9acaa
@ -1 +1 @@
|
||||
{"type":"tildefriends-app","files":{"app.js":"&R4Rss5VbuH1lalgy8o5NzzccIC5ofSpK+ywc/u3WTCs=.sha256","index.html":"&UdGmQAbbLedvG7wpsDZRcpZl05jwUe61GDLACoHANYg=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&V9Ol799hM6i1PZDbAS91CMhgx7aENDTJnT+KrwK4Lh4=.sha256","tf-message.js":"&VNC8ptzGXWAVl9LBBZfrk3YmweA8PQ02d7/wZxWXoAA=.sha256","tf.js":"&Vcdlau6e9yBimrokJzoSPvRIS5BNWXcrVO+cO9TUKBg=.sha256"}}
|
||||
{"type":"tildefriends-app","files":{"app.js":"&R4Rss5VbuH1lalgy8o5NzzccIC5ofSpK+ywc/u3WTCs=.sha256","index.html":"&V0OKwISmSZZH/9QbJyp9rdCgscD5bO9yw4dpzS5pFCw=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&V9Ol799hM6i1PZDbAS91CMhgx7aENDTJnT+KrwK4Lh4=.sha256","tf-message.js":"&VNC8ptzGXWAVl9LBBZfrk3YmweA8PQ02d7/wZxWXoAA=.sha256","tf.js":"&Vcdlau6e9yBimrokJzoSPvRIS5BNWXcrVO+cO9TUKBg=.sha256","commonmark.min.js":"&5x6ek3tFrKTZX6hXNNyFsjmhvrjmWpUkwuuaiyVV1Us=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256"}}
|
1
apps/cory/index/commonmark.min.js
vendored
Normal file
1
apps/cory/index/commonmark.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,16 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="width=device-width,initial-scale=1,minimal-ui" name="viewport">
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,500,700,400italic|Material+Icons">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://unpkg.com/vue-material/dist/vue-material.min.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/vue-material/dist/theme/default-dark.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
||||
<link rel="stylesheet" href="roboto.css">
|
||||
<link rel="stylesheet" href="material-icons.css">
|
||||
<link rel="stylesheet" href="vue-material.min.css">
|
||||
<link rel="stylesheet" href="vue-material-theme-default-dark.css">
|
||||
<script src="vue.js"></script>
|
||||
<script src="vue-material.js"></script>
|
||||
<script src="tf-user.js"></script>
|
||||
<script src="tf-message.js"></script>
|
||||
<script src="tf.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/commonmark/0.29.1/commonmark.min.js"></script>
|
||||
<script src="commonmark.min.js"></script>
|
||||
</head>
|
||||
<body style="color: #fff">
|
||||
<div id="app">
|
||||
|
20
apps/cory/index/material-icons.css
Normal file
20
apps/cory/index/material-icons.css
Normal file
@ -0,0 +1,20 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/materialicons/v118/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf) format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
44
apps/cory/index/roboto.css
Normal file
44
apps/cory/index/roboto.css
Normal file
@ -0,0 +1,44 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/materialicons/v118/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOkCnqEu92Fr1Mu52xP.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Me5Q.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmEU9vAw.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlvAw.ttf) format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
4
apps/cory/index/vue-material-theme-default-dark.css
Normal file
4
apps/cory/index/vue-material-theme-default-dark.css
Normal file
File diff suppressed because one or more lines are too long
6
apps/cory/index/vue-material.min.css
vendored
Normal file
6
apps/cory/index/vue-material.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12014
apps/cory/index/vue.js
Normal file
12014
apps/cory/index/vue.js
Normal file
File diff suppressed because it is too large
Load Diff
16
core/core.js
16
core/core.js
@ -336,7 +336,7 @@ async function speedScopeHandler(request, response, uri) {
|
||||
}
|
||||
}
|
||||
|
||||
function sendData(response, data) {
|
||||
function sendData(response, data, type) {
|
||||
if (data) {
|
||||
if (startsWithBytes(data, [0xff, 0xd8, 0xff, 0xdb]) ||
|
||||
startsWithBytes(data, [0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01]) ||
|
||||
@ -352,7 +352,7 @@ function sendData(response, data) {
|
||||
response.writeHead(200, {"Content-Type": "image/gif", "Content-Length": data.byteLength});
|
||||
response.end(data);
|
||||
} else {
|
||||
response.writeHead(200, {"Content-Type": "text/javascript; charset=utf-8", "Content-Length": data.byteLength});
|
||||
response.writeHead(200, {"Content-Type": type || "text/javascript; charset=utf-8", "Content-Length": data.byteLength});
|
||||
response.end(data);
|
||||
}
|
||||
} else {
|
||||
@ -371,6 +371,14 @@ async function getBlobOrContent(id) {
|
||||
}
|
||||
}
|
||||
|
||||
function guessType(path) {
|
||||
const k_extension_to_type = {
|
||||
'css': 'text/css',
|
||||
};
|
||||
var extension = path.split('.').pop();
|
||||
return k_extension_to_type[extension];
|
||||
}
|
||||
|
||||
async function blobHandler(request, response, blobId, uri) {
|
||||
var found = false;
|
||||
if (!found) {
|
||||
@ -429,6 +437,7 @@ async function blobHandler(request, response, blobId, uri) {
|
||||
response.end("/" + newBlobId);
|
||||
} else {
|
||||
var data;
|
||||
var type;
|
||||
if (match = /^\/\~(\w+)\/(\w+)$/.exec(blobId)) {
|
||||
var db = new Database(match[1]);
|
||||
var id = await db.get('path:' + match[2]);
|
||||
@ -437,6 +446,7 @@ async function blobHandler(request, response, blobId, uri) {
|
||||
var app = JSON.parse(data);
|
||||
data = app.files[uri.substring(1)];
|
||||
data = await getBlobOrContent(data);
|
||||
type = guessType(uri);
|
||||
}
|
||||
} else {
|
||||
data = utf8Decode(await getBlobOrContent(blobId));
|
||||
@ -444,7 +454,7 @@ async function blobHandler(request, response, blobId, uri) {
|
||||
data = app.files[uri.substring(1)];
|
||||
data = await getBlobOrContent(data);
|
||||
}
|
||||
sendData(response, data);
|
||||
sendData(response, data, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ typedef struct _tf_import_file_t {
|
||||
const char* user;
|
||||
const char* parent;
|
||||
const char* name;
|
||||
//uv_buf_t buf;
|
||||
char data[k_ssb_blob_bytes_max];
|
||||
int* work_left;
|
||||
} tf_import_file_t;
|
||||
|
Loading…
Reference in New Issue
Block a user