Tell users how to drag and drop.
This commit is contained in:
parent
4ff3b337e2
commit
056fef6831
|
@ -2,7 +2,6 @@ import {
|
||||||
eventSource,
|
eventSource,
|
||||||
this_chid,
|
this_chid,
|
||||||
characters,
|
characters,
|
||||||
callPopup,
|
|
||||||
getRequestHeaders,
|
getRequestHeaders,
|
||||||
} from "../../../script.js";
|
} from "../../../script.js";
|
||||||
import { selected_group } from "../../group-chats.js";
|
import { selected_group } from "../../group-chats.js";
|
||||||
|
@ -14,8 +13,11 @@ const extensionName = "gallery";
|
||||||
const extensionFolderPath = `scripts/extensions/${extensionName}/`;
|
const extensionFolderPath = `scripts/extensions/${extensionName}/`;
|
||||||
let firstTime = true;
|
let firstTime = true;
|
||||||
|
|
||||||
// TODO:Some user wanted the gallery to be detachable / movable.For hmm, good chatting experience.I think it's easy to make any block movable with Ross's function, you need to check this out.
|
// Exposed defaults for future tweaking
|
||||||
// TODO:Haven't seen any guidance on how to populate the gallery in-app still.
|
let thumbnailHeight = 150;
|
||||||
|
let paginationVisiblePages = 10;
|
||||||
|
let paginationMaxLinesPerPage = 2;
|
||||||
|
let galleryMaxRows = 3;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,10 +56,10 @@ async function initGallery(items, url) {
|
||||||
$("#dragGallery").nanogallery2({
|
$("#dragGallery").nanogallery2({
|
||||||
"items": items,
|
"items": items,
|
||||||
thumbnailWidth: 'auto',
|
thumbnailWidth: 'auto',
|
||||||
thumbnailHeight: 150,
|
thumbnailHeight: thumbnailHeight,
|
||||||
paginationVisiblePages: 5,
|
paginationVisiblePages: paginationVisiblePages,
|
||||||
paginationMaxLinesPerPage: 2,
|
paginationMaxLinesPerPage: paginationMaxLinesPerPage,
|
||||||
galleryMaxRows : 3,
|
galleryMaxRows: galleryMaxRows,
|
||||||
galleryPaginationTopButtons: false,
|
galleryPaginationTopButtons: false,
|
||||||
galleryNavigationOverlayButtons: true,
|
galleryNavigationOverlayButtons: true,
|
||||||
galleryTheme: {
|
galleryTheme: {
|
||||||
|
@ -142,6 +144,7 @@ async function showCharGallery() {
|
||||||
"js"
|
"js"
|
||||||
);
|
);
|
||||||
firstTime = false;
|
firstTime = false;
|
||||||
|
toastr.info("Images can also be found in the folder `user/images`", "Drag and drop images onto the gallery to upload them");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
"js": "index.js",
|
"js": "index.js",
|
||||||
"css": "",
|
"css": "",
|
||||||
"author": "City-Unit",
|
"author": "City-Unit",
|
||||||
"version": "1.0.0",
|
"version": "1.5.0",
|
||||||
"homePage": "https://github.com/SillyTavern/SillyTavern"
|
"homePage": "https://github.com/SillyTavern/SillyTavern"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue