feat: use notes instead of posts
This commit is contained in:
parent
203f5f2841
commit
d50787e3f2
@ -195,6 +195,15 @@ export class MultiAccountStore extends ExternalStore<LoginSession> {
|
||||
window.localStorage.removeItem(LegacyKeys.RelayListKey);
|
||||
window.localStorage.removeItem(LegacyKeys.FollowList);
|
||||
window.localStorage.removeItem(LegacyKeys.NotificationsReadItem);
|
||||
|
||||
// replace default tab with notes
|
||||
for (const [, v] of this.#accounts) {
|
||||
if ((v.preferences.defaultRootTab as string) === "posts") {
|
||||
v.preferences.defaultRootTab = "notes";
|
||||
didMigrate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (didMigrate) {
|
||||
console.debug("Finished migration to MultiAccountStore");
|
||||
this.#save();
|
||||
|
@ -55,7 +55,7 @@ export interface UserPreferences {
|
||||
/**
|
||||
* Default page to select on load
|
||||
*/
|
||||
defaultRootTab: "posts" | "conversations" | "global";
|
||||
defaultRootTab: "notes" | "conversations" | "global";
|
||||
|
||||
/**
|
||||
* Default zap amount
|
||||
@ -79,7 +79,7 @@ export const DefaultPreferences = {
|
||||
autoShowLatest: false,
|
||||
fileUploader: "void.cat",
|
||||
imgProxyConfig: DefaultImgProxy,
|
||||
defaultRootTab: "posts",
|
||||
defaultRootTab: "notes",
|
||||
defaultZapAmount: 50,
|
||||
autoZap: false,
|
||||
} as UserPreferences;
|
||||
|
@ -25,12 +25,12 @@ export default function RootPage() {
|
||||
const { publicKey: pubKey, tags, preferences } = useLogin();
|
||||
|
||||
const RootTab: Record<string, Tab> = {
|
||||
Posts: {
|
||||
text: formatMessage(messages.Posts),
|
||||
Notes: {
|
||||
text: formatMessage(messages.Notes),
|
||||
value: 0,
|
||||
data: "/posts",
|
||||
data: "/notes",
|
||||
},
|
||||
PostsAndReplies: {
|
||||
Conversations: {
|
||||
text: formatMessage(messages.Conversations),
|
||||
value: 1,
|
||||
data: "/conversations",
|
||||
@ -50,7 +50,7 @@ export default function RootPage() {
|
||||
const tagTabs = tags.item.map((t, idx) => {
|
||||
return { text: `#${t}`, value: idx + 3, data: `/tag/${t}` };
|
||||
});
|
||||
const tabs = [RootTab.Posts, RootTab.PostsAndReplies, RootTab.Global, RootTab.Discover, ...tagTabs];
|
||||
const tabs = [RootTab.Notes, RootTab.Conversations, RootTab.Global, RootTab.Discover, ...tagTabs];
|
||||
const tab = useMemo(() => {
|
||||
const pTab = location.pathname.split("/").slice(-1)[0];
|
||||
|
||||
@ -64,7 +64,7 @@ export default function RootPage() {
|
||||
|
||||
switch (pTab) {
|
||||
case "conversations": {
|
||||
return RootTab.PostsAndReplies;
|
||||
return RootTab.NotesAndReplies;
|
||||
}
|
||||
case "global": {
|
||||
return RootTab.Global;
|
||||
@ -73,7 +73,7 @@ export default function RootPage() {
|
||||
return RootTab.Discover;
|
||||
}
|
||||
default: {
|
||||
return RootTab.Posts;
|
||||
return RootTab.Notes;
|
||||
}
|
||||
}
|
||||
}, [location]);
|
||||
@ -195,7 +195,7 @@ const GlobalTab = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const PostsTab = () => {
|
||||
const NotesTab = () => {
|
||||
const { follows, publicKey } = useLogin();
|
||||
const subject: TimelineSubject = {
|
||||
type: "pubkey",
|
||||
@ -239,8 +239,8 @@ export const RootRoutes = [
|
||||
element: <GlobalTab />,
|
||||
},
|
||||
{
|
||||
path: "posts",
|
||||
element: <PostsTab />,
|
||||
path: "notes",
|
||||
element: <NotesTab />,
|
||||
},
|
||||
{
|
||||
path: "conversations",
|
||||
|
@ -2,7 +2,6 @@ import { defineMessages } from "react-intl";
|
||||
|
||||
export default defineMessages({
|
||||
Login: { defaultMessage: "Login" },
|
||||
Posts: { defaultMessage: "Posts" },
|
||||
Conversations: { defaultMessage: "Conversations" },
|
||||
Global: { defaultMessage: "Global" },
|
||||
NewUsers: { defaultMessage: "New users page" },
|
||||
|
@ -115,8 +115,8 @@ const PreferencesPage = () => {
|
||||
defaultRootTab: e.target.value,
|
||||
} as UserPreferences)
|
||||
}>
|
||||
<option value="posts">
|
||||
<FormattedMessage {...messages.Posts} />
|
||||
<option value="notes">
|
||||
<FormattedMessage defaultMessage="Notes" />
|
||||
</option>
|
||||
<option value="conversations">
|
||||
<FormattedMessage {...messages.Conversations} />
|
||||
|
@ -16,12 +16,11 @@ export default defineMessages({
|
||||
Light: { defaultMessage: "Light" },
|
||||
Dark: { defaultMessage: "Dark" },
|
||||
DefaultRootTab: { defaultMessage: "Default Page" },
|
||||
Posts: { defaultMessage: "Posts" },
|
||||
Conversations: { defaultMessage: "Conversations" },
|
||||
Global: { defaultMessage: "Global" },
|
||||
AutoloadMedia: { defaultMessage: "Automatically load media" },
|
||||
AutoloadMediaHelp: {
|
||||
defaultMessage: "Media in posts will automatically be shown for selected people, otherwise only the link will show",
|
||||
defaultMessage: "Media in notes will automatically be shown for selected people, otherwise only the link will show",
|
||||
},
|
||||
None: { defaultMessage: "None" },
|
||||
FollowsOnly: { defaultMessage: "Follows only" },
|
||||
@ -38,7 +37,7 @@ export default defineMessages({
|
||||
ConfirmReposts: { defaultMessage: "Confirm Reposts" },
|
||||
ConfirmRepostsHelp: { defaultMessage: "Reposts need to be manually confirmed" },
|
||||
ShowLatest: { defaultMessage: "Automatically show latest notes" },
|
||||
ShowLatestHelp: { defaultMessage: "Notes will stream in real time into global and posts tab" },
|
||||
ShowLatestHelp: { defaultMessage: "Notes will stream in real time into global and notes tab" },
|
||||
FileUpload: { defaultMessage: "File upload service" },
|
||||
FileUploadHelp: { defaultMessage: "Pick which upload service you want to upload attachments to" },
|
||||
Default: { defaultMessage: "(Default)" },
|
||||
|
@ -326,9 +326,6 @@
|
||||
"DqLx9k": {
|
||||
"defaultMessage": "You must pay {n} sats to access this file."
|
||||
},
|
||||
"Dt/Zd5": {
|
||||
"defaultMessage": "Media in posts will automatically be shown for selected people, otherwise only the link will show"
|
||||
},
|
||||
"DtYelJ": {
|
||||
"defaultMessage": "Transfer"
|
||||
},
|
||||
@ -668,6 +665,9 @@
|
||||
"Ss0sWu": {
|
||||
"defaultMessage": "Pay Now"
|
||||
},
|
||||
"TDR5ge": {
|
||||
"defaultMessage": "Media in notes will automatically be shown for selected people, otherwise only the link will show"
|
||||
},
|
||||
"TMfYfY": {
|
||||
"defaultMessage": "Cashu token"
|
||||
},
|
||||
@ -782,6 +782,9 @@
|
||||
"a5UPxh": {
|
||||
"defaultMessage": "Fund developers and platforms providing NIP-05 verification services"
|
||||
},
|
||||
"a7TDNm": {
|
||||
"defaultMessage": "Notes will stream in real time into global and notes tab"
|
||||
},
|
||||
"aWpBzj": {
|
||||
"defaultMessage": "Show more"
|
||||
},
|
||||
@ -863,9 +866,6 @@
|
||||
"eJj8HD": {
|
||||
"defaultMessage": "Get Verified"
|
||||
},
|
||||
"eR3YIn": {
|
||||
"defaultMessage": "Posts"
|
||||
},
|
||||
"eSzf2G": {
|
||||
"defaultMessage": "A single zap of {nIn} sats will allocate {nOut} sats to the zap pool."
|
||||
},
|
||||
@ -911,9 +911,6 @@
|
||||
"h8XMJL": {
|
||||
"defaultMessage": "Badges"
|
||||
},
|
||||
"hCUivF": {
|
||||
"defaultMessage": "Notes will stream in real time into global and posts tab"
|
||||
},
|
||||
"hK5ZDk": {
|
||||
"defaultMessage": "the world"
|
||||
},
|
||||
|
@ -106,7 +106,6 @@
|
||||
"DcL8P+": "Supporter",
|
||||
"Dh3hbq": "Auto Zap",
|
||||
"DqLx9k": "You must pay {n} sats to access this file.",
|
||||
"Dt/Zd5": "Media in posts will automatically be shown for selected people, otherwise only the link will show",
|
||||
"DtYelJ": "Transfer",
|
||||
"E8a4yq": "Follow some popular accounts",
|
||||
"ELbg9p": "Data Providers",
|
||||
@ -218,6 +217,7 @@
|
||||
"SYQtZ7": "LN Address Proxy",
|
||||
"Sjo1P4": "Custom",
|
||||
"Ss0sWu": "Pay Now",
|
||||
"TDR5ge": "Media in notes will automatically be shown for selected people, otherwise only the link will show",
|
||||
"TMfYfY": "Cashu token",
|
||||
"TpgeGw": "Hex Salt..",
|
||||
"Tpy00S": "People",
|
||||
@ -255,6 +255,7 @@
|
||||
"ZUZedV": "Lightning Donation:",
|
||||
"Zr5TMx": "Setup profile",
|
||||
"a5UPxh": "Fund developers and platforms providing NIP-05 verification services",
|
||||
"a7TDNm": "Notes will stream in real time into global and notes tab",
|
||||
"aWpBzj": "Show more",
|
||||
"b12Goz": "Mnemonic",
|
||||
"b5vAk0": "Your handle will act like a lightning address and will redirect to your chosen LNURL or Lightning address",
|
||||
@ -281,7 +282,6 @@
|
||||
"e7qqly": "Mark All Read",
|
||||
"eHAneD": "Reaction emoji",
|
||||
"eJj8HD": "Get Verified",
|
||||
"eR3YIn": "Posts",
|
||||
"eSzf2G": "A single zap of {nIn} sats will allocate {nOut} sats to the zap pool.",
|
||||
"fOksnD": "Can't vote because LNURL service does not support zaps",
|
||||
"fWZYP5": "Pinned",
|
||||
@ -297,7 +297,6 @@
|
||||
"gczcC5": "Subscribe",
|
||||
"gjBiyj": "Loading...",
|
||||
"h8XMJL": "Badges",
|
||||
"hCUivF": "Notes will stream in real time into global and posts tab",
|
||||
"hK5ZDk": "the world",
|
||||
"hMzcSq": "Messages",
|
||||
"hY4lzx": "Supports",
|
||||
@ -422,4 +421,4 @@
|
||||
"zjJZBd": "You're ready!",
|
||||
"zonsdq": "Failed to load LNURL service",
|
||||
"zvCDao": "Automatically show latest notes"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user