chore: changes for 1.1.6

This commit is contained in:
Andrei O 2024-05-25 05:10:13 +03:00
parent 5f24f93ae4
commit 0cf0e28323
No known key found for this signature in database
GPG Key ID: B961E5B68389457E
9 changed files with 25 additions and 19 deletions

View File

@ -1,5 +1,9 @@
# Change Log
## [Version 1.1.6]
- changed login and baseURL to use yup live because app.yup.live is not working with extension
## [Version 1.1.5]
- improved notification handling and display

View File

@ -1,7 +1,7 @@
{
"name": "yup live",
"description": "Light extension helper for yup social platform.",
"version": "1.1.4",
"version": "1.1.6",
"manifest_version": 3,
"icons": {
"16": "src/assets/icons/yup_ext_16.png",

View File

@ -9,7 +9,7 @@ import { setBadge, extrenalNavigate } from '@/utils/chrome-misc'
import { closeTo } from '@/utils/time';
import { getActionUsage } from '@/utils/user';
import { executeVote, getVotePayload } from '@/utils/votes';
import { YUP_APP_BASE } from '@/constants/config';
import { YUP_LIVE_BASE } from '@/constants/config';
// Disable conflict with yup extension
const yupExtensionId = 'nhmeoaahigiljjdkoagafdccikgojjoi'
@ -26,7 +26,7 @@ const buttons = {
const notificationActionListner = async (id: string) => {
try {
const url = new URL(notificationUrl ?? `${YUP_APP_BASE}/notifications`)
const url = new URL(notificationUrl ?? `${YUP_LIVE_BASE}/notifications`)
extrenalNavigate(url.href)
chrome.notifications.clear(id)
} catch {
@ -163,7 +163,7 @@ const alarmHandler = async () => {
const lastFollowNotif = await getSetting('lastfollowNotif') as number
const isNew = !lastFollowNotif || ( !closeTo(new Date(lastFollowNotif), new Date(followNotif.createdAt), 2e4))
if (followNotif && isNew) {
notificationUrl = followNotif?.senders?.[0]._id ? `${YUP_APP_BASE}/account/${followNotif?.senders?.[0]._id}`: undefined
notificationUrl = followNotif?.senders?.[0]._id ? `${YUP_LIVE_BASE}/web3-profile/${followNotif?.senders?.[0]._id}`: undefined
await chrome.notifications.create({
type: 'basic',
iconUrl: chrome.runtime.getURL('src/assets/icons/yup_ext_128.png'),
@ -178,7 +178,7 @@ const alarmHandler = async () => {
const lastCommentNotif = await getSetting('lastCommentNotif') as number
const isNew = !lastCommentNotif || ( !closeTo(new Date(lastCommentNotif), new Date(commentNotif.createdAt), 2e4))
if (commentNotif && isNew) {
notificationUrl = commentNotif?.meta?.postid ? `${YUP_APP_BASE}/post/${commentNotif?.meta?.postid}`: undefined
notificationUrl = commentNotif?.meta?.postid ? `${YUP_LIVE_BASE}/post/${commentNotif?.meta?.postid}`: undefined
await chrome.notifications.create({
type: 'basic',
iconUrl: chrome.runtime.getURL('src/assets/icons/yup_ext_128.png'),
@ -193,7 +193,7 @@ const alarmHandler = async () => {
const lastMentionNotif = await getSetting('lastMentionNotif') as number
const isNew = !lastMentionNotif || ( !closeTo(new Date(lastMentionNotif), new Date(mentionNotif.createdAt), 2e4))
if (mentionNotif && isNew) {
notificationUrl = mentionNotif?.meta?.postid ? `${YUP_APP_BASE}/post/${mentionNotif?.meta?.postid}`: undefined
notificationUrl = mentionNotif?.meta?.postid ? `${YUP_LIVE_BASE}/post/${mentionNotif?.meta?.postid}`: undefined
await chrome.notifications.create({
type: 'basic',
iconUrl: chrome.runtime.getURL('src/assets/icons/yup_ext_128.png'),

View File

@ -6,7 +6,7 @@
import { chromeUrl } from "@/utils/chrome-misc";
import { extrenalNavigate } from "@/utils/chrome-misc";
import LikeIcon from '@/components/LikeIcon.svelte';
import { YUP_APP_BASE } from "@/constants/config";
import { YUP_LIVE_BASE } from "@/constants/config";
export let notif: Notification;
@ -38,7 +38,7 @@
</p>
<p class="text-xs text-gray-200 my-0 mt-1 cursor-pointer">
<span
on:click={() => extrenalNavigate(`${YUP_APP_BASE}/post/${notif.meta.postid}`)}
on:click={() => extrenalNavigate(`${YUP_LIVE_BASE}/post/${notif.meta.postid}`)}
aria-hidden
class="text-blue-200 interactive-svg">view the post</span
>
@ -110,7 +110,7 @@
<p
aria-hidden
class="text-xs text-gray-200 my-0 mt-1"
on:click={() => extrenalNavigate(`${YUP_APP_BASE}/account/${sender?._id}`)}
on:click={() => extrenalNavigate(`${YUP_LIVE_BASE}/web3-profile/${sender?._id}`)}
>
<b>{sender?.handle || `${sender?._id?.slice(0, 6)}...`}</b>
followed you.
@ -166,7 +166,7 @@
<p
aria-hidden
class="text-xs text-gray-200 my-0 mt-1 cursor-pointer"
on:click={() => extrenalNavigate(`${YUP_APP_BASE}/post/${notif?.meta?.commentId}`)}
on:click={() => extrenalNavigate(`${YUP_LIVE_BASE}/post/${notif?.meta?.commentId}`)}
>
<b>{sender?.handle || `${sender?._id?.slice(0, 6)}...`}</b>
commented on yout post, click to view.

View File

@ -1,2 +1,3 @@
export const API_BASE = 'https://api.yup.io'
export const YUP_APP_BASE = 'https://app.yup.io'
export const YUP_APP_BASE = 'https://app.yup.io'
export const YUP_LIVE_BASE = 'https://yup-live.pages.dev'

View File

@ -6,7 +6,7 @@
import { navigate } from '@/utils/router'
import { mainStore } from '@/utils/store'
// https://yup-live.pages.dev
import { YUP_APP_BASE } from '@/constants/config'
import { YUP_LIVE_BASE } from '@/constants/config'
import Alert from '@/components/Alert.svelte'
import { alertStore } from '@/utils/store'
import PageLoader from "@/components/PageLoader.svelte";
@ -45,7 +45,7 @@
<div class="entry" style="{ $mainStore.settings.theme === 'light'? 'filter: invert(1);' : '' }">
<a href="#app" on:click="{() => extrenalNavigate(YUP_APP_BASE)}">
<a href="#app" on:click="{() => extrenalNavigate(YUP_LIVE_BASE)}">
<h1 aria-label="logo" class="logo inline-flex items-center text-[1.6rem] font-bold gap-2.5 pl-8">
<span class="gradient-text" style="{ $mainStore.settings.theme === 'light'? 'filter: invert(1.1);' : '' }" >YUP</span>
</h1>

View File

@ -1,20 +1,20 @@
<script lang="ts">
import { extrenalNavigate } from "@/utils/chrome-misc";
import { YUP_APP_BASE } from '@/constants/config'
import { YUP_LIVE_BASE } from '@/constants/config'
</script>
<a href="#app" on:click={() => extrenalNavigate(`${YUP_APP_BASE}/login`)}>
<a href="#app" on:click={() => extrenalNavigate(`${YUP_LIVE_BASE}/login`)}>
<svg enable-background="new 0 0 32 32" viewBox="0 0 32 32" class="w-20 mb-10 mt-8 svg-fill">
<g id="lock"><path d="M25,13V9c0-4.971-4.029-9-9-9c-4.971,0-9,4.029-9,9v4c-1.657,0-3,1.343-3,3v3v1v2v1c0,4.971,4.029,9,9,9h6 c4.971,0,9-4.029,9-9v-1v-2v-1v-3C28,14.342,26.656,13,25,13z M9,9c0-3.866,3.134-7,7-7c3.866,0,7,3.134,7,7v4h-2V9.002 c0-2.762-2.238-5-5-5c-2.762,0-5,2.238-5,5V13H9V9z M20,9v0.003V13h-8V9.002V9c0-2.209,1.791-4,4-4C18.209,5,20,6.791,20,9z M26,19 v1v2v1c0,3.859-3.141,7-7,7h-6c-3.859,0-7-3.141-7-7v-1v-2v-1v-3c0-0.552,0.448-1,1-1c0.667,0,1.333,0,2,0h14c0.666,0,1.332,0,2,0 c0.551,0,1,0.448,1,1V19z"/>
<path d="M16,19c-1.104,0-2,0.895-2,2c0,0.607,0.333,1.76,0.667,2.672c0.272,0.742,0.614,1.326,1.333,1.326 c0.782,0,1.061-0.578,1.334-1.316C17.672,22.768,18,21.609,18,21C18,19.895,17.104,19,16,19z"/></g>
</svg>
</a>
<div class="text-[1.6rem] mb-4 uppercase">
<a href="#app" on:click="{() => extrenalNavigate(`${YUP_APP_BASE}/auth`)}">
<a href="#app" on:click="{() => extrenalNavigate(`${YUP_LIVE_BASE}/login`)}">
Login on web app
</a>
</div>
<a href="#app" on:click="{() => extrenalNavigate(`${YUP_APP_BASE}/auth`)}">
<a href="#app" on:click="{() => extrenalNavigate(`${YUP_LIVE_BASE}/login`)}">
<svg enable-background="new 0 0 48 48" viewBox="0 0 48 48" class="w-14 svg-fill my-4"><path d="M0.115,30.348c0-7.771,6.303-14.073,14.074-14.073h0.002h14.071V8.051l19.622,15.261l-19.622,15.26v-8.225 H10.458c-3.887,0-7.037,3.152-7.037,7.037c0,0.906,0.186,1.768,0.5,2.564C1.566,37.434,0.115,34.064,0.115,30.348z"/></svg>
</a>

View File

@ -2,7 +2,7 @@
import { extrenalNavigate } from "@/utils/chrome-misc";
import ImgLoader from "@/components/ImgLoader.svelte";
import { onMount } from "svelte";
import { YUP_APP_BASE } from "@/constants/config";
import { YUP_LIVE_BASE } from "@/constants/config";
import RateWebsite from "@/components/RateWebsite.svelte";
import { mainStore } from "@/utils/store";
import { formatNumber, truncteEVMAddr } from "@/utils/misc";
@ -40,7 +40,7 @@
>{$mainStore?.user?.profile?.yupScore?.toFixed(0)}</span
><span class="text-[0.7rem]">100<br />MAX</span>
</div>
<div on:click={() => extrenalNavigate(`${YUP_APP_BASE}/account/${$mainStore.user.auth.userId}`)} aria-hidden class="flex flex-col justify-center mb-1 w-16">
<div on:click={() => extrenalNavigate(`${YUP_LIVE_BASE}/profile/${$mainStore.user.auth.userId}`)} aria-hidden class="flex flex-col justify-center mb-1 w-16">
<ImgLoader source={avatar} bind:this={loader}>
<img
style="{ $mainStore.settings.theme === 'light'? 'filter: invert(1);' : '' }"

View File

@ -15,6 +15,7 @@
"allowJs": true,
"checkJs": true,
"isolatedModules": false,
"ignoreDeprecations": "5.0",
"paths": {
"@/*": ["./src/*", "./dist/*"]
}