mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Use capitalize from lodash
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
<script lang="ts" strictEvents>
|
||||
type T = $$Generic;
|
||||
|
||||
import capitalize from "lodash/capitalize";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { capitalize } from "@app/lib/utils";
|
||||
|
||||
export let options: Tab<T>[];
|
||||
export let active: T;
|
||||
|
||||
@@ -114,11 +114,6 @@ export function formatCommit(oid: string): string {
|
||||
return oid.substring(0, 7);
|
||||
}
|
||||
|
||||
export function capitalize(s: string): string {
|
||||
if (s === "") return s;
|
||||
return s[0].toUpperCase() + s.substring(1);
|
||||
}
|
||||
|
||||
// Takes a path, eg. "../images/image.png", and a base from where to start resolving, e.g. "static/images/index.html".
|
||||
// Returns the resolved path.
|
||||
export function canonicalize(
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
import * as router from "@app/lib/router";
|
||||
import * as utils from "@app/lib/utils";
|
||||
import { capitalize } from "@app/lib/utils";
|
||||
import capitalize from "lodash/capitalize";
|
||||
import { groupIssues } from "@app/lib/issue";
|
||||
import { sessionStore } from "@app/lib/session";
|
||||
|
||||
|
||||
@@ -33,13 +33,14 @@
|
||||
import Comment from "@app/components/Comment.svelte";
|
||||
import CommitTeaser from "./Commit/CommitTeaser.svelte";
|
||||
import Dropdown from "@app/components/Dropdown.svelte";
|
||||
import HeaderToggleLabel from "./HeaderToggleLabel.svelte";
|
||||
import Floating from "@app/components/Floating.svelte";
|
||||
import HeaderToggleLabel from "./HeaderToggleLabel.svelte";
|
||||
import TabBar from "@app/components/TabBar.svelte";
|
||||
import Thread from "@app/components/Thread.svelte";
|
||||
import capitalize from "lodash/capitalize";
|
||||
import { Patch } from "@app/lib/patch";
|
||||
import { capitalize, formatCommit, isLocal } from "@app/lib/utils";
|
||||
import { createAddRemoveArrays } from "@app/lib/issue";
|
||||
import { formatCommit, isLocal } from "@app/lib/utils";
|
||||
import { formatObjectId, validateTag } from "@app/lib/cobs";
|
||||
import { sessionStore } from "@app/lib/session";
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import type { Project } from "@app/lib/project";
|
||||
|
||||
import * as router from "@app/lib/router";
|
||||
import * as utils from "@app/lib/utils";
|
||||
import PatchTeaser from "./Patch/PatchTeaser.svelte";
|
||||
import Placeholder from "@app/components/Placeholder.svelte";
|
||||
import capitalize from "lodash/capitalize";
|
||||
|
||||
export let patches: Patch[];
|
||||
export let status: PatchStatus;
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<Placeholder emoji="🍂">
|
||||
<div slot="title">{utils.capitalize(status)} patches</div>
|
||||
<div slot="title">{capitalize(status)} patches</div>
|
||||
<div slot="body">No issues matched the current filter</div>
|
||||
</Placeholder>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user