Rename getCustomPromptsUsedSpace to getLocalStorageUsedSpace for clarity and update references
This commit is contained in:
parent
509b8de8e0
commit
2351034e3c
2 changed files with 3 additions and 3 deletions
|
|
@ -587,7 +587,7 @@ const insertHtml = function (replyHtml, fullBody_string) {
|
||||||
return fullBody.body.innerHTML;
|
return fullBody.body.innerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getCustomPromptsUsedSpace(){
|
export async function getLocalStorageUsedSpace(){
|
||||||
// we can't use this, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1385832
|
// we can't use this, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1385832
|
||||||
//let customprompts_space = await browser.storage.local.getBytesInUse("_custom_prompt");
|
//let customprompts_space = await browser.storage.local.getBytesInUse("_custom_prompt");
|
||||||
//let's use a workaround
|
//let's use a workaround
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
import { prefs_default } from "../../options/mzta-options-default.js";
|
import { prefs_default } from "../../options/mzta-options-default.js";
|
||||||
import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js";
|
import { getPrompts, setDefaultPromptsProperties, setCustomPrompts, preparePromptsForExport, preparePromptsForImport } from "../../js/mzta-prompts.js";
|
||||||
import { ChatGPTWeb_models, isThunderbird128OrGreater, getCustomPromptsUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb, getChatGPTWebModelsList_HTML } from "../../js/mzta-utils.js";
|
import { ChatGPTWeb_models, isThunderbird128OrGreater, getLocalStorageUsedSpace, sanitizeHtml, validateCustomData_ChatGPTWeb, getChatGPTWebModelsList_HTML } from "../../js/mzta-utils.js";
|
||||||
import { taLogger } from "../../js/mzta-logger.js";
|
import { taLogger } from "../../js/mzta-logger.js";
|
||||||
import { getPlaceholders } from "../../js/mzta-placeholders.js";
|
import { getPlaceholders } from "../../js/mzta-placeholders.js";
|
||||||
import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js";
|
import { textareaAutocomplete } from "../../js/mzta-placeholders-autocomplete.js";
|
||||||
|
|
@ -936,7 +936,7 @@ function clearMessage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setStorageSpace() {
|
async function setStorageSpace() {
|
||||||
let storage_space = await getCustomPromptsUsedSpace();
|
let storage_space = await getLocalStorageUsedSpace();
|
||||||
document.getElementById('storage_space').textContent = storage_space;
|
document.getElementById('storage_space').textContent = storage_space;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue