From 432c1d559873e5a0450f67bfd78b945faa1f6bd1 Mon Sep 17 00:00:00 2001 From: weaponsforge Date: Wed, 7 May 2025 21:02:34 +0800 Subject: [PATCH 1/3] fix: typo errors and update text content --- README.md | 2 +- client/Dockerfile | 8 ++++---- .../features/filecards/constants/cardorderedlabels.json | 2 +- client/features/filecards/constants/cardviewlabels.json | 2 +- client/pages/index.js | 2 +- server/Dockerfile | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 895d842..8a59032 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ https://sites.google.com/view/gsites-embed-app/full-page 1. **NextJS v13.0.4** (client-side SSG) - NextJS is one of the @latest React frameworks officially endorsed on the react.dev website - NextJS's Static Side Generation (SSG) feature, combined with Incremental Static Generation (ISG) creates SEO-optimized websites fit for uploading on static hosting services such as GitHub Pages. - - NextJS offers code automatic code-splitting, enabling a smaller download footprint per page route + - NextJS offers automatic code-splitting, enabling a smaller download footprint per page route 2. **React 18.2.0** - React version 18's is the latest react version as of this writing 3. **@reduxjs/toolkit v1.9.3** diff --git a/client/Dockerfile b/client/Dockerfile index 9217d1a..8c44150 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.15.0-alpine as base +FROM node:20.15.0-alpine AS base RUN mkdir -p /opt/client WORKDIR /opt/client RUN adduser -S client @@ -6,14 +6,14 @@ RUN chown -R client /opt/client COPY package*.json ./ # BUILD TARGET -FROM base as build +FROM base AS build RUN npm install && npm cache clean --force COPY . ./ RUN npm run export USER client # DEVELOPMENT CLIENT PROFILE -FROM base as development +FROM base AS development ENV NODE_ENV=development RUN npm install && npm cache clean --force COPY . ./ @@ -21,7 +21,7 @@ EXPOSE 3000 CMD ["npm", "run", "dev"] # PRODUCTION CLIENT PROFILE -FROM nginx:1.22.0-alpine as production +FROM nginx:1.22.0-alpine AS production COPY --from=build /opt/client/out /usr/share/nginx/html RUN rm /etc/nginx/conf.d/default.conf COPY config/nginx/nginx.conf /etc/nginx/conf.d diff --git a/client/features/filecards/constants/cardorderedlabels.json b/client/features/filecards/constants/cardorderedlabels.json index 69c52d5..df09d26 100644 --- a/client/features/filecards/constants/cardorderedlabels.json +++ b/client/features/filecards/constants/cardorderedlabels.json @@ -5,7 +5,7 @@ { "key": "category", "label": "Category" }, { "key": "description", "label": "Description" }, { "key": "picture_url", "label": "Picture URL" }, - { "key": "download_url", "label": "Download URL" }, + { "key": "download_url", "label": "File Download URL" }, { "key": "website_url", "label": "Website URL" }, { "key": "date_created", "label": "Date Created" }, { "key": "date_updated", "label": "Date Updated" } diff --git a/client/features/filecards/constants/cardviewlabels.json b/client/features/filecards/constants/cardviewlabels.json index 4d60394..5c23ebb 100644 --- a/client/features/filecards/constants/cardviewlabels.json +++ b/client/features/filecards/constants/cardviewlabels.json @@ -1,6 +1,6 @@ [ { "key": "picture_url", "label": "Picture URL" }, - { "key": "download_url", "label": "Download URL" }, + { "key": "download_url", "label": "File Download URL" }, { "key": "mime_type", "label": "File Type" }, { "key": "website_url", "label": "Website URL" } ] diff --git a/client/pages/index.js b/client/pages/index.js index d01f89f..0e11c9b 100644 --- a/client/pages/index.js +++ b/client/pages/index.js @@ -46,7 +46,7 @@ export default function Home() { CMS

- Content Management System (CMS) for Posts. + Content Management System (CMS) for Posts and File Cards.

diff --git a/server/Dockerfile b/server/Dockerfile index d37afb4..909341a 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,5 +1,5 @@ # BASE PROFILE -FROM node:20.15.0-alpine as base +FROM node:20.15.0-alpine AS base RUN mkdir -p /opt/server WORKDIR /opt/server RUN adduser -S server @@ -7,7 +7,7 @@ RUN chown -R server /opt/server COPY package*.json ./ # DEVELOPMENT PROFILE -FROM base as development +FROM base AS development RUN npm install && npm cache clean --force COPY . ./ USER server From eb5a26ca8caab6bdac7166065d61991834833fbf Mon Sep 17 00:00:00 2001 From: weaponsforge Date: Wed, 7 May 2025 21:11:17 +0800 Subject: [PATCH 2/3] fix: use appropriate prompt when deleting a file card --- client/features/filecards/containers/viewcard/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/features/filecards/containers/viewcard/index.js b/client/features/filecards/containers/viewcard/index.js index b5c688d..828d753 100644 --- a/client/features/filecards/containers/viewcard/index.js +++ b/client/features/filecards/containers/viewcard/index.js @@ -9,9 +9,9 @@ import useDeleteCard from '../../hooks/usedeletecard' import ViewCardComponent from '../../components/viewcard' const actionDeleteSettings = { - title: 'Delete Post', - message: 'Are you sure you want to delete this Post?', - success: 'Post deleted.' + title: 'Delete File Card', + message: 'Are you sure you want to delete this File Card?', + success: 'File Card deleted.' } const ACTION_TYPES = { From a88a55637f1c77382682a86379d2bc2396c0ec64 Mon Sep 17 00:00:00 2001 From: weaponsforge Date: Wed, 7 May 2025 21:12:38 +0800 Subject: [PATCH 3/3] feat: increase max file size upload limit to 8 mb, #129 --- client/storage.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/storage.rules b/client/storage.rules index f2fad5d..3222980 100644 --- a/client/storage.rules +++ b/client/storage.rules @@ -60,9 +60,9 @@ service firebase.storage { || requestData.name.matches('users/.*/.*_thumbnail')); } - // Only allow uploads of any file that's less than 4MB + // Only allow uploads of any file that's less than 8MB function validFileSize (requestData) { - return requestData.size < 4 * 1024 * 1024; + return requestData.size < 8 * 1024 * 1024; } // FILES matching rules --------------------------------------------------------