lots of stuff

This commit is contained in:
Hayden 2022-09-06 10:32:13 -08:00
parent 98f677c623
commit 1ab7435bf1
13 changed files with 289 additions and 23 deletions

View file

@ -2,6 +2,7 @@ import { Ref } from 'vue';
export type LocationViewPreferences = {
showDetails: boolean;
showEmpty: boolean;
};
/**
@ -13,6 +14,7 @@ export function useViewPreferences(): Ref<LocationViewPreferences> {
'homebox/preferences/location',
{
showDetails: true,
showEmpty: true,
},
{ mergeDefaults: true }
);

View file

@ -0,0 +1,7 @@
export function truncate(str: string, length: number) {
return str.length > length ? str.substring(0, length) + '...' : str;
}
export function capitalize(str: string) {
return str.charAt(0).toUpperCase() + str.slice(1);
}