From 86bcd9452d3107f68aca085e03e69b02667c0dbb Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 12 Apr 2026 22:06:16 -0500 Subject: feat: polish read-only project views and home integration Refs: https://todo.sr.ht/~ccleberg/hutch/36 Refs: https://todo.sr.ht/~ccleberg/hutch/37 Refs: https://todo.sr.ht/~ccleberg/hutch/38 --- Hutch/Extensions/SRHTWebURL.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Hutch/Extensions/SRHTWebURL.swift') diff --git a/Hutch/Extensions/SRHTWebURL.swift b/Hutch/Extensions/SRHTWebURL.swift index 9bc1552..cd8e8be 100644 --- a/Hutch/Extensions/SRHTWebURL.swift +++ b/Hutch/Extensions/SRHTWebURL.swift @@ -63,6 +63,22 @@ enum SRHTWebURL { ) } + static func projectSource(_ source: Project.SourceRepo) -> URL? { + userScopedURL( + host: "\(source.repoType.service.rawValue).sr.ht", + ownerUsername: source.ownerUsername, + pathComponents: [source.name] + ) + } + + static func mailingList(ownerUsername: String, listName: String) -> URL? { + userScopedURL( + host: "lists.sr.ht", + ownerUsername: ownerUsername, + pathComponents: [listName] + ) + } + static func ticket(ownerUsername: String, trackerName: String, ticketId: Int) -> URL? { userScopedURL( host: "todo.sr.ht", -- cgit v1.2.3