forked from cory/tildefriends
Some UI tweaks and some sqlite performance things.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3755 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
35b7eb511a
commit
7ba1e6980f
@ -1 +1 @@
|
||||
{"type":"tildefriends-app","files":{"app.js":"&qrR7s0k3vd/aGg03JurUTRMzWyPIEMwGiKAEYNpHpT8=.sha256","index.html":"&/CE4CuVKI56h5tfAHF0kzCXbLfhVjWzsM8aZAB9HpEM=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&DdJwZYEo7AqFyutYMvEjykoVXxdHVog0UXye6Sbo0TU=.sha256","tf-message.js":"&A/R6o9GsaDTEyoAIS8EE1ATCfugBlhdS+jdMz7vsfsM=.sha256","tf.js":"&gJUMwBsssB+Suy/NTUjcB3JeloFLvV18i6egqvThaVY=.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"}}
|
||||
{"type":"tildefriends-app","files":{"app.js":"&chjdt5GtpAo/mI5TNU4n5erT2easdEgJqVrJHz6HtlA=.sha256","index.html":"&/CE4CuVKI56h5tfAHF0kzCXbLfhVjWzsM8aZAB9HpEM=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&DdJwZYEo7AqFyutYMvEjykoVXxdHVog0UXye6Sbo0TU=.sha256","tf-message.js":"&gBMlL/D2sGuvFQR46qXM1ERLA+baZDp9h/4jOD42k7w=.sha256","tf.js":"&gJUMwBsssB+Suy/NTUjcB3JeloFLvV18i6egqvThaVY=.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"}}
|
@ -237,9 +237,9 @@ async function getRelatedPostIds(db, message, ids, limit) {
|
||||
" rowid <= ? AND "+
|
||||
" author IN (" + ids_batch.map(x => '?').join(", ") + ") AND "+
|
||||
" json_extract(content, '$.type') = 'post' AND "+
|
||||
" json_extract(content, '$.root') = ? "+
|
||||
" (id = ? OR json_extract(content, '$.root') = ?) "+
|
||||
"ORDER BY timestamp DESC LIMIT ?",
|
||||
[].concat([message.timestamp, row_id_max], ids_batch, [id, limit]),
|
||||
[].concat([message.timestamp, row_id_max], ids_batch, [message.id, id, limit]),
|
||||
function(row) {
|
||||
if (row.id) {
|
||||
recent.push({id: row.id, timestamp: row.timestamp});
|
||||
|
@ -53,7 +53,7 @@ Vue.component('tf-message', {
|
||||
template: `<md-app class="md-elevation-8" style="margin: 1em" v-if="!content_json || ['pub', 'vote'].indexOf(content_json.type) == -1">
|
||||
<md-app-toolbar>
|
||||
<h3>
|
||||
<md-button class="md-icon-button" @click="show_message">
|
||||
<md-button class="md-icon-button md-dense" @click="show_message">
|
||||
<md-icon>percent</md-icon>
|
||||
</md-button>
|
||||
<tf-user :id="message.author"></tf-user>
|
||||
|
@ -12,6 +12,8 @@
|
||||
void tf_ssb_db_init(tf_ssb_t* ssb)
|
||||
{
|
||||
sqlite3* db = tf_ssb_get_db(ssb);
|
||||
sqlite3_exec(db, "PRAGMA journal_mode = WAL", NULL, NULL, NULL);
|
||||
sqlite3_exec(db, "PRAGMA synchronous = NORMAL", NULL, NULL, NULL);
|
||||
sqlite3_exec(db,
|
||||
"CREATE TABLE IF NOT EXISTS messages ("
|
||||
" author TEXT,"
|
||||
|
@ -41,7 +41,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
}
|
||||
|
||||
char app_blob_id[64] = { 0 };
|
||||
|
||||
sqlite3_busy_timeout(tf_ssb_get_db(ssb), 10000);
|
||||
sqlite3_stmt* statement;
|
||||
if (sqlite3_prepare(tf_ssb_get_db(ssb), "SELECT value FROM properties WHERE id = $1 AND key = 'path:' || $2", -1, &statement, NULL) == SQLITE_OK)
|
||||
{
|
||||
|
@ -125,6 +125,7 @@ void tf_ssb_import(tf_ssb_t* ssb, const char* user, const char* path)
|
||||
.work_left = 1,
|
||||
};
|
||||
import.req.data = &import;
|
||||
sqlite3_busy_timeout(tf_ssb_get_db(ssb), 10000);
|
||||
int r = uv_fs_scandir(tf_ssb_get_loop(ssb), &import.req, path, 0, _tf_ssb_import_scandir);
|
||||
if (r)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user