mirror of
https://github.com/simon987/sist2.git
synced 2025-12-14 15:59:03 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5da6c1488b | |||
| 9568e25f84 | |||
| 6a8027789a | |||
| b1d16d8abf |
@@ -21,7 +21,7 @@
|
|||||||
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
|
#define EPILOG "Made by simon987 <me@simon987.net>. Released under GPL-3.0"
|
||||||
|
|
||||||
|
|
||||||
static const char *const Version = "2.8.1";
|
static const char *const Version = "2.8.2";
|
||||||
static const char *const usage[] = {
|
static const char *const usage[] = {
|
||||||
"sist2 scan [OPTION]... PATH",
|
"sist2 scan [OPTION]... PATH",
|
||||||
"sist2 index [OPTION]... INDEX",
|
"sist2 index [OPTION]... INDEX",
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ a:hover, .btn:hover {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
margin: 0 auto 0;
|
margin: 0 auto 0;
|
||||||
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,3 +538,7 @@ svg {
|
|||||||
.stat > .card-body {
|
.stat > .card-body {
|
||||||
padding: 0.7em 1.25em;
|
padding: 0.7em 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#modal-body > .img-wrapper {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|||||||
@@ -417,3 +417,7 @@ mark {
|
|||||||
.stat > .card-body {
|
.stat > .card-body {
|
||||||
padding: 0.7em 1.25em;
|
padding: 0.7em 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#modal-body > .img-wrapper {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
@@ -195,10 +195,21 @@ function makeUserTag(tag, hit) {
|
|||||||
function infoButtonCb(hit) {
|
function infoButtonCb(hit) {
|
||||||
return () => {
|
return () => {
|
||||||
getDocumentInfo(hit["_id"]).then(doc => {
|
getDocumentInfo(hit["_id"]).then(doc => {
|
||||||
|
$("#modal-body").empty()
|
||||||
|
|
||||||
$("#modal-title").text(doc["name"] + ext(hit));
|
$("#modal-title").text(doc["name"] + ext(hit));
|
||||||
|
|
||||||
|
if (doc["mime"]) {
|
||||||
|
const mimeCategory = doc["mime"].split("/")[0];
|
||||||
|
const imgWrapper = document.createElement("div");
|
||||||
|
imgWrapper.setAttribute("style", "position: relative");
|
||||||
|
imgWrapper.setAttribute("class", "img-wrapper");
|
||||||
|
makeThumbnail(mimeCategory, hit, imgWrapper, false);
|
||||||
|
$("#modal-body").append(imgWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
const tbody = $("<tbody>");
|
const tbody = $("<tbody>");
|
||||||
$("#modal-body").empty()
|
$("#modal-body")
|
||||||
.append($("<table class='table table-sm'>")
|
.append($("<table class='table table-sm'>")
|
||||||
.append($("<thead>")
|
.append($("<thead>")
|
||||||
.append($("<tr>")
|
.append($("<tr>")
|
||||||
@@ -212,11 +223,16 @@ function infoButtonCb(hit) {
|
|||||||
tbody.append($("<tr>")
|
tbody.append($("<tr>")
|
||||||
.append($("<td>").text("index"))
|
.append($("<td>").text("index"))
|
||||||
.append($("<td>").text(`[${indexMap[doc["index"]]}]`))
|
.append($("<td>").text(`[${indexMap[doc["index"]]}]`))
|
||||||
|
).append($("<tr>")
|
||||||
|
.append($("<td>").text("mtime"))
|
||||||
|
.append($("<td>")
|
||||||
|
.text(new Date(doc["mtime"] * 1000).toISOString().split(".")[0].replace("T", " "))
|
||||||
|
.attr("title", doc["mtime"]))
|
||||||
);
|
);
|
||||||
const displayFields = new Set([
|
const displayFields = new Set([
|
||||||
"mime", "size", "mtime", "path", "title", "width", "height", "duration", "audioc", "videoc",
|
"mime", "size", "path", "title", "width", "height", "duration", "audioc", "videoc",
|
||||||
"bitrate", "artist", "album", "album_artist", "genre", "title", "font_name", "tag", "author",
|
"bitrate", "artist", "album", "album_artist", "genre", "title", "font_name", "tag", "author",
|
||||||
"modified_by"
|
"modified_by", "pages"
|
||||||
]);
|
]);
|
||||||
Object.keys(doc)
|
Object.keys(doc)
|
||||||
.filter(key => key.startsWith("_keyword.") || key.startsWith("_text.") || displayFields.has(key) || key.startsWith("exif_"))
|
.filter(key => key.startsWith("_keyword.") || key.startsWith("_text.") || displayFields.has(key) || key.startsWith("exif_"))
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<nav class="navbar navbar-expand-lg">
|
<nav class="navbar navbar-expand-lg">
|
||||||
<a class="navbar-brand" href="/">sist2</a>
|
<a class="navbar-brand" href="/">sist2</a>
|
||||||
<span class="badge badge-pill version">2.8.1</span>
|
<span class="badge badge-pill version">2.8.2</span>
|
||||||
<span class="tagline">Lightning-fast file system indexer and search tool </span>
|
<span class="tagline">Lightning-fast file system indexer and search tool </span>
|
||||||
<a class="btn ml-auto" href="/stats">Stats</a>
|
<a class="btn ml-auto" href="/stats">Stats</a>
|
||||||
<button class="btn" type="button" data-toggle="modal" data-target="#settings" onclick="loadSettings()">Settings
|
<button class="btn" type="button" data-toggle="modal" data-target="#settings" onclick="loadSettings()">Settings
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<nav class="navbar navbar-expand-lg">
|
<nav class="navbar navbar-expand-lg">
|
||||||
<a class="navbar-brand" href="/">sist2</a>
|
<a class="navbar-brand" href="/">sist2</a>
|
||||||
<span class="badge badge-pill version">2.8.1</span>
|
<span class="badge badge-pill version">2.8.2</span>
|
||||||
<span class="tagline">Lightning-fast file system indexer and search tool </span>
|
<span class="tagline">Lightning-fast file system indexer and search tool </span>
|
||||||
<a style="margin-left: auto" class="btn" href="/">Back</a>
|
<a style="margin-left: auto" class="btn" href="/">Back</a>
|
||||||
<button class="btn" type="button" data-toggle="modal" data-target="#settings"
|
<button class="btn" type="button" data-toggle="modal" data-target="#settings"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
third-party/libscan
vendored
2
third-party/libscan
vendored
Submodule third-party/libscan updated: b6e748f193...33f5fb8e2c
Reference in New Issue
Block a user