File tree Expand file tree Collapse file tree 8 files changed +45
-22
lines changed Expand file tree Collapse file tree 8 files changed +45
-22
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export const getRecordKeyFromAtUri = (uri: string) => {
14
14
15
15
export const buildOekakiUrlFromOekakiObject = ( oekaki : Oekaki ) => {
16
16
const rkey = getRecordKeyFromAtUri ( oekaki . at )
17
- return `/${ oekaki . did } /oekaki/${ rkey } `
17
+ return `/${ oekaki . author . did } /oekaki/${ rkey } `
18
18
}
19
19
20
20
export const formatDate = ( date : Date ) => {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const props = defineProps<{
14
14
}>()
15
15
16
16
const imageLink = computed (() => ` url(${props .oekaki .image }) ` )
17
- const authorProfileLink = computed (() => ` /${props .oekaki .did } ` );
17
+ const authorProfileLink = computed (() => ` /${props .oekaki .author . did } ` );
18
18
const creationTime = computed (() => {
19
19
return formatDate (props .oekaki .creationTime )
20
20
})
@@ -37,7 +37,7 @@ const openInNewTab = () => {
37
37
<div class =" oekaki-nsfw-blur" v-if =" props.oekaki.nsfw && persistedStore.blurNsfw" >NSFW</div >
38
38
</div >
39
39
<div class =" oekaki-meta" >
40
- <span >{{ $t("timeline.by_before_handle") }}<b class =" oekaki-author" > <RouterLink :to =" authorProfileLink" >@{{ props.oekaki.handle }}</RouterLink ></b >{{ $t("timeline.by_after_handle") }}</span ><br >
40
+ <span >{{ $t("timeline.by_before_handle") }}<b class =" oekaki-author" > <RouterLink :to =" authorProfileLink" >@{{ props.oekaki.author. handle }}</RouterLink ></b >{{ $t("timeline.by_after_handle") }}</span ><br >
41
41
<span >{{ creationTime }}</span ><br >
42
42
<TagContainer v-if =" props.oekaki.tags !== undefined && props.oekaki.tags.length > 0" :tags =" props.oekaki.tags" />
43
43
<div class =" oekaki-tag-container-substitute" v-else >.</div >
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const props = defineProps<{
15
15
const router = useRouter ();
16
16
const persistedStore = usePersistedStore ();
17
17
18
- const authorProfileLink = computed (() => ` /${props .oekaki .did } ` );
18
+ const authorProfileLink = computed (() => ` /${props .oekaki .author . did } ` );
19
19
const creationTime = computed (() => {
20
20
return formatDate (props .oekaki .creationTime )
21
21
})
@@ -30,18 +30,18 @@ const redirectToParent = async () => {
30
30
const rkey = getRecordKeyFromAtUri (props .oekaki .at );
31
31
const { data } = await xrpc .get (" com.shinolabs.pinksea.getParentForReply" , {
32
32
params: {
33
- did: props .oekaki .did ,
33
+ did: props .oekaki .author . did ,
34
34
rkey: rkey !
35
35
}
36
36
});
37
37
38
- await router .push (` /${data .did }/oekaki/${data .rkey }#${props .oekaki .did }-${rkey } ` );
38
+ await router .push (` /${data .did }/oekaki/${data .rkey }#${props .oekaki .author . did }-${rkey } ` );
39
39
};
40
40
</script >
41
41
42
42
<template >
43
43
<div :class =" classList" v-if =" !props.oekaki.nsfw || (props.oekaki.nsfw && !persistedStore.hideNsfw)" >
44
- <div class =" oekaki-child-info" >{{ $t("post.response_from_before_handle") }}<b class =" oekaki-author" > <RouterLink :to =" authorProfileLink" >@{{ props.oekaki.handle }}</RouterLink ></b >{{ $t("post.response_from_after_handle") }}{{ $t("post.response_from_at_date") }}{{ creationTime }}</div >
44
+ <div class =" oekaki-child-info" >{{ $t("post.response_from_before_handle") }}<b class =" oekaki-author" > <RouterLink :to =" authorProfileLink" >@{{ props.oekaki.author. handle }}</RouterLink ></b >{{ $t("post.response_from_after_handle") }}{{ $t("post.response_from_at_date") }}{{ creationTime }}</div >
45
45
<PostViewOekakiImageContainer :oekaki =" props.oekaki" v-on:click =" redirectToParent" style =" max-height : 400px ; cursor : pointer ;" />
46
46
</div >
47
47
</template >
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const props = defineProps<{
12
12
13
13
const persistedStore = usePersistedStore ();
14
14
15
- const authorProfileLink = computed (() => ` /${props .oekaki .did } ` );
15
+ const authorProfileLink = computed (() => ` /${props .oekaki .author . did } ` );
16
16
const creationTime = computed (() => {
17
17
return formatDate (props .oekaki .creationTime )
18
18
})
@@ -23,7 +23,7 @@ const creationTime = computed(() => {
23
23
<div class =" oekaki-card" v-if =" !props.oekaki.nsfw || (props.oekaki.nsfw && !persistedStore.hideNsfw)" >
24
24
<PostViewOekakiImageContainer :oekaki =" props.oekaki" />
25
25
<div class =" oekaki-meta" >
26
- <span >{{ $t("timeline.by_before_handle" )}}<b class =" oekaki-author" > <RouterLink :to =" authorProfileLink" >@{{ props.oekaki.handle }}</RouterLink ></b >{{ $t("timeline.by_after_handle" )}}</span ><br >
26
+ <span >{{ $t("timeline.by_before_handle" )}}<b class =" oekaki-author" > <RouterLink :to =" authorProfileLink" >@{{ props.oekaki.author. handle }}</RouterLink ></b >{{ $t("timeline.by_after_handle" )}}</span ><br >
27
27
<span >{{ creationTime }}</span ><br >
28
28
<TagContainer v-if =" props.oekaki.tags !== undefined" :tags =" props.oekaki.tags" />
29
29
</div >
Original file line number Diff line number Diff line change
1
+ export interface Author {
2
+ did : string ,
3
+ handle : string
4
+ }
Original file line number Diff line number Diff line change
1
+ import type { Author } from '@/models/author'
2
+
1
3
export interface Oekaki {
2
- did : string ,
3
- handle : string ,
4
+ author : Author ,
4
5
image : string ,
5
6
at : string ,
6
7
cid : string ,
Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace PinkSea . Lexicons . Objects ;
4
+
5
+ /// <summary>
6
+ /// The "com.shinolabs.pinksea.appViewDefs#author" object.
7
+ /// </summary>
8
+ public class Author
9
+ {
10
+ /// <summary>
11
+ /// The DID of the author.
12
+ /// </summary>
13
+ [ JsonPropertyName ( "did" ) ]
14
+ public required string Did { get ; set ; }
15
+
16
+ /// <summary>
17
+ /// The handle of the author.
18
+ /// </summary>
19
+ [ JsonPropertyName ( "handle" ) ]
20
+ public required string Handle { get ; set ; }
21
+ }
Original file line number Diff line number Diff line change @@ -9,16 +9,10 @@ namespace PinkSea.Lexicons.Objects;
9
9
public class HydratedOekaki
10
10
{
11
11
/// <summary>
12
- /// The DID of the author .
12
+ /// The author of the oekaki .
13
13
/// </summary>
14
- [ JsonPropertyName ( "did" ) ]
15
- public required string Did { get ; set ; }
16
-
17
- /// <summary>
18
- /// The handle of the author.
19
- /// </summary>
20
- [ JsonPropertyName ( "handle" ) ]
21
- public required string Handle { get ; set ; }
14
+ [ JsonPropertyName ( "author" ) ]
15
+ public required Author Author { get ; set ; }
22
16
23
17
/// <summary>
24
18
/// The image link.
@@ -73,8 +67,11 @@ public static HydratedOekaki FromOekakiModel(
73
67
{
74
68
return new HydratedOekaki
75
69
{
76
- Did = oekakiModel . AuthorDid ,
77
- Handle = authorHandle ,
70
+ Author = new Author
71
+ {
72
+ Did = oekakiModel . AuthorDid ,
73
+ Handle = authorHandle
74
+ } ,
78
75
CreationTime = oekakiModel . IndexedAt ,
79
76
ImageLink =
80
77
$ "https://cdn.bsky.app/img/feed_fullsize/plain/{ oekakiModel . AuthorDid } /{ oekakiModel . BlobCid } ",
You can’t perform that action at this time.
0 commit comments