feat: Lots of new improvements v0.0.4 #28

Merged
rdenadai merged 1 commit from rdenadai/improvements-v0.0.4 into main 2025-11-06 01:51:43 +00:00
Owner

Improvements v0.0.4

Summary

This PR introduces several enhancements to the web application, including pull-to-refresh functionality, image upload support for posts, video embed handling, secure cookie-based authentication, analytics integration, and various UI improvements.

New Features

Pull-to-Refresh

  • Added pull-to-refresh functionality on Timeline, Feed, and Notifications views
  • Implemented composable usePullToRefresh.js with support for both touch and mouse events
  • Visual feedback with animated spinner and progress indicator

Image Upload for Posts

  • Users can now attach up to 4 images when creating posts
  • Added image preview with remove capability
  • Implemented uploadImage function in atproto service
  • File selector integrated in CreatePostView modal

Video Embed Support

  • Added support for video embeds (mp4, webm, ogg, m3u8)
  • Video player now renders for supported video formats in ExternalElement component
  • Video embeds displayed in PostView and RedirectPostView

Secure Cookie Authentication

  • Implemented useSecureCookie.js composable with encrypted data storage
  • Migrated auth store from sessionStorage to secure cookies with base64 encryption
  • Added automatic cookie invalidation after 10 minutes
  • Cookies set with Secure and SameSite=Strict flags

Analytics

  • Integrated Google Analytics (gtag.js) in index.html

Improvements

Caching Strategy

  • Changed cache mechanism from useSessionStorage to useLocalStorage for better persistence

Post Display

  • Fixed repost count to include quote count
  • Improved nested post rendering with better border styling
  • Added showInternalEmbeds prop for controlling video embed display

UI/UX Enhancements

  • Improved ImageList component with dynamic width calculation
  • Better close button styling in ToastNotification component
  • Adjusted z-index values for proper layering (reduced from z-50 to z-10)
  • Enhanced responsive layout for post creation modal

Code Quality

  • Converted function declarations to arrow functions in composables for consistency
  • Improved code formatting and consistency across files
  • Better error handling in image upload flow

Technical Changes

Composables

  • useCache.js: Switched from sessionStorage to localStorage
  • useInstallPrompt.js: Refactored to arrow functions
  • useOnline.js: Code formatting improvements
  • useProfile.js: Converted to arrow function
  • useToast.js: Converted to arrow function
  • New: usePullToRefresh.js for refresh functionality
  • New: useSecureCookie.js for secure storage

Services

  • Added uploadImage function to atproto service
  • Modified createPost to support image attachments with embed handling

Authentication

  • Complete migration of auth store to use secure cookies
  • Automatic session cleanup and validation
  • Token refresh mechanism maintained with cookie storage

Router

  • Added debug logging for session checking
## Improvements v0.0.4 ### Summary This PR introduces several enhancements to the web application, including pull-to-refresh functionality, image upload support for posts, video embed handling, secure cookie-based authentication, analytics integration, and various UI improvements. ### New Features **Pull-to-Refresh** - Added pull-to-refresh functionality on Timeline, Feed, and Notifications views - Implemented composable `usePullToRefresh.js` with support for both touch and mouse events - Visual feedback with animated spinner and progress indicator **Image Upload for Posts** - Users can now attach up to 4 images when creating posts - Added image preview with remove capability - Implemented `uploadImage` function in atproto service - File selector integrated in CreatePostView modal **Video Embed Support** - Added support for video embeds (mp4, webm, ogg, m3u8) - Video player now renders for supported video formats in ExternalElement component - Video embeds displayed in PostView and RedirectPostView **Secure Cookie Authentication** - Implemented `useSecureCookie.js` composable with encrypted data storage - Migrated auth store from sessionStorage to secure cookies with base64 encryption - Added automatic cookie invalidation after 10 minutes - Cookies set with Secure and SameSite=Strict flags **Analytics** - Integrated Google Analytics (gtag.js) in index.html ### Improvements **Caching Strategy** - Changed cache mechanism from `useSessionStorage` to `useLocalStorage` for better persistence **Post Display** - Fixed repost count to include quote count - Improved nested post rendering with better border styling - Added `showInternalEmbeds` prop for controlling video embed display **UI/UX Enhancements** - Improved ImageList component with dynamic width calculation - Better close button styling in ToastNotification component - Adjusted z-index values for proper layering (reduced from z-50 to z-10) - Enhanced responsive layout for post creation modal **Code Quality** - Converted function declarations to arrow functions in composables for consistency - Improved code formatting and consistency across files - Better error handling in image upload flow ### Technical Changes **Composables** - `useCache.js`: Switched from sessionStorage to localStorage - `useInstallPrompt.js`: Refactored to arrow functions - `useOnline.js`: Code formatting improvements - `useProfile.js`: Converted to arrow function - `useToast.js`: Converted to arrow function - New: `usePullToRefresh.js` for refresh functionality - New: `useSecureCookie.js` for secure storage **Services** - Added `uploadImage` function to atproto service - Modified `createPost` to support image attachments with embed handling **Authentication** - Complete migration of auth store to use secure cookies - Automatic session cleanup and validation - Token refresh mechanism maintained with cookie storage **Router** - Added debug logging for session checking
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rdenadai/web.redecapivara.social!28
No description provided.