Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ jobs:





2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@ jobs:





4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ docker-compose.test.yml
**/public/sw.js.map
**/public/workbox-*.js.map
**/public/worker-*.js.map

# ide
.idea

7 changes: 7 additions & 0 deletions .npm-audit-resolver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"overrides": {
"ip": {
"ip": "ignore"
}
}
}
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## How to contribute

Hi, it's amazing having a community willing to push new feature to the app, and I am VERY open to contributors pushing their idea, it's what makes open source amazing.

That said for the sake of sanity let's all follow the same structure:

- Please if you use AI, make sure to clean up the code and don't leave obvious bloat. You can help yourself with a [little tool I built](https://fccview.github.io/ackchyually-ai/) to make sure code is properly reviewed.
- Use pre-existing components, keep styling consistent, please don't hardcode html classes/inline styling, especially if a component alraedy exists.
- When creating a new branch, do off from the `develop` branch, this will always be ahead of `main` and it's what gets released.
- When creating a pull request, direct it back into `develop`, I' ll then review it and merge it. Your code will end up in the next release that way and we all avoid conflicts!

Please bear with on reviews, it may take a bit of time for me to go through it all on top of life/work/hobbies :)
31 changes: 16 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
# Use Node 20 Alpine
FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache libc6-compat python3 make g++
WORKDIR /app

COPY package.json yarn.lock* ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .


# Disable telemetry
ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED=1

RUN yarn build

# Production image
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# Create data directories
RUN mkdir -p /data/uploads/temp /data/config/avatars && chown -R nextjs:nodejs /data
RUN mkdir -p \
/data/uploads/temp \
/data/config/avatars \
/data/config/torrents \
/data/config/keys \
/data/audit-logs \
/app/.next/cache && \
chown -R nextjs:nodejs /data /app/.next

COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

COPY --from=builder /app/public ./public

USER nextjs

EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Watch a quick demo of some of the app functionality [here](https://www.youtube.c

## Quick nav

- [How to contribute](#contribute)
- [Features](#features)
- [Tech Stack](#tech-stack)
- [Getting Started](#getting-started)
Expand All @@ -62,18 +61,6 @@ Watch a quick demo of some of the app functionality [here](https://www.youtube.c
</a>
</p>

<a id="contribute"></a>

## How to contribute

Hi, it's amazing having a community willing to push new feature to the app, and I am VERY open to contributors pushing their idea, it's what makes open source amazing.

That said for the sake of sanity let's all follow the same structure:

- When creating a new branch, do off from the `develop` branch, this will always be ahead of `main` and it's what gets released
- When creating a pull request, direct it back into `develop`, I' ll then review it and merge it. Your code will end up in the next release that way and we all avoid conflicts!
- Please bear with on reviews, it may take a bit of time for me to go through it all on top of life/work/hobbies :)

<a id="features"></a>

## Features
Expand Down
2 changes: 2 additions & 0 deletions app/_components/FeatureComponents/FilesPage/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ export default function EmptyState() {





Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import { useSidebar } from "@/app/_providers/SidebarProvider";
interface MobileSidebarWrapperProps {
sidebar: React.ReactNode;
children: React.ReactNode;
title?: string;
}

export default function MobileSidebarWrapper({
sidebar,
children,
title = "Folders",
}: MobileSidebarWrapperProps) {
const { isSidebarOpen, openSidebar, closeSidebar } = useSidebar();
const sidebarRef = useRef<HTMLDivElement>(null);
Expand All @@ -22,7 +24,8 @@ export default function MobileSidebarWrapper({
const handleTouchStart = (e: TouchEvent) => {
if (isSidebarOpen) return;
const touch = e.touches[0];
if (touch.clientX < 20) {
const screenWidth = window.innerWidth;
if (touch.clientX < screenWidth * 0.3) {
touchStartX.current = touch.clientX;
touchStartY.current = touch.clientY;
}
Expand Down Expand Up @@ -54,8 +57,8 @@ export default function MobileSidebarWrapper({
touchStartY.current = null;
};

document.addEventListener("touchstart", handleTouchStart);
document.addEventListener("touchmove", handleTouchMove);
document.addEventListener("touchstart", handleTouchStart, { passive: true });
document.addEventListener("touchmove", handleTouchMove, { passive: true });
document.addEventListener("touchend", handleTouchEnd);

return () => {
Expand Down Expand Up @@ -101,13 +104,12 @@ export default function MobileSidebarWrapper({

<aside
ref={sidebarRef}
className={`fixed inset-y-0 left-0 w-[80%] bg-sidebar z-50 transform transition-transform duration-300 medium:hidden overflow-hidden ${
isSidebarOpen ? "translate-x-0" : "-translate-x-full"
className={`fixed inset-y-0 left-0 w-[80%] bg-sidebar z-50 transform transition-transform duration-300 medium:hidden overflow-hidden ${isSidebarOpen ? "translate-x-0" : "-translate-x-full"
}`}
>
<div className="h-full flex flex-col">
<div className="flex items-center justify-between p-4">
<h2 className="text-lg font-semibold text-on-surface">Folders</h2>
<h2 className="text-lg font-semibold text-on-surface">{title}</h2>
<IconButton
icon="close"
size="sm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ export default function SearchAndSortBar() {





Loading