feat: rename plebchan to 5chan

This commit is contained in:
plebeius
2025-10-17 23:30:35 +02:00
parent e1f1f280cc
commit 1360dd8348
71 changed files with 316 additions and 316 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { useAccount, setAccount } from '@plebbit/plebbit-react-hooks';
import { getAutoSubscribeAddresses, useDefaultSubplebbits } from './use-default-subplebbits';
import { useAutoSubscribeStore } from '../stores/use-auto-subscribe-store';
const AUTO_SUBSCRIBE_KEY_PREFIX = 'plebchan-auto-subscribe-done-';
const AUTO_SUBSCRIBE_KEY_PREFIX = '5chan-auto-subscribe-done-';
// Keep track of which accounts have been processed globally
const processedAccounts = new Set<string>();
+2 -2
View File
@@ -12,7 +12,7 @@ export interface MultisubSubplebbit {
address: string;
tags?: string[];
features?: string[];
plebchanAutoSubscribe?: boolean;
autoSubscribe5Chan?: boolean;
lowUptime?: boolean;
}
@@ -58,7 +58,7 @@ export const useDefaultSubplebbits = () => {
// Cache auto-subscribe addresses when we fetch subplebbits
cacheAutoSubscribeAddresses = filteredSubplebbits
.filter((sub: MultisubSubplebbit) => sub.plebchanAutoSubscribe && sub.address)
.filter((sub: MultisubSubplebbit) => sub.autoSubscribe5Chan && sub.address)
.map((sub: MultisubSubplebbit) => sub.address);
setState({
+1 -1
View File
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js';
const gifFrameDb = localForageLru.createInstance({ name: 'plebchanGifFrames', size: 500 });
const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 });
const getCachedGifFrame = async (url: string): Promise<string | null> => {
return await gifFrameDb.getItem(url);
+2 -2
View File
@@ -2,11 +2,11 @@ import assert from 'assert';
import { useParams } from 'react-router-dom';
// the timestamp the last time the user visited
const lastVisitTimestamp = localStorage.getItem('plebchanLastVisitTimestamp');
const lastVisitTimestamp = localStorage.getItem('5chanLastVisitTimestamp');
// update the last visited timestamp every n seconds
setInterval(() => {
localStorage.setItem('plebchanLastVisitTimestamp', Date.now().toString());
localStorage.setItem('5chanLastVisitTimestamp', Date.now().toString());
}, 60 * 1000);
const timeFilterNamesToSeconds: Record<string, number | undefined> = {