diff --git a/web/pages/Character/CharacterList.tsx b/web/pages/Character/CharacterList.tsx index 395870a4f..d71a44bf5 100644 --- a/web/pages/Character/CharacterList.tsx +++ b/web/pages/Character/CharacterList.tsx @@ -93,25 +93,23 @@ const Character: Component<{ const iconSize = { size: 'lg', corners: 'circle' }; return (
- -
- - ... -
- {props.character?.name} {((props.character.persona?.attributes?.age) ? props.character?.persona?.attributes?.age[0].split(" ")[0] : '')} -
- - - -
-
+
+ + ... +
+
+
+ {props.character?.name} {((props.character.persona?.attributes?.age) ? props.character?.persona?.attributes?.age[0].split(" ")[0] : '')} +
+
+
-
+
-
+
diff --git a/web/pages/Character/ImportCharacter.tsx b/web/pages/Character/ImportCharacter.tsx index 28ff2e258..7bc0d38ab 100644 --- a/web/pages/Character/ImportCharacter.tsx +++ b/web/pages/Character/ImportCharacter.tsx @@ -26,6 +26,7 @@ const ImportCharacterModal: Component<{ importJson(json) toastStore.success('Character file accepted') } catch (ex) { + console.log(ex); toastStore.warn( 'Invalid file format. Supported formats: Agnaistic, CAI, TavernAI, TextGen, Pygmalion' ) @@ -38,6 +39,7 @@ const ImportCharacterModal: Component<{ setJson(char) } catch (ex) { + console.log(ex); toastStore.warn( 'Invalid file format. Supported formats: Agnaistic, CAI, Tavern JSON/Cards, TextGen, Pygmalion' ) diff --git a/web/pages/Match/MatchSwipe.tsx b/web/pages/Match/MatchSwipe.tsx index 261522e9a..cac378cfe 100644 --- a/web/pages/Match/MatchSwipe.tsx +++ b/web/pages/Match/MatchSwipe.tsx @@ -8,11 +8,10 @@ import { A,useNavigate } from '@solidjs/router' import AvatarIcon from '../../shared/AvatarIcon' import { matchStore,userStore, swipeStore } from '../../store' +import { getAssetUrl } from '../../shared/util' import {SwipeCard} from '../../shared/Swipe' import type { SwipeCardRef} from '../../shared/Swipe' -import { getAssetUrl } from '../../shared/util' - const MatchList: Component = () => { const swipeCount = swipeStore(); let curApiref; @@ -38,7 +37,7 @@ const MatchList: Component = () => { left: ' text-red-500 fill-red-500 ', right: ' text-emerald-400 fill-emerald-400', up: ' text-cyan-300 fill-cyan-300', - down: ' text-orange-300 ' + down: ' ' } ); @@ -96,7 +95,13 @@ const MatchList: Component = () => { } } } - + let timerBounce; + function debounce(func, timeout = 10){ + return (...args) => { + clearTimeout(timerBounce); + timerBounce = setTimeout(() => { func.apply(this, args); }, timeout); + }; + } function swipeMovement (a){ switch (a) { case 'left': @@ -104,7 +109,7 @@ const MatchList: Component = () => { left: 'bg-red-500 text-white scale-100', right: ' text-emerald-400 fill-emerald-400 scale-80', up: ' text-cyan-300 fill-cyan-300 scale-100', - down: ' text-orange-300 ' + down: ' ' }); break; case 'right': @@ -112,7 +117,7 @@ const MatchList: Component = () => { left: ' text-red-500 fill-red-800 scale-80', right: 'bg-emerald-400 text-white scale-100', up: ' text-cyan-300 fill-cyan-300 scale-100', - down: ' text-orange-300 ' + down: ' ' }); break; case 'up': @@ -120,7 +125,7 @@ const MatchList: Component = () => { left: ' text-red-500 fill-red-800', right: ' text-emerald-400 fill-emerald-400 scale-100', up: 'bg-cyan-400 text-white scale-100', - down: ' text-orange-300 ' + down: ' ' }); break; case 'down': @@ -128,7 +133,7 @@ const MatchList: Component = () => { left: 'bg-red-500 text-white scale-100', right: ' text-emerald-400 fill-emerald-400 scale-80', up: ' text-cyan-300 fill-cyan-300 scale-100', - down: ' text-orange-300 ' + down: ' ' }); break; case 'restore': @@ -136,7 +141,7 @@ const MatchList: Component = () => { left: ' text-red-500 fill-red-800', right: ' text-emerald-400 fill-emerald-400 scale-100', up: ' text-cyan-300 fill-cyan-300 scale-100', - down: ' text-orange-300 ' + down: ' ' }); break; } @@ -183,21 +188,23 @@ const MatchList: Component = () => {
{(char, i) => - + }
-
- - - -
{charsList().list?.length === 0 ? : null} @@ -214,12 +221,16 @@ const DSwipeCard: Component<{ character: AppSchema.Character;match: Any }> = (p const age = (props.character.persona.attributes.age) ? props.character.persona.attributes.age[0].split(" ")[0] : ''; return (
- -
-
{props.character.name} {age}
+
+ +
+
+ +
{props.character.name} {age}
-
+
{(attr) =>
{attr}
}
diff --git a/web/shared/ProfileCard.tsx b/web/shared/ProfileCard.tsx index a5670902f..31c1db4de 100644 --- a/web/shared/ProfileCard.tsx +++ b/web/shared/ProfileCard.tsx @@ -73,7 +73,7 @@ const ProfileCard: Component<{ character: AppSchema.Character; href: string }> =
Country
-
{props.character.persona?.attributes?.country2||""}
+
{props.character.persona?.attributes?.country||""}