Show only pinned projects on node view

And style them visually similar to the landing page.
This commit is contained in:
Rūdolfs Ošiņš
2024-02-22 05:33:36 +00:00
parent 693f8991a0
commit 975d1823a2
7 changed files with 176 additions and 128 deletions
+9 -1
View File
@@ -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,
};
+8 -2
View File
@@ -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"),