Update dolnoads for the new android version

This commit is contained in:
Bojan Mojsilovic 2023-08-23 21:19:55 +02:00
parent 6f0ed3df79
commit 24213584ca
5 changed files with 23 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "primal-web-app", "name": "primal-web-app",
"version": "0.74.7", "version": "0.74.8",
"description": "", "description": "",
"scripts": { "scripts": {
"start": "vite", "start": "vite",

View File

@ -255,13 +255,12 @@ export const defaultNotificationSettings: Record<string, boolean> = {
export const emojiSearchLimit = 1; export const emojiSearchLimit = 1;
export const today = (new Date()).getTime(); export const today = (new Date()).getTime();
export const iosRD = (new Date('08/01/2023')).getTime(); export const iosRD = (new Date('08/01/2023')).getTime();
export const andRD = (new Date('08/10/2023')).getTime(); export const iosVersion = '8/01/23';
export const iosCheck = '8/01/23'; export const andRD = (new Date('08/23/2023')).getTime();
export const andCheck = '8/10-1/23'; export const andVersion = '0.15.1';
export const refreshFeedDelay = 2_500;
export const defaultZapAmount = 10; export const defaultZapAmount = 10;

View File

@ -1,5 +1,5 @@
import { createStore } from "solid-js/store"; import { createStore } from "solid-js/store";
import { andCheck, andRD, iosCheck, iosRD, Kind, today } from "../constants"; import { andVersion, andRD, iosVersion, iosRD, Kind, today } from "../constants";
import { import {
createContext, createContext,
createEffect, createEffect,
@ -58,11 +58,11 @@ export const NotificationsProvider = (props: { children: ContextChildren }) => {
let count = 0; let count = 0;
if (iosDownload !== iosCheck && today > iosRD) { if (iosDownload !== iosVersion && today > iosRD) {
count++; count++;
} }
if (andDownload !== andCheck && today > andRD) { if (andDownload !== andVersion && today > andRD) {
count++; count++;
} }

View File

@ -13,7 +13,7 @@ import styles from './Downloads.module.scss';
import { downloads as t } from '../translations'; import { downloads as t } from '../translations';
import { useIntl } from '@cookbook/solid-intl'; import { useIntl } from '@cookbook/solid-intl';
import StickySidebar from '../components/StickySidebar/StickySidebar'; import StickySidebar from '../components/StickySidebar/StickySidebar';
import { andCheck, andRD, iosCheck, iosRD, today } from '../constants'; import { andVersion, andRD, iosVersion, iosRD, today } from '../constants';
import ExternalLink from '../components/ExternalLink/ExternalLink'; import ExternalLink from '../components/ExternalLink/ExternalLink';
import PageCaption from '../components/PageCaption/PageCaption'; import PageCaption from '../components/PageCaption/PageCaption';
@ -23,14 +23,22 @@ const Downloads: Component = () => {
onMount(() => { onMount(() => {
if (today > iosRD) { if (today > iosRD) {
localStorage.setItem('iosDownload', iosCheck); localStorage.setItem('iosDownload', iosVersion);
} }
if (today > andRD) { if (today > andRD) {
localStorage.setItem('andDownload', andCheck); localStorage.setItem('andDownload', andVersion);
} }
}); });
const displayDate = (dateValue: number) => {
const date = new Date(dateValue);
return new Intl.DateTimeFormat("en-US", {
year: 'numeric', month: 'long', day: 'numeric',
}).format(date);
}
return ( return (
<div class={styles.downloadsContainer}> <div class={styles.downloadsContainer}>
<Wormhole to="branding_holder"> <Wormhole to="branding_holder">
@ -117,7 +125,7 @@ const Downloads: Component = () => {
<div>build:</div> <div>build:</div>
</div> </div>
<div> <div>
<div>august 1, 2023</div> <div>{displayDate(iosRD).toLowerCase()}</div>
<div>0.24.3</div> <div>0.24.3</div>
</div> </div>
</div> </div>
@ -144,13 +152,13 @@ const Downloads: Component = () => {
<div>build:</div> <div>build:</div>
</div> </div>
<div> <div>
<div>august 10, 2023</div> <div>{displayDate(andRD).toLowerCase()}</div>
<div>0.14.3</div> <div>{andVersion}</div>
</div> </div>
</div> </div>
<a <a
href='https://downloads.primal.net/android/primal-0.14.3.apk' href={`https://downloads.primal.net/android/primal-${andVersion}.apk`}
target='_blank' target='_blank'
> >
<img src={apkDownload} /> <img src={apkDownload} />

View File

@ -8,7 +8,6 @@ import PeopleList from '../components/PeopleList/PeopleList';
import PageNav from '../components/PageNav/PageNav'; import PageNav from '../components/PageNav/PageNav';
import ReplyToNote from '../components/ReplyToNote/ReplyToNote'; import ReplyToNote from '../components/ReplyToNote/ReplyToNote';
import Loader from '../components/Loader/Loader';
import { nip19 } from 'nostr-tools'; import { nip19 } from 'nostr-tools';
import { useThreadContext } from '../contexts/ThreadContext'; import { useThreadContext } from '../contexts/ThreadContext';
import Wormhole from '../components/Wormhole/Wormhole'; import Wormhole from '../components/Wormhole/Wormhole';
@ -18,7 +17,6 @@ import { scrollWindowTo } from '../lib/scroll';
import { useIntl } from '@cookbook/solid-intl'; import { useIntl } from '@cookbook/solid-intl';
import Search from '../components/Search/Search'; import Search from '../components/Search/Search';
import { thread as t } from '../translations'; import { thread as t } from '../translations';
import { refreshFeedDelay } from '../constants';
const Thread: Component = () => { const Thread: Component = () => {