35 |
36 | This Fediwall shows posts
37 |
38 | tagged with
39 |
40 | #{{ t }}
{{ sep(index, tags.length, ", ", tagsHidden ? ", " : " or ") }}
41 |
42 | and {{tagsHidden}} more
43 |
44 |
45 | as well as posts
46 | by
47 |
48 | @{{ acc }}
{{ sep(index, accounts.length, ", ", accountsHidden ? ", " : " or ") }}
49 |
50 | and {{accountsHidden}} more
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/config.ts:
--------------------------------------------------------------------------------
1 |
2 | import { arrayUnique, deepClone, isString } from "@/utils";
3 | import { fallbackConfig, siteConfigUrl } from "@/defaults";
4 | import { type Config } from '@/types';
5 |
6 |
7 | export const siteConfigParam = "load"
8 | let siteConfig: Config | undefined;
9 | let siteConfigSource: string | undefined = undefined;
10 |
11 | const themes = ["dark", "light", "auto"];
12 | const boolYes = ["yes", "", "y", "true"];
13 | const boolNo = ["no", "n", "false"];
14 |
15 | const fromBool = (value: string): boolean | undefined => {
16 | return boolYes.includes(value.toLowerCase())
17 | }
18 |
19 | const toBool = (value: boolean | undefined) => {
20 | return value ? boolYes[0] : boolNo[0]
21 | }
22 |
23 |
24 |
25 |
26 | /**
27 | * Parameter definition used to translate between url parameters and the
28 | * internal Config struct.
29 | */
30 | type ParamDef = {
31 | // Parameter names and their aliases. Must be globally unique.
32 | names: string[]
33 | // Function to apply this parameter to an incomplete Config.
34 | from: (config: Partial