diff --git a/.cspell.json b/.cspell.json index fad8e89..f13a2ab 100644 --- a/.cspell.json +++ b/.cspell.json @@ -3,9 +3,11 @@ "language": "en", "words": [ "AGPL", + "APPDATA", "Argyris", "CSRF", "EACCESS", + "EXIF", "Hintjens", "Kata", "LGPL", @@ -39,6 +41,7 @@ "patchbay", "patchfoo", "patchfox", + "piexifjs", "promisify", "rebecca", "recps", diff --git a/docs/configuring.md b/docs/configuring.md index 8751702..8c58f71 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -5,7 +5,6 @@ standard folder for configuration, depending on your operating system: - Linux: `$XDG_CONFIG_HOME/oasis/default.json`. Usually this is `/home//.config/oasis/default.json` - - Windows `%APPDATA%\oasis\default.json`. - Mac OS, `/Users//Library/Preferences/oasis/default.json` diff --git a/src/index.js b/src/index.js index 80321e8..6fe9928 100755 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,6 @@ const path = require("path"); const envPaths = require("env-paths"); const cli = require("./cli"); const fs = require("fs"); -// cspell:disable-next-line const exif = require("piexifjs"); const defaultConfig = {}; @@ -219,7 +218,6 @@ const preparePreview = async function (ctx) { return { authorMeta, text, mentions }; }; -// cspell:disable // handleBlobUpload ingests an uploaded form file. // it takes care of maximum blob size (5meg), exif stripping and mime detection. // finally it returns the correct markdown link for the blob depending on the mime-type. @@ -284,11 +282,11 @@ const handleBlobUpload = async function (ctx) { name: blobUpload.name, }; - // determain encoding to add the correct markdown link + // determine encoding to add the correct markdown link const FileType = require("file-type"); try { - let ftype = await FileType.fromBuffer(data); - blob.mime = ftype.mime; + let fileType = await FileType.fromBuffer(data); + blob.mime = fileType.mime; } catch (error) { console.warn(error); blob.mime = "application/octet-stream"; @@ -305,7 +303,6 @@ const handleBlobUpload = async function (ctx) { return `\n[${blob.name}](${blob.id})`; } }; -// cspell:enable const resolveCommentComponents = async function (ctx) { const { message } = ctx.params; diff --git a/src/models.js b/src/models.js index 760bb37..842f87b 100644 --- a/src/models.js +++ b/src/models.js @@ -427,14 +427,19 @@ module.exports = ({ cooler, isPublic }) => { }), /** * @param feedId {string} - * @returns {Promise<{me: boolean, following: boolean, blocking: boolean }>} + * @returns {Promise<{me: boolean, following: boolean, blocking: boolean, followsMe: boolean }>} */ getRelationship: async (feedId) => { const ssb = await cooler.open(); const { id } = ssb; if (feedId === id) { - return { me: true, following: false, blocking: false }; + return { + me: true, + following: false, + blocking: false, + followsMe: false, + }; } const isFollowing = await ssb.friends.isFollowing({ @@ -456,7 +461,6 @@ module.exports = ({ cooler, isPublic }) => { me: false, following: isFollowing, blocking: isBlocking, - // @ts-ignore followsMe: followsMe, }; }, diff --git a/src/views/index.js b/src/views/index.js index 03047a5..a27d805 100644 --- a/src/views/index.js +++ b/src/views/index.js @@ -1107,13 +1107,13 @@ exports.settingsView = ({ status, peers, theme, themeNames, version }) => { { action: "/language", method: "post" }, select({ name: "language" }, [ // Languages are sorted alphabetically by their 'long name'. - /* cspell:disable */ + /* spell-checker:disable */ languageOption("Deutsch", "de"), languageOption("English", "en"), languageOption("Español", "es"), languageOption("Français", "fr"), languageOption("Italiano", "it"), - /* cspell:enable */ + /* spell-checker:enable */ ]), button({ type: "submit" }, i18n.setLanguage) ),