Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update references hon #2077

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/components/home/Selector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export let showDot: 'videos' | 'hot-or-not' | null = null
class={c(
'absolute inset-x-0 z-[1] h-9 rounded-full bg-primary p-4 transition-all duration-200',
selected === 'hot-or-not'
? 'w-[6.5rem] translate-x-2'
: 'w-[5.5rem] translate-x-[6.75rem]',
? 'w-[7.25rem] translate-x-2'
: 'w-[5.5rem] translate-x-[7.5rem]',
)} />
{#if showDot === 'hot-or-not'}
<selector-dot
Expand All @@ -30,7 +30,7 @@ export let showDot: 'videos' | 'hot-or-not' | null = null
href="/hotornot/{hotOrNotUrl}"
on:click={() => (selected = 'hot-or-not')}
class="z-[2]">
Hot or Not
Play to earn
</a>
<a
href="/feed/{feedUrl}"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/popup/ExperimentsPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export let show = false
Game
</div>
<div class="pb-2 text-center text-lg text-white">
Brought to you by Hot or Not
Brought to you by us
</div>
</div>

Expand Down
15 changes: 15 additions & 0 deletions packages/components/utils/share.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export async function shareBrowser(data: ShareData) {
try {
if (navigator.canShare(data)) {
await navigator.share(data)
} else {
throw 'Can not share in this context'
}
} catch (e) {
console.warn('Could not share', {
from: 'shareBrowser',
data,
e,
})
}
}
2 changes: 1 addition & 1 deletion packages/experiments/src/routes/invite/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ onMount(() => {
{:else}
<div class="pt-8 text-center text-3xl">Welcome</div>
<div class="text-center text-sm opacity-70">
You have been invite to join Hot or Not experiments!
You have been invite to join our experiments app!
</div>
<div class="flex h-24 w-full items-center justify-center">
<Button on:click={() => ($authState.showLogin = true)} class="w-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function handleError(type: LoginType, e?: string) {
class="fade-in absolute z-[100] block h-full w-full bg-black/90 text-white">
<div
class="flex h-full w-full flex-col items-center justify-center space-y-32 overflow-y-auto">
<span class="text-3xl font-bold">Join Hot or Not</span>
<span class="text-3xl font-bold">Join us</span>
<div class="flex w-full max-w-md flex-col items-center space-y-4 px-8">
<div class="py-4">Create an account using</div>
{#if !hideNfid}
Expand Down
23 changes: 12 additions & 11 deletions packages/web-client/src/lib/components/layout/PlayerLayout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { userProfile } from '$lib/stores/app'
import { debounce } from 'throttle-debounce'
import { createEventDispatcher, onDestroy, onMount, tick } from 'svelte'
import { postReportPopup } from '$lib/stores/popups'
import { shareBrowser } from '@hnn/components/utils/share'

export let index: number
export let post: PostPopulated
Expand Down Expand Up @@ -61,22 +62,22 @@ async function fetchThumbnail() {
}

async function handleShare() {
try {
await navigator.share({
title: 'Hot or Not',
text: `Check out this hot video by ${displayName}. \n${post.description}`,
url: `https://hotornot.wtf/feed/${post.publisher_canister_id}@${Number(
post.id,
)}`,
})
} catch (_) {}
await shareBrowser({
title: 'Check out this post',
text: `Check out this hot video by ${displayName}. \n${post.description}`,
url: `https://hotornot.wtf/feed/${post.publisher_canister_id}@${Number(
post.id,
)}`,
})

registerEvent('share_video', {
source,
userId: $userProfile.principal_id,
video_publisher_id: postPublisherId,
video_publisher_canister_id: post.publisher_canister_id,
video_id: post.id,
})

await individualUser(
post.publisher_canister_id,
).update_post_increment_share_count(post.id)
Expand Down Expand Up @@ -322,10 +323,10 @@ onMount(() => fetchThumbnail())
{/if}
{#if showHotOrNotButton}
<IconButton
title="Hot or Not"
title="Vote"
iconName="fire"
iconClass="h-5 w-5"
ariaLabel="Check out this post in Hot or Not"
ariaLabel="Check out this post"
disabled={!bettingStatusValue}
href={`/hotornot/${post.publisher_canister_id}@${post.id}`}
class="rounded-full border-[0.15rem] border-[#FA9301] bg-gradient-to-b from-[#F63700] to-[#FFC848] p-2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getNotificationMessage(item: NotificationHistory) {
return `Congratulations! You've earned ${item.token} tokens from commissions on your video.`
}
case 'Referral': {
return `Congratulations! A user joined Hot or Not, you have received ${item.token} tokens for referring user.`
return `Congratulations! A user signed up, you have received ${item.token} tokens for referring user.`
}
case 'WinningsEarnedFromBet': {
switch (item.eventOutcome) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ function getEventName() {
case 'Won':
return 'Won outcome'
default:
return labels[item.subType]?.replace(/([A-Z])/g, ' $1').trim() || ''
console.log(labels[item.subType])
return (
labels[item.subType]
?.replace(/([A-Z])/g, ' $1')
?.replace('Hot Or Not', '')
.trim() || ''
)
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/web-client/src/lib/utils/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export function updateMetadata(video?: PostPopulated) {
if (!video) return
if (!('mediaSession' in navigator)) return
navigator.mediaSession.metadata = new MediaMetadata({
title: video.description + '| Hot or Not',
title: video.description + ' ',
artist:
video.created_by_display_name[0] ||
video.created_by_unique_user_name[0] ||
'',
album: 'Hot or Not',
album: 'Viral Videos',
artwork: [{ src: getThumbnailUrl(video.video_uid), type: 'image/png' }],
})
}
15 changes: 15 additions & 0 deletions packages/web-client/src/routes/(feed)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { onDestroy, onMount } from 'svelte'
import { authState } from '$lib/stores/auth'
import IconButton from '@hnn/components/button/IconButton.svelte'
import { browser } from '$app/environment'
import ReportPopup from '@hnn/components/popup/ReportPopup.svelte'
import { postReportPopup } from '$lib/stores/popups'
import { reportPostOrUser } from '$lib/helpers/report'

function handleVisibilityChange() {
if (document.visibilityState === 'hidden') {
Expand Down Expand Up @@ -70,3 +73,15 @@ $: pathname = $page.url.pathname
{/if}
</div>
</HomeLayout>

{#if $postReportPopup.show && $postReportPopup.data}
<ReportPopup
type="post"
on:close={() =>
($postReportPopup = {
show: false,
})}
show
on:report={({ detail }) => reportPostOrUser(detail)}
reportData={$postReportPopup.data} />
{/if}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ beforeNavigate(() => {
</script>

<svelte:head>
<title>Home Feed | Hot or Not</title>
<title>Home Feed</title>
</svelte:head>

<div
Expand Down
17 changes: 1 addition & 16 deletions packages/web-client/src/routes/(feed)/hotornot/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
import IconButton from '@hnn/components/button/IconButton.svelte'
import HotOrNotLayout from '@hnn/components/web-client/layout/HotOrNotLayout.svelte'
import ExperimentsPopup from '@hnn/components/popup/ExperimentsPopup.svelte'
import ReportPopup from '@hnn/components/popup/ReportPopup.svelte'
import { postReportPopup } from '$lib/stores/popups'
import { reportPostOrUser } from '$lib/helpers/report'

let showExperimentsPopup = false
</script>

<!-- <HotorNotOnboarding /> -->

<svelte:head>
<title>Hot or Not Feed | Hot or Not</title>
<title>Play Feed</title>
</svelte:head>

<HotOrNotLayout>
Expand Down Expand Up @@ -42,18 +39,6 @@ let showExperimentsPopup = false
</svelte:fragment>
</HotOrNotLayout>

{#if $postReportPopup.show && $postReportPopup.data}
<ReportPopup
type="post"
on:close={() =>
($postReportPopup = {
show: false,
})}
show
on:report={({ detail }) => reportPostOrUser(detail)}
reportData={$postReportPopup.data} />
{/if}

{#if showExperimentsPopup}
<ExperimentsPopup bind:show={showExperimentsPopup} />
{/if}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ beforeNavigate(() => {
</script>

<svelte:head>
<title>Hot or Not Videos | Hot or Not</title>
<title>Play Videos</title>
</svelte:head>

<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ComingSoon from '@hnn/components/coming-soon/ComingSoon.svelte'
</script>

<svelte:head>
<title>Leaderboards | Hot or Not</title>
<title>Leaderboards</title>
</svelte:head>

<ComingSoon />
15 changes: 2 additions & 13 deletions packages/web-client/src/routes/(feed)/menu/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,10 @@ $: links = [
},
{
icon: 'help',
title: 'How to Earn',
title: 'Refer & Earn',
class: 'w-5 h-5',
href: '/refer-earn',
},
{
icon: 'text-align-middle',
title: 'About Us',
class: 'w-5 h-5',
href: '/about-us',
},
{
icon: 'chat-box',
title: 'FAQs',
href: '/faq',
},
{
icon: 'whatsapp-logo',
title: 'Talk to the team',
Expand Down Expand Up @@ -87,7 +76,7 @@ onMount(() => {
</script>

<svelte:head>
<title>Menu | Hot or Not</title>
<title>Menu</title>
</svelte:head>

<LogoutPopup bind:show={showLogoutPopup} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let loggedIn = false
{#if loggedIn}
<div class="text-3xl font-bold">Success!</div>
<Icon name="checkmark" class="h-10 w-10"></Icon>
<div>You have succesfully migrated your hot or not profile.</div>
<div>You have succesfully migrated your profile.</div>
<div class="text-sm">
Please, also migrate all of your profiles (if you have any)
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { playerState } from '$lib/stores/app'
</script>

<svelte:head>
<title>User's Videos | Hot or Not</title>
<title>User's Videos</title>
</svelte:head>

<HomeLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ onMount(() => {
</script>

<svelte:head>
<title>Waitlist | Hot or Not</title>
<title>Waitlist</title>
</svelte:head>

<div
Expand Down
2 changes: 1 addition & 1 deletion packages/web-client/src/routes/(feed)/wallet/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $: loggedIn && init()
</script>

<svelte:head>
<title>Wallet | Hot or Not</title>
<title>Wallet</title>
</svelte:head>

{#if !loggedIn}
Expand Down
37 changes: 0 additions & 37 deletions packages/web-client/src/routes/about-us/+page.svelte

This file was deleted.

14 changes: 7 additions & 7 deletions packages/web-client/src/routes/airdrop-guide/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { navigateBack } from '$lib/stores/navigation'
</script>

<svelte:head>
<title>Airdrop Guide | Hot or Not</title>
<title>Airdrop Guide</title>
</svelte:head>

<HomeLayout>
Expand All @@ -30,9 +30,9 @@ import { navigateBack } from '$lib/stores/navigation'
<div class="relative mx-auto block w-full max-w-2xl">
<h4 class="text-lg font-bold">Guide</h4>
<p>
Hot or Not is a social media platform for short videos, similar to
TikTok but on Web3. It integrates gamification with social media and
is built on a ground-breaking Level-1 blockchain called the
We are a social media platform for short videos, similar to TikTok but
on Web3. It integrates gamification with social media and is built on
a ground-breaking Level-1 blockchain called the
<a
class="underline"
href="https://medium.com/dfinity/the-internet-computer-for-geeks-a-new-dfinity-white-paper-ecb075b2d525"
Expand All @@ -42,7 +42,7 @@ import { navigateBack } from '$lib/stores/navigation'
.
</p>
<p>
Hot or Not is conducting a decentralization sale (
We are conducting a decentralization sale (
<a
class="underline"
href="https://internetcomputer.org/docs/current/developer-docs/integrations/sns/"
Expand All @@ -55,8 +55,8 @@ import { navigateBack } from '$lib/stores/navigation'
their participation.
</p>
<p>
To recognize the support of its users and early adopters, Hot or Not
is airdropping HOT tokens to the users who registered in our airdrop
To recognize the support of its users and early adopters, we are
airdropping HOT tokens to the users who registered in our airdrop
before 15th July.
</p>
<p>
Expand Down
Loading