Gobernanza: the header's domain switcher, model titles, confirmations, a stop button, an upload button
This commit is contained in:
+5
-4
@@ -43,10 +43,11 @@ export class App {
|
||||
),
|
||||
{ initialValue: '' },
|
||||
);
|
||||
/** The domain of an indicator page, if this is one. */
|
||||
protected readonly domain = computed(
|
||||
() => /^\/indicadores\/(\w+)/.exec(this.url())?.[1] as Domain | undefined,
|
||||
);
|
||||
/** The section and domain of a page that has one (indicators, governance): the switcher
|
||||
* moves between that section's domains. */
|
||||
private readonly place = computed(() => /^\/(indicadores|gobernanza)\/(\w+)/.exec(this.url()));
|
||||
protected readonly section = computed(() => this.place()?.[1] ?? 'indicadores');
|
||||
protected readonly domain = computed(() => this.place()?.[2] as Domain | undefined);
|
||||
protected readonly others = computed(() =>
|
||||
(this.domains.value() ?? []).filter((d) => d !== this.domain() && this.auth.canSee(d)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user