Skip to content

Commit

Permalink
Merge Release 2.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sharunkumar committed Aug 13, 2024
2 parents beddb70 + 6556c01 commit a91e561
Show file tree
Hide file tree
Showing 37 changed files with 491 additions and 81 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{js,ts,jsx,tsx,yaml,json}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,32 @@ Native apps can be great, but we believe in the strengths of the web. Why use a

## Deployment

### Official Deployment
### Ecosystem

**For most users,** we recommend the native app available in the stores:

<a href="https://apps.apple.com/us/app/voyager-for-lemmy/id6451429762"><img src="public/badges/ios.svg" height="45"></a>&nbsp;&nbsp;
<a href="https://play.google.com/store/apps/details?id=app.vger.voyager"><img src="public/badges/play.svg" height="45"></a>&nbsp;&nbsp;<a href="https://f-droid.org/en/packages/app.vger.voyager/"><img src="public/badges/fdroid.png" height="45"></a>

The Voyager team maintains a deployment at:
However, if you prefer using the Progressive Web App, there are a number of folks that host it:

| Country | URL | Description | Contact/Privacy |
| ---------------- | -------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------- |
| 🇺🇸 Virginia, USA | [vger.app](https://vger.app) | ✅ Official Voyager PWA instance | [➡️](https://vger.social/u/aeharding) |
| 🇫🇮 Finland | [m.lemmy.world](https://m.lemmy.world) | Voyager hosted by the mastodon.world team. | [➡️](https://mastodon.world/about) |
| 🇸🇬 Singapore | [v.opnxng.com](https://v.opnxng.com) | Voyager hosted by Opnxng in Singapore. | [➡️](https://about.opnxng.com) |
| 🇲🇽 Mexico | [voyager.nohost.network](https://voyager.nohost.network) | Voyager hosted by Nohost in Mexico. | [➡️](https://nohost.network) |
| 🇺🇸 USA | [vger.thesanewriter.com](https://vger.thesanewriter.com) | Voyager hosted by the lemmy.thesanewriter.com team. | [➡️](https://lemmy.thesanewriter.com/legal) |
| 🇺🇸 Oregon, USA | [m.lemmy.today](https://m.lemmy.today) | A fast, general purpose instance located in Oregon, USA | [➡️](https://lemmy.today) |
| 🇫🇷 France | [v.lemmy.dbzer0.com](https://v.lemmy.dbzer0.com) | Be Weird, Download a Car, Generate Art, Screw Copyrights | [➡️](https://lemmy.dbzer0.com) |
| ? | [v.programming.dev](https://v.programming.dev) | A collection of programming communities | [➡️](https://legal.programming.dev) |
| 🇺🇸 Oregon, USA | [v.lemmy.eco.br](https://v.lemmy.eco.br) | A fast, general purpose instance located in Oregon, USA | [➡️](https://lemmy.eco.br) |
| 🇩🇪 Germany | [v.lemy.lol](https://v.lemy.lol) | Long-term, general purpose Lemmy instance. | [➡️](https://lemy.lol) |
| 🇵🇹 Portugal | [voyager.slrpnk.net](https://voyager.slrpnk.net) | Sustainable future interconnected with nature and community. | [➡️](https://slrpnk.net) |
| ? | [app.thelemmy.club](https://app.thelemmy.club) | A general Lemmy instance for all! | [➡️](https://thelemmy.club) |
| ? | [m.lemdro.id](https://m.lemdro.id) | Fully open source instance with incredible transparency. | [➡️](https://lemdro.id) |

- 🐭 Production: [vger.app](https://vger.app)
> **Note**: Community deployments are **NOT** maintained by the Voyager team. They may not be synced with Voyager's source code. Please do your own research about the host servers before using them.
### Self-Host

Expand Down Expand Up @@ -132,15 +153,6 @@ Optionally, you can serve a custom list of instance(s) in the `/_config` endpoin

For production, serve `index.html` with `Cache-Control: no-cache` and `/assets` with a long cache period (files in assets are immutable)

### Ecosystem

- 🇫🇮 [m.lemmy.world](https://m.lemmy.world) - Voyager hosted by the mastodon.world team. [Contact/privacy](https://mastodon.world/about)
- 🇸🇬 [v.opnxng.com](https://v.opnxng.com) - Voyager hosted by Opnxng in Singapore. [Contact/privacy](https://about.opnxng.com)
- 🇲🇽 [voyager.nohost.network](https://voyager.nohost.network) - Voyager hosted by Nohost in Mexico. [Contact/privacy](https://nohost.network)
- 🇺🇸 [vger.thesanewriter.com](https://vger.thesanewriter.com) - Voyager hosted by the lemmy.thesanewriter.com team. [Contact/privacy](https://lemmy.thesanewriter.com/legal)

> **Note**: Community deployments are **NOT** maintained by the Voyager team. They may not be synced with Voyager's source code. Please do your own research about the host servers before using them.
## 💖 Sponsors

If you're enjoying Voyager, you can sponsor it:
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "app.vger.voyager"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 259
versionName "2.16.0"
versionCode 260
versionName "2.17.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
4 changes: 2 additions & 2 deletions ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.16.0</string>
<string>2.17.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>259</string>
<string>260</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "voyager",
"description": "A progressive webapp Lemmy client",
"private": true,
"version": "2.16.0",
"version": "2.17.0",
"type": "module",
"packageManager": "pnpm@9.6.0+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/features/auth/login/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Totp from "./Totp";
import { DynamicDismissableModalContext } from "../../../shared/DynamicDismissableModal";
import InAppExternalLink from "../../../shared/InAppExternalLink";
import { HelperText } from "../../../settings/shared/formatting";
import { getImageSrc } from "../../../../services/lemmy";
import { buildBaseLemmyUrl, getImageSrc } from "../../../../services/lemmy";
import { loginSuccess } from "../../../../helpers/toastMessages";
import lemmyLogo from "../lemmyLogo.svg";
import { styled } from "@linaria/react";
Expand Down Expand Up @@ -162,7 +162,7 @@ export default function Login({ url, siteIcon }: LoginProps) {
<div className="ion-padding">
You are logging in to{" "}
<InAppExternalLink
href={`https://${url}`}
href={buildBaseLemmyUrl(url)}
target="_blank"
rel="noopener noreferrer"
>
Expand Down
6 changes: 4 additions & 2 deletions src/features/comment/CommentLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Text } from "mdast";
import { uniqBy } from "lodash";
import { isValidUrl } from "../../helpers/url";
import spoiler from "@aeharding/remark-lemmy-spoiler";
import { buildBaseLemmyUrl } from "../../services/lemmy";

const Container = styled.div`
display: flex;
Expand All @@ -34,6 +35,7 @@ export default function CommentLinks({ markdown }: CommentLinksProps) {
const connectedInstance = useAppSelector(
(state) => state.auth.connectedInstance,
);
const connectedInstanceUrl = buildBaseLemmyUrl(connectedInstance);

const links = useMemo(() => {
// Initialize a unified processor with the remark-parse parser
Expand All @@ -56,7 +58,7 @@ export default function CommentLinks({ markdown }: CommentLinksProps) {
links.push({
type: node.type,
// normalize relative links
url: new URL(node.url, `https://${connectedInstance}`).href,
url: new URL(node.url, connectedInstanceUrl).href,
text:
"children" in node ? (node.children[0] as Text)?.value : undefined,
});
Expand All @@ -72,7 +74,7 @@ export default function CommentLinks({ markdown }: CommentLinksProps) {
links = links.slice(0, 4);

return links;
}, [markdown, showCommentImages, connectedInstance]);
}, [connectedInstance, markdown, showCommentImages, connectedInstanceUrl]);

if (!links.length) return;

Expand Down
1 change: 1 addition & 0 deletions src/features/community/CommunitySummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default function CommunitySummary({ community }: CommunitySummaryProps) {
community={community.community}
showInstanceWhenRemote
subscribed={community.subscribed}
hideSubscribed
/>
<RightContainer>
<ActionButton
Expand Down
26 changes: 14 additions & 12 deletions src/features/feed/PostCommentFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
isComment,
isPost,
postHasFilteredKeywords,
postHasFilteredWebsite,
} from "../../helpers/lemmy";
import { useAutohidePostIfNeeded } from "./PageTypeContext";

Expand All @@ -36,15 +37,15 @@ interface PostCommentFeed
extends Omit<FeedProps<PostCommentItem>, "renderItemContent"> {
communityName?: string;
filterHiddenPosts?: boolean;
filterKeywords?: boolean;
filterKeywordsAndWebsites?: boolean;

header?: ReactElement;
}

export default function PostCommentFeed({
fetchFn: _fetchFn,
filterHiddenPosts = true,
filterKeywords = true,
filterKeywordsAndWebsites = true,
filterOnRxFn: _filterOnRxFn,
filterFn: _filterFn,
...rest
Expand All @@ -58,6 +59,9 @@ export default function PostCommentFeed({
const filteredKeywords = useAppSelector(
(state) => state.settings.blocks.keywords,
);
const filteredWebsites = useAppSelector(
(state) => state.settings.blocks.websites,
);

const disableMarkingRead = useAppSelector(
(state) => state.settings.general.posts.disableMarkingRead,
Expand Down Expand Up @@ -152,26 +156,24 @@ export default function PostCommentFeed({
postHidden.hidden
)
return false;
if (
filterKeywords &&
postHasFilteredKeywords(
item.post,
filterKeywords ? filteredKeywords : [],
)
)
return false;

if (filterKeywordsAndWebsites) {
if (postHasFilteredKeywords(item.post, filteredKeywords)) return false;
if (postHasFilteredWebsite(item.post, filteredWebsites)) return false;
}

if (_filterFn) return _filterFn(item);

return true;
},
[
postHiddenById,
filteredKeywords,
filterKeywords,
filterHiddenPosts,
filterKeywordsAndWebsites,
_filterFn,
postDeletedById,
filteredKeywords,
filteredWebsites,
],
);

Expand Down
5 changes: 3 additions & 2 deletions src/features/feed/SpecialFeedMoreActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
useSetPostAppearance,
} from "../post/appearance/PostAppearanceProvider";
import { getShareIcon } from "../../helpers/device";
import { buildBaseLemmyUrl } from "../../services/lemmy";

interface SpecialFeedMoreActionsProps {
type: ListingType;
Expand Down Expand Up @@ -40,10 +41,10 @@ export default function SpecialFeedMoreActions({
text: "Share",
icon: getShareIcon(),
handler: () => {
const url = urlSelector(store.getState());
const url = buildBaseLemmyUrl(urlSelector(store.getState()));

Share.share({
url: `https://${url}?dataType=Post&listingType=${type}`,
url: `${url}?dataType=Post&listingType=${type}`,
});
},
},
Expand Down
11 changes: 11 additions & 0 deletions src/features/feed/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import { ListingType } from "lemmy-js-client";
import { getFeedUrlName } from "../community/mod/ModActions";

type InternalFeedType =
| "PostsSearch"
| "CommentsSearch"
| "CommunitiesSearch"
| "CommunitiesExplore";

export type AnyFeed =
| {
remoteCommunityHandle: string;
}
| {
listingType: ListingType;
}
| {
internal: InternalFeedType;
};

export function serializeFeedName(feed: AnyFeed): string {
Expand All @@ -15,6 +24,8 @@ export function serializeFeedName(feed: AnyFeed): string {
return feed.remoteCommunityHandle; // always contains @ - will never overlap with getFeedUrlName
case "listingType" in feed:
return getFeedUrlName(feed.listingType);
case "internal" in feed:
return `@@voyager_${feed.internal}`;
default:
return feed;
}
Expand Down
Loading

0 comments on commit a91e561

Please sign in to comment.