diff --git a/webapp/eslint.config.mjs b/webapp/eslint.config.mjs index 535c4e98..e7c8f7b4 100644 --- a/webapp/eslint.config.mjs +++ b/webapp/eslint.config.mjs @@ -5,7 +5,7 @@ import prettierConfig from "eslint-config-prettier"; import globals from "globals"; import pinia from "eslint-plugin-pinia"; -const isProd = process.env.NODE_ENV === "production"; +const isDev = process.env.NODE_ENV === "development"; export default [ { @@ -38,8 +38,8 @@ export default [ rules: { "prettier/prettier": "warn", // Environment-based rules - "no-console": isProd ? "warn" : "off", - "no-debugger": isProd ? "warn" : "off", + "no-console": isDev ? "off" : ["warn", { allow: ["warn", "error"] }], + "no-debugger": isDev ? "off" : "warn", // Vue deprecations "vue/no-deprecated-slot-attribute": "warn", diff --git a/webapp/src/App.vue b/webapp/src/App.vue index 5d06de65..c603d280 100644 --- a/webapp/src/App.vue +++ b/webapp/src/App.vue @@ -387,11 +387,4 @@ html { padding: 0; height: 100%; } - -.thumbnail-fit { - max-height: 120px; - max-width: 240px; - object-fit: contain; - overflow-y: hidden; -} diff --git a/webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue b/webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue index d9b32d11..8e8af469 100644 --- a/webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue +++ b/webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue @@ -5,10 +5,11 @@
@@ -192,4 +193,19 @@ ul { .gallery-card-title { text-align: center; } + +.thumbnail-fit { + max-height: 120px; + max-width: 240px; + object-fit: contain; + overflow-y: hidden; +} + +.clickable { + cursor: pointer; +} + +.disabled { + cursor: not-allowed; +} diff --git a/webapp/src/components/tabContentComponents/galleryContent.vue b/webapp/src/components/tabContentComponents/galleryContent.vue index 0b3313cf..2e679d62 100644 --- a/webapp/src/components/tabContentComponents/galleryContent.vue +++ b/webapp/src/components/tabContentComponents/galleryContent.vue @@ -61,7 +61,7 @@ @@ -119,8 +119,7 @@ export default { return null; } }, - // name changed as paginateLinks has the prop totalPages - numberOfPages() { + totalPages() { return Math.ceil((this.all_items?.length || 0) / this.itemsPerPage); }, paginatedItems() { @@ -190,7 +189,6 @@ export default { return b.created - a.created; }); this.all_items = all_items; - console.debug("Gallery size: %s", this.all_items.length); } catch (err) { console.error("Failed to refresh gallery items."); console.error(err);