refactor to allow switching ICategoryCollection context #40

This commit is contained in:
undergroundwires
2021-01-05 22:28:38 +01:00
parent 3455a2ca6c
commit 2e40605d59
32 changed files with 897 additions and 232 deletions

View File

@@ -74,7 +74,7 @@
public async mounted() {
const context = await this.getCurrentContextAsync();
this.repositoryUrl = context.collection.info.repositoryWebUrl;
this.repositoryUrl = context.app.info.repositoryWebUrl;
const filter = context.state.filter;
filter.filterRemoved.on(() => {
this.isSearching = false;

View File

@@ -39,7 +39,7 @@ export default class DownloadUrlListItem extends StatefulVue {
private async getDownloadUrlAsync(os: OperatingSystem): Promise<string> {
const context = await this.getCurrentContextAsync();
return context.collection.info.getDownloadUrl(os);
return context.app.info.getDownloadUrl(os);
}
}

View File

@@ -48,8 +48,9 @@ export default class TheFooter extends StatefulVue {
public async mounted() {
const context = await this.getCurrentContextAsync();
this.repositoryUrl = context.collection.info.repositoryWebUrl;
this.feedbackUrl = context.collection.info.feedbackUrl;
const info = context.app.info;
this.repositoryUrl = info.repositoryWebUrl;
this.feedbackUrl = info.feedbackUrl;
}
}
</script>

View File

@@ -75,7 +75,7 @@ export default class TheFooter extends StatefulVue {
public async mounted() {
const context = await this.getCurrentContextAsync();
const info = context.collection.info;
const info = context.app.info;
this.version = info.version;
this.homepageUrl = info.homepage;
this.repositoryUrl = info.repositoryWebUrl;

View File

@@ -16,7 +16,7 @@ export default class TheHeader extends StatefulVue {
public async mounted() {
const context = await this.getCurrentContextAsync();
this.title = context.collection.info.name;
this.title = context.app.info.name;
}
}
</script>