mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Refactor usage of authorSchema
This commit is contained in:
+2
-5
@@ -1,4 +1,4 @@
|
||||
import type { BaseUrl } from "@http-client";
|
||||
import type { Author, BaseUrl } from "@http-client";
|
||||
|
||||
import md5 from "md5";
|
||||
import bs58 from "bs58";
|
||||
@@ -80,10 +80,7 @@ export function formatCommit(oid: string): string {
|
||||
return oid.substring(0, 7);
|
||||
}
|
||||
|
||||
export function formatEditedCaption(
|
||||
author: { id: string; alias?: string },
|
||||
timestamp: number,
|
||||
) {
|
||||
export function formatEditedCaption(author: Author, timestamp: number) {
|
||||
return `${
|
||||
author.alias ? author.alias : formatNodeId(author.id)
|
||||
} edited ${absoluteTimestamp(timestamp)}`;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type {
|
||||
Author,
|
||||
BaseUrl,
|
||||
Comment,
|
||||
DiffResponse,
|
||||
@@ -44,7 +45,7 @@
|
||||
export let revisionOid: string;
|
||||
export let revisionTimestamp: number;
|
||||
export let revisionReactions: Comment["reactions"];
|
||||
export let revisionAuthor: { id: string; alias?: string | undefined };
|
||||
export let revisionAuthor: Author;
|
||||
export let revisionDescription: string;
|
||||
export let timelines: Timeline[];
|
||||
export let previousRevBase: string | undefined = undefined;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" context="module">
|
||||
import type {
|
||||
Author,
|
||||
Comment,
|
||||
Review,
|
||||
Merge,
|
||||
@@ -168,7 +169,7 @@
|
||||
revisionOid: string;
|
||||
revisionEdits: Revision["edits"];
|
||||
revisionReactions: Revision["reactions"];
|
||||
revisionAuthor: { id: string; alias?: string | undefined };
|
||||
revisionAuthor: Author;
|
||||
revisionDescription: string;
|
||||
},
|
||||
Timeline[],
|
||||
|
||||
Reference in New Issue
Block a user