mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Show only pinned projects on node view
And style them visually similar to the landing page.
This commit is contained in:
@@ -6,7 +6,13 @@ import type {
|
||||
Tree,
|
||||
DiffResponse,
|
||||
} from "./lib/project.js";
|
||||
import type { SuccessResponse, CodeLocation, Range } from "./lib/shared.js";
|
||||
import type {
|
||||
SuccessResponse,
|
||||
CodeLocation,
|
||||
Range,
|
||||
Policy,
|
||||
Scope,
|
||||
} from "./lib/shared.js";
|
||||
import type { Comment, Embed } from "./lib/project/comment.js";
|
||||
import type {
|
||||
Commit,
|
||||
@@ -62,11 +68,13 @@ export type {
|
||||
Patch,
|
||||
PatchState,
|
||||
PatchUpdateAction,
|
||||
Policy,
|
||||
Project,
|
||||
Range,
|
||||
Remote,
|
||||
Review,
|
||||
Revision,
|
||||
Scope,
|
||||
Tree,
|
||||
Verdict,
|
||||
};
|
||||
|
||||
@@ -10,6 +10,9 @@ export const successResponseSchema = object({
|
||||
success: literal(true),
|
||||
}) satisfies ZodSchema<SuccessResponse>;
|
||||
|
||||
const policySchema = union([literal("allow"), literal("block")]);
|
||||
const scopeSchema = union([literal("followed"), literal("all")]);
|
||||
|
||||
export const nodeConfigSchema = object({
|
||||
alias: string(),
|
||||
peers: union([
|
||||
@@ -38,10 +41,13 @@ export const nodeConfigSchema = object({
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
policy: union([literal("allow"), literal("block")]),
|
||||
scope: union([literal("followed"), literal("all")]),
|
||||
policy: policySchema,
|
||||
scope: scopeSchema,
|
||||
});
|
||||
|
||||
export type Policy = z.infer<typeof policySchema>;
|
||||
export type Scope = z.infer<typeof scopeSchema>;
|
||||
|
||||
export const rangeSchema = union([
|
||||
object({
|
||||
type: literal("lines"),
|
||||
|
||||
Reference in New Issue
Block a user