(environment.defaultCensuresListInstanceFilter),
@@ -72,12 +72,12 @@ export class HesitatedInstancesComponent {
this.hesitatedByMe = response.successResponse!.instances.map(instance => instance.domain);
}
- const allWhitelistedInstancesResponse = await toPromise(this.cachedApi.getWhitelistedInstances());
- if (this.apiResponseHelper.handleErrors([allWhitelistedInstancesResponse])) {
+ const allSafelistedInstancesResponse = await toPromise(this.cachedApi.getSafelistedInstances());
+ if (this.apiResponseHelper.handleErrors([allSafelistedInstancesResponse])) {
this.loading = false;
return;
}
- this.allWhitelistedInstances = allWhitelistedInstancesResponse.successResponse!.instances;
+ this.allSafelistedInstances = allSafelistedInstancesResponse.successResponse!.instances;
const storedFilters = this.database.censureListFilters;
if (!storedFilters.instances.length) {
@@ -157,9 +157,9 @@ export class HesitatedInstancesComponent {
sourceInstances = environment.defaultCensuresListInstanceFilter;
}
if (sourceInstances.indexOf(this.filterInstanceSpecialValueAll) > -1) {
- sourceInstances = this.allWhitelistedInstances.map(instance => instance.domain);
+ sourceInstances = this.allSafelistedInstances.map(instance => instance.domain);
} else {
- const allInstancesString = this.allWhitelistedInstances.map(instance => instance.domain);
+ const allInstancesString = this.allSafelistedInstances.map(instance => instance.domain);
sourceInstances = sourceInstances.filter(instance => allInstancesString.indexOf(instance) > -1);
if (this.filterForm.controls.includeEndorsed.value) {
const endorsedResponse = await toPromise(this.cachedApi.getEndorsementsByInstances(sourceInstances));
diff --git a/src/app/instances/pages/instance-detail/instance-detail.component.html b/src/app/instances/pages/instance-detail/instance-detail.component.html
index 6716b06..17f2963 100644
--- a/src/app/instances/pages/instance-detail/instance-detail.component.html
+++ b/src/app/instances/pages/instance-detail/instance-detail.component.html
@@ -62,7 +62,7 @@ Instance details
N/A
-
+
{{tag}}
diff --git a/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.html b/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.html
new file mode 100644
index 0000000..d4b1b87
--- /dev/null
+++ b/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.html
@@ -0,0 +1 @@
+redirect-whitelist works!
diff --git a/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.scss b/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.ts b/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.ts
new file mode 100644
index 0000000..baa8f7e
--- /dev/null
+++ b/src/app/instances/pages/redirect-whitelist/redirect-whitelist.component.ts
@@ -0,0 +1,21 @@
+import {Component, OnInit} from '@angular/core';
+import {ActivatedRoute, Router} from "@angular/router";
+
+@Component({
+ selector: 'app-redirect-whitelist',
+ templateUrl: './redirect-whitelist.component.html',
+ styleUrls: ['./redirect-whitelist.component.scss']
+})
+export class RedirectWhitelistComponent implements OnInit {
+ constructor(
+ private readonly router: Router,
+ private readonly activatedRoute: ActivatedRoute,
+ ) {
+ }
+
+ public ngOnInit(): void {
+ this.router.navigate(['/instances/safelisted'], {
+ queryParams: this.activatedRoute.snapshot.queryParams,
+ });
+ }
+}
diff --git a/src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.html b/src/app/instances/pages/safelisted-instances/safelisted-instances.component.html
similarity index 94%
rename from src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.html
rename to src/app/instances/pages/safelisted-instances/safelisted-instances.component.html
index 9a64fc1..a7f14b6 100644
--- a/src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.html
+++ b/src/app/instances/pages/safelisted-instances/safelisted-instances.component.html
@@ -38,7 +38,7 @@
- If you're looking for managing of your own whitelist, go to your endorsements.
+ You might also be looking to manage your endorsements.
@@ -87,7 +87,7 @@
N/A
-
+
{{tag}}
diff --git a/src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.scss b/src/app/instances/pages/safelisted-instances/safelisted-instances.component.scss
similarity index 100%
rename from src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.scss
rename to src/app/instances/pages/safelisted-instances/safelisted-instances.component.scss
diff --git a/src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.ts b/src/app/instances/pages/safelisted-instances/safelisted-instances.component.ts
similarity index 90%
rename from src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.ts
rename to src/app/instances/pages/safelisted-instances/safelisted-instances.component.ts
index 1315b91..7de2375 100644
--- a/src/app/instances/pages/whitelisted-instances/whitelisted-instances.component.ts
+++ b/src/app/instances/pages/safelisted-instances/safelisted-instances.component.ts
@@ -10,16 +10,16 @@ import {Instance} from "../../../user/instance";
import {SuccessResponse} from "../../../response/success.response";
import {ApiResponseHelperService} from "../../../services/api-response-helper.service";
import {CachedFediseerApiService} from "../../../services/cached-fediseer-api.service";
-import {WhitelistFilter} from "../../../types/whitelist-filter";
+import {SafelistFilter} from "../../../types/safelist-filter";
import {FormControl, FormGroup, Validators} from "@angular/forms";
import {int} from "../../../types/number";
@Component({
- selector: 'app-whitelisted-instances',
- templateUrl: './whitelisted-instances.component.html',
- styleUrls: ['./whitelisted-instances.component.scss']
+ selector: 'app-safelisted-instances',
+ templateUrl: './safelisted-instances.component.html',
+ styleUrls: ['./safelisted-instances.component.scss']
})
-export class WhitelistedInstancesComponent implements OnInit {
+export class SafelistedInstancesComponent implements OnInit {
private readonly perPage = 30;
private allInstances: InstanceDetailResponse[] = [];
@@ -54,14 +54,14 @@ export class WhitelistedInstancesComponent implements OnInit {
}
public async ngOnInit(): Promise {
- this.titleService.title = 'Whitelisted instances';
+ this.titleService.title = 'Safelisted instances';
this.activatedRoute.queryParams.subscribe(async queryParams => {
this.loading = true;
this.currentPage = queryParams['page'] ? Number(queryParams['page']) : 1;
this.pages = [];
- const filters: WhitelistFilter = {};
+ const filters: SafelistFilter = {};
if (queryParams['tags'] !== undefined) {
filters.tags = queryParams['tags'].split(',');
}
@@ -72,7 +72,7 @@ export class WhitelistedInstancesComponent implements OnInit {
filters.minimumGuarantors = Number(queryParams['minimumGuarantors']);
}
- const formPatch: WhitelistFilter = JSON.parse(JSON.stringify(filters));
+ const formPatch: SafelistFilter = JSON.parse(JSON.stringify(filters));
formPatch.tags ??= [];
formPatch.minimumGuarantors ??= 1;
formPatch.minimumEndorsements ??= 0;
@@ -87,7 +87,7 @@ export class WhitelistedInstancesComponent implements OnInit {
this.endorsedByMe = response.successResponse!.instances.map(instance => instance.domain);
}
- const response = await toPromise(this.cachedApi.getWhitelistedInstances(filters));
+ const response = await toPromise(this.cachedApi.getSafelistedInstances(filters));
if (this.apiResponseHelper.handleErrors([response])) {
this.loading = false;
return;
@@ -99,7 +99,7 @@ export class WhitelistedInstancesComponent implements OnInit {
return a.endorsements > b.endorsements ? -1 : 1;
});
- this.titleService.title = `Whitelisted instances (${this.allInstances.length})`;
+ this.titleService.title = `Safelisted instances (${this.allInstances.length})`;
this.maxPage = Math.ceil(this.allInstances.length / this.perPage);
for (let i = 1; i <= this.maxPage; ++i) {
this.pages.push(i);
diff --git a/src/app/pages/home-page/home-page.component.html b/src/app/pages/home-page/home-page.component.html
index 52e405d..a494718 100644
--- a/src/app/pages/home-page/home-page.component.html
+++ b/src/app/pages/home-page/home-page.component.html
@@ -10,7 +10,7 @@ Fediseer
Fediseer
>> {
+ public getSafelistedInstances(safelistFilter: SafelistFilter = {}, cacheConfig: CacheConfiguration = {}): Observable>> {
cacheConfig.type ??= CacheType.Permanent;
cacheConfig.ttl ??= 120;
- const cacheKey = `api.whitelist${cacheConfig.ttl}.${JSON.stringify(whitelistFilter)}`;
+ const cacheKey = `api.safelist${cacheConfig.ttl}.${JSON.stringify(safelistFilter)}`;
const item = this.getCacheItem>(cacheKey, cacheConfig)!;
if (item.isHit && !cacheConfig.clear) {
return this.getSuccessResponse(item);
}
- return this.api.getWhitelistedInstances(whitelistFilter).pipe(
+ return this.api.getSafelistedInstances(safelistFilter).pipe(
tap(this.storeResponse(item, cacheConfig)),
);
}
- public clearWhitelistCache(): void {
- this.runtimeCache.clearByPrefix('api.whitelist');
- this.permanentCache.clearByPrefix('api.whitelist');
+ public clearSafelistCache(): void {
+ this.runtimeCache.clearByPrefix('api.safelist');
+ this.permanentCache.clearByPrefix('api.safelist');
}
public getHesitationsByInstances(instances: string[], cacheConfig: CacheConfiguration = {}): Observable>> {
@@ -192,7 +192,7 @@ export class CachedFediseerApiService {
return of(item.value!);
}
- return this.getWhitelistedInstances()
+ return this.getSafelistedInstances()
.pipe(
map (response => {
if (!response.success) {
diff --git a/src/app/services/fediseer-api.service.ts b/src/app/services/fediseer-api.service.ts
index 932a091..6c0575a 100644
--- a/src/app/services/fediseer-api.service.ts
+++ b/src/app/services/fediseer-api.service.ts
@@ -18,7 +18,7 @@ import {ResetApiKeyResponse} from "../response/reset-api-key.response";
import {PrivateMessageProxy} from "../types/private-message-proxy";
import {SolicitationInstanceDetailResponse} from "../response/solicitation-instance-detail.response";
import {ActionLogFilter} from "../types/action-log.filter";
-import {WhitelistFilter} from "../types/whitelist-filter";
+import {SafelistFilter} from "../types/safelist-filter";
export interface ApiResponse {
success: boolean;
@@ -178,7 +178,7 @@ export class FediseerApiService {
return this.sendRequest(HttpMethod.Patch, `hesitations/${instance}`, body);
}
- public getWhitelistedInstances(filter: WhitelistFilter = {}): Observable>> {
+ public getSafelistedInstances(filter: SafelistFilter = {}): Observable>> {
const maxPerPage = 100; // from api
let body: {[key: string]: string} = {};
@@ -234,7 +234,7 @@ export class FediseerApiService {
}
public getCensuredInstances(): Observable>> {
- return this.getWhitelistedInstances().pipe(
+ return this.getSafelistedInstances().pipe(
switchMap(response => {
if (!response.success) {
return of({
diff --git a/src/app/solicitations/pages/list-solicitations/list-solicitations.component.ts b/src/app/solicitations/pages/list-solicitations/list-solicitations.component.ts
index bd0da43..03a9b41 100644
--- a/src/app/solicitations/pages/list-solicitations/list-solicitations.component.ts
+++ b/src/app/solicitations/pages/list-solicitations/list-solicitations.component.ts
@@ -60,7 +60,7 @@ export class ListSolicitationsComponent implements OnInit {
this.instances = this.instances.filter(item => item.domain !== instance);
}
this.loading = false;
- this.cachedApi.clearWhitelistCache();
+ this.cachedApi.clearSafelistCache();
this.cachedApi.getGuaranteesByInstance(this.authManager.currentInstanceSnapshot.name, {clear: true}).subscribe();
}
}
diff --git a/src/app/synchronization/components/filter-form/filter-form.component.html b/src/app/synchronization/components/filter-form/filter-form.component.html
index 227cb21..2aa713c 100644
--- a/src/app/synchronization/components/filter-form/filter-form.component.html
+++ b/src/app/synchronization/components/filter-form/filter-form.component.html
@@ -15,11 +15,11 @@
@@ -63,10 +63,10 @@
diff --git a/src/app/synchronization/components/filter-form/filter-form.component.ts b/src/app/synchronization/components/filter-form/filter-form.component.ts
index f87e362..ccd296d 100644
--- a/src/app/synchronization/components/filter-form/filter-form.component.ts
+++ b/src/app/synchronization/components/filter-form/filter-form.component.ts
@@ -45,10 +45,10 @@ export class FilterFormComponent impl
private cache: {[key: string]: InstanceDetailResponse[] | null} = {};
- public loadingWhitelistedInstances = false;
+ public loadingSafelistedInstances = false;
public loadingReasons = false;
- public whitelistedInstancesList: InstanceDetailResponse[] | null = null;
+ public safelistedInstancesList: InstanceDetailResponse[] | null = null;
public availableReasons: string[] | null = null;
public myInstance: string = this.authManager.currentInstanceSnapshot.name;
@@ -205,10 +205,10 @@ export class FilterFormComponent impl
}
private async loadCustomInstancesSelect(mode: SynchronizationMode) {
- if (this.whitelistedInstancesList === null) {
- this.loadingWhitelistedInstances = true;
+ if (this.safelistedInstancesList === null) {
+ this.loadingSafelistedInstances = true;
const responses = await Promise.all([
- toPromise(this.cachedApi.getWhitelistedInstances()),
+ toPromise(this.cachedApi.getSafelistedInstances()),
toPromise(this.cachedApi.getEndorsementsByInstances([this.authManager.currentInstanceSnapshot.name])),
toPromise(this.cachedApi.getGuaranteesByInstance(this.authManager.currentInstanceSnapshot.name)),
]);
@@ -217,8 +217,8 @@ export class FilterFormComponent impl
return;
}
- this.whitelistedInstancesList = responses[0].successResponse!.instances;
- this.loadingWhitelistedInstances = false;
+ this.safelistedInstancesList = responses[0].successResponse!.instances;
+ this.loadingSafelistedInstances = false;
}
}
diff --git a/src/app/types/whitelist-filter.ts b/src/app/types/safelist-filter.ts
similarity index 75%
rename from src/app/types/whitelist-filter.ts
rename to src/app/types/safelist-filter.ts
index 282efb1..e342903 100644
--- a/src/app/types/whitelist-filter.ts
+++ b/src/app/types/safelist-filter.ts
@@ -1,6 +1,6 @@
import {int} from "./number";
-export interface WhitelistFilter {
+export interface SafelistFilter {
tags?: string[];
minimumEndorsements?: int;
minimumGuarantors?: int;
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index 19bcd4f..722e744 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -2,9 +2,9 @@
"app.home": "Home",
"app.home.glossary_link": "If you don't know what this is, you might start at the [link:link]Glossary[/link].",
"app.home.short_welcome": "Welcome to the Fediseer GUI!",
- "app.home.info_text.anonymous": "You can view [link:guaranteedLink]whitelisted[/link] and [link:censuredLink]censured[/link] instances without having an account, but you can also [link:loginLink]log in[/link] (or [link:claimLink]claim your instance[/link]) to manage your own endorsements, censures and guarantees.",
+ "app.home.info_text.anonymous": "You can view [link:guaranteedLink]safelisted[/link] and [link:censuredLink]censured[/link] instances without having an account, but you can also [link:loginLink]log in[/link] (or [link:claimLink]claim your instance[/link]) to manage your own endorsements, censures and guarantees.",
"app.home.info_text.logged_in.without_guarantor": "Your instance isn't currently guaranteed, you may go to [link:solicitations]Solicitations[/link] to ask for a guarantee.",
- "app.home.info_text.logged_in.with_guarantor": "You can view [link:guaranteedLink]whitelisted[/link] and [link:censuredLink]censured[/link] instances or manage your [link:myEndorsements]endorsements[/link], [link:myGuarantees]guarantees[/link] and [link:myCensures]censures[/link].",
+ "app.home.info_text.logged_in.with_guarantor": "You can view [link:guaranteedLink]safelisted[/link] and [link:censuredLink]censured[/link] instances or manage your [link:myEndorsements]endorsements[/link], [link:myGuarantees]guarantees[/link] and [link:myCensures]censures[/link].",
"app.gui.version": "GUI version {{appVersion}}",
"app.sidebar.guarantor_badge.title": "My guarantees",
"app.sidebar.guarantor_badge.alt_text": "Guarantees badge",
@@ -16,7 +16,7 @@
"app.sidebar.censures": "Censures",
"app.sidebar.hesitations": "Hesitations",
"app.sidebar.synchronize": "Synchronize",
- "app.sidebar.guaranteed_instances": "Whitelisted instances",
+ "app.sidebar.guaranteed_instances": "Safelisted instances",
"app.sidebar.censured_instances": "Censured instances",
"app.sidebar.hesitated_instances": "Hesitated instances",
"app.sidebar.suspicious_instances": "Suspicious instances",
| |