your personal website on atproto - mirror blento.app
25
fork

Configure Feed

Select the types of activity you want to include in your feed.

change hideProfile to hideProfileSection

Florian 732a8aa2 d5d598db

+40 -16
+4 -2
docs/Beta.md
··· 1 1 # Todo for beta version 2 2 3 - - fix opengraph image stuff 3 + - fix opengraph image stuff (caching issue?) 4 4 5 5 - site.standard 6 6 - move subpages to own lexicon (app.blento.page) ··· 32 32 33 33 - when adding images try to add them in a size that best fits aspect ratio 34 34 35 - - onboarding 35 + - onboarding 36 + 37 + - show alert when user tries to close window with unsaved changes
+2 -1
docs/CardIdeas.md
··· 33 33 - teal.fm 34 34 - tangled.sh 35 35 - popfeed.social 36 - - smoke signal 36 + - smokesignal.events (https://pdsls.dev/at://did:plc:xbtmt2zjwlrfegqvch7fboei/events.smokesignal.calendar.event/3ltn2qrxf3626) 37 37 - statusphere.xyz 38 38 - goals.garden 39 + - flashes.blue (https://pdsls.dev/at://did:plc:aytgljyikzbtgrnac2u4ccft/blue.flashes.actor.portfolio, https://app.flashes.blue/profile/j4ck.xyz) 39 40 40 41 ## programming 41 42
+4
docs/Lexicon.md
··· 1 + # Lexicons used by blento.app 2 + 3 + - `site.standard.publication` 4 + - `app.blento.card`
+14 -4
src/lib/helper.ts
··· 292 292 return data.publication?.description ?? data.profile.description ?? ''; 293 293 } 294 294 295 - export function getHideProfile(data: WebsiteData): boolean { 296 - if (data?.publication?.preferences?.hideProfile === false) return false; 297 - if (data?.publication?.preferences?.hideProfile === true) return true; 295 + export function getHideProfileSection(data: WebsiteData): boolean { 296 + if (data?.publication?.preferences?.hideProfileSection !== undefined) 297 + return data?.publication?.preferences?.hideProfileSection; 298 + 299 + if (data?.publication?.preferences?.hideProfile !== undefined) 300 + return data?.publication?.preferences?.hideProfile; 298 301 299 302 return data.page !== 'blento.self'; 300 303 } ··· 449 452 } 450 453 } 451 454 455 + if ( 456 + data.publication?.preferences?.hideProfile !== undefined && 457 + data.publication?.preferences?.hideProfileSection === undefined 458 + ) { 459 + data.publication.preferences.hideProfileSection = data.publication?.preferences?.hideProfile; 460 + } 461 + 452 462 if (!originalPublication || originalPublication !== JSON.stringify(data.publication)) { 453 463 data.publication ??= { 454 464 name: getName(data), 455 465 description: getDescription(data), 456 466 preferences: { 457 - hideProfile: getHideProfile(data) 467 + hideProfileSection: getHideProfileSection(data) 458 468 } 459 469 }; 460 470
+7
src/lib/types.ts
··· 41 41 description?: string; 42 42 icon?: At.Blob; 43 43 preferences?: { 44 + /** 45 + * @deprecated 46 + * 47 + * use hideProfileSection instead 48 + */ 44 49 hideProfile?: boolean; 50 + // use this instead 51 + hideProfileSection?: boolean; 45 52 }; 46 53 } 47 54 | undefined;
+3 -3
src/lib/website/EditableWebsite.svelte
··· 10 10 compactItems, 11 11 createEmptyCard, 12 12 fixCollisions, 13 - getHideProfile, 13 + getHideProfileSection, 14 14 getName, 15 15 isTyping, 16 16 savePage, ··· 580 580 : '' 581 581 ]} 582 582 > 583 - {#if !getHideProfile(data)} 583 + {#if !getHideProfileSection(data)} 584 584 <Profile {data} /> 585 585 {/if} 586 586 587 587 <div 588 588 class={[ 589 589 'mx-auto max-w-lg', 590 - !getHideProfile(data) 590 + !getHideProfileSection(data) 591 591 ? '@5xl/wrapper:grid @5xl/wrapper:max-w-7xl @5xl/wrapper:grid-cols-4' 592 592 : '@5xl/wrapper:max-w-4xl' 593 593 ]}
+2 -2
src/lib/website/Settings.svelte
··· 1 1 <script lang="ts"> 2 - import { getDescription, getHideProfile, getName } from '$lib/helper'; 2 + import { getDescription, getHideProfileSection, getName } from '$lib/helper'; 3 3 import type { WebsiteData } from '$lib/types'; 4 4 import { Button, Checkbox, Heading, Input, Label, Modal, Textarea } from '@foxui/core'; 5 5 ··· 45 45 <Checkbox 46 46 bind:checked={ 47 47 () => { 48 - return getHideProfile(data); 48 + return getHideProfileSection(data); 49 49 }, 50 50 (value) => { 51 51 data.publication ??= {};
+3 -3
src/lib/website/Website.svelte
··· 1 1 <script lang="ts"> 2 2 import Card from '../cards/Card/Card.svelte'; 3 3 import Profile from './Profile.svelte'; 4 - import { getDescription, getHideProfile, getName, sortItems } from '../helper'; 4 + import { getDescription, getHideProfileSection, getName, sortItems } from '../helper'; 5 5 import { innerWidth } from 'svelte/reactivity/window'; 6 6 import { setDidContext, setHandleContext, setIsMobile } from './context'; 7 7 import BaseCard from '../cards/BaseCard/BaseCard.svelte'; ··· 38 38 39 39 <Context {data}> 40 40 <div class="@container/wrapper relative w-full"> 41 - {#if !getHideProfile(data)} 41 + {#if !getHideProfileSection(data)} 42 42 <Profile {data} showEditButton={true} /> 43 43 {/if} 44 44 45 45 <div 46 46 class={[ 47 47 'mx-auto max-w-lg', 48 - !getHideProfile(data) 48 + !getHideProfileSection(data) 49 49 ? '@5xl/wrapper:grid @5xl/wrapper:max-w-7xl @5xl/wrapper:grid-cols-4' 50 50 : '@5xl/wrapper:max-w-4xl' 51 51 ]}
+1 -1
src/routes/all/+page.server.ts
··· 28 28 29 29 data.publication ??= {}; 30 30 data.publication.preferences ??= {}; 31 - data.publication.preferences.hideProfile = true; 31 + data.publication.preferences.hideProfileSection = true; 32 32 33 33 return { ...data, profiles }; 34 34 }