Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 79edea7973 | |||
| f17bf8db6e | |||
| 047a69886e | |||
| 71bf002370 | |||
| d0e6df044e | |||
| 8e16ef17ed | |||
| 2b80496637 |
@@ -1,6 +1,27 @@
|
|||||||
<a name="readme-top"></a>
|
<a name="readme-top"></a>
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# [1.0.0-beta.26](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2025-03-02)
|
||||||
|
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* **icon**: Comment out unused icon collection imports ([f17bf8d](https://github.com/perfect-panel/ppanel-web/commit/f17bf8d))
|
||||||
|
|
||||||
|
# [1.0.0-beta.25](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2025-03-01)
|
||||||
|
|
||||||
|
|
||||||
|
### ✨ Features
|
||||||
|
|
||||||
|
* **auth**: Add privacy policy link to the footer ([8e16ef1](https://github.com/perfect-panel/ppanel-web/commit/8e16ef1))
|
||||||
|
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* **dashboard**: Display subscription creation date in user dashboard ([d0e6df0](https://github.com/perfect-panel/ppanel-web/commit/d0e6df0))
|
||||||
|
* **request**: Add error code 40005 to trigger logout ([71bf002](https://github.com/perfect-panel/ppanel-web/commit/71bf002))
|
||||||
|
* **subscribe**: Update payment return URL ([2b80496](https://github.com/perfect-panel/ppanel-web/commit/2b80496))
|
||||||
|
|
||||||
# [1.0.0-beta.24](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2025-02-27)
|
# [1.0.0-beta.24](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2025-02-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { getAuthorization, Logout } from './common';
|
|||||||
|
|
||||||
async function handleError(response: any) {
|
async function handleError(response: any) {
|
||||||
const code = response.data?.code;
|
const code = response.data?.code;
|
||||||
if ([40002, 40003, 40004].includes(code)) return Logout();
|
if ([40002, 40003, 40004, 40005].includes(code)) return Logout();
|
||||||
if (response?.config?.skipErrorHandler) return;
|
if (response?.config?.skipErrorHandler) return;
|
||||||
if (!isBrowser()) return;
|
if (!isBrowser()) return;
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@workspace/ui/componen
|
|||||||
import { Separator } from '@workspace/ui/components/separator';
|
import { Separator } from '@workspace/ui/components/separator';
|
||||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
import { Tabs, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||||
import { isBrowser } from '@workspace/ui/utils';
|
import { formatDate, isBrowser } from '@workspace/ui/utils';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
@@ -142,7 +142,12 @@ export default function Content() {
|
|||||||
{userSubscribe.map((item) => (
|
{userSubscribe.map((item) => (
|
||||||
<Card key={item.id}>
|
<Card key={item.id}>
|
||||||
<CardHeader className='flex flex-row flex-wrap items-center justify-between gap-2 space-y-0'>
|
<CardHeader className='flex flex-row flex-wrap items-center justify-between gap-2 space-y-0'>
|
||||||
<CardTitle className='font-medium'>{item.subscribe.name}</CardTitle>
|
<CardTitle className='font-medium'>
|
||||||
|
{item.subscribe.name}
|
||||||
|
<p className='text-foreground/50 mt-1 text-sm'>
|
||||||
|
{formatDate(item.subscribe.created_at)}
|
||||||
|
</p>
|
||||||
|
</CardTitle>
|
||||||
<div className='flex flex-wrap gap-2'>
|
<div className='flex flex-wrap gap-2'>
|
||||||
<AlertDialog>
|
<AlertDialog>
|
||||||
<AlertDialogTrigger asChild>
|
<AlertDialogTrigger asChild>
|
||||||
|
|||||||
@@ -133,8 +133,10 @@ export default function Page() {
|
|||||||
<LanguageSwitch />
|
<LanguageSwitch />
|
||||||
<ThemeSwitch />
|
<ThemeSwitch />
|
||||||
</div>
|
</div>
|
||||||
<div className='text-primary flex gap-5 text-sm font-semibold'>
|
<div className='text-primary flex gap-2 text-sm font-semibold'>
|
||||||
<Link href='/tos'>{t('tos')}</Link>
|
<Link href='/tos'>{t('tos')}</Link>
|
||||||
|
<span className='text-foreground/30'>|</span>
|
||||||
|
<Link href='/privacy-policy'>{t('privacyPolicy')}</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default function Purchase({ subscribe, setSubscribe }: Readonly<PurchaseP
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
returnUrl: window.location.href,
|
returnUrl: `${window.location.origin}/payment?order_no=${orderNo}`,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default function Recharge(props: Readonly<ButtonProps>) {
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
returnUrl: window.location.href,
|
returnUrl: `${window.location.origin}/payment?order_no=${orderNo}`,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default function Renewal({ id, subscribe }: Readonly<RenewalProps>) {
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
returnUrl: window.location.href,
|
returnUrl: `${window.location.origin}/payment?order_no=${orderNo}`,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export default function ResetTraffic({ id, replacement }: Readonly<ResetTrafficP
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
returnUrl: window.location.href,
|
returnUrl: `${window.location.origin}/payment?order_no=${orderNo}`,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { getAuthorization, Logout } from './common';
|
|||||||
|
|
||||||
async function handleError(response: any) {
|
async function handleError(response: any) {
|
||||||
const code = response.data?.code;
|
const code = response.data?.code;
|
||||||
if ([40002, 40003, 40004].includes(code)) return Logout();
|
if ([40002, 40003, 40004, 40005].includes(code)) return Logout();
|
||||||
if (response?.config?.skipErrorHandler) return;
|
if (response?.config?.skipErrorHandler) return;
|
||||||
if (!isBrowser()) return;
|
if (!isBrowser()) return;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ppanel-web",
|
"name": "ppanel-web",
|
||||||
"version": "1.0.0-beta.24",
|
"version": "1.0.0-beta.26",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { icons as FlagPack } from '@iconify-json/flagpack';
|
// import { icons as FlagPack } from '@iconify-json/flagpack';
|
||||||
import { icons as Logos } from '@iconify-json/logos';
|
// import { icons as Logos } from '@iconify-json/logos';
|
||||||
import { icons as Mdi } from '@iconify-json/mdi';
|
// import { icons as Mdi } from '@iconify-json/mdi';
|
||||||
import { icons as Simple } from '@iconify-json/simple-icons';
|
// import { icons as Simple } from '@iconify-json/simple-icons';
|
||||||
import { icons as Uil } from '@iconify-json/uil';
|
// import { icons as Uil } from '@iconify-json/uil';
|
||||||
|
|
||||||
import { addCollection, Icon as Iconify, IconProps } from '@iconify/react';
|
import { Icon as Iconify, IconProps } from '@iconify/react';
|
||||||
|
|
||||||
addCollection(FlagPack);
|
// addCollection(FlagPack);
|
||||||
addCollection(Mdi);
|
// addCollection(Mdi);
|
||||||
addCollection(Uil);
|
// addCollection(Uil);
|
||||||
addCollection(Simple);
|
// addCollection(Simple);
|
||||||
addCollection(Logos);
|
// addCollection(Logos);
|
||||||
|
|
||||||
export function Icon(props: IconProps) {
|
export function Icon(props: IconProps) {
|
||||||
return <Iconify {...props} />;
|
return <Iconify {...props} />;
|
||||||
|
|||||||
Reference in New Issue
Block a user