Skip to content

Commit 229e8de

Browse files
committed
feat: Reverse feature names, so 'enable' instead of 'disable'
1 parent 13d1863 commit 229e8de

File tree

10 files changed

+88
-85
lines changed

10 files changed

+88
-85
lines changed

.github/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You'll never again loose track of your domains, miss an expiration, or forget wh
5656

5757
### Features
5858

59-
- 📡 Auto-fetched assets: SSL certs, hosts, registrars, IPs, subdomains, DNS, etc
59+
- 📡 Auto-fetched data: SSL certs, hosts, registrars, IPs, subdomains, DNS, etc
6060
- 🔬 View detailed metrics and analysis for each domain
6161
- 📊 Visual analytics and breakdowns and trends across your portfolio
6262
- 💬 Configurable alerts and webhook notifications
@@ -67,7 +67,6 @@ You'll never again loose track of your domains, miss an expiration, or forget wh
6767
- 🔖 Add categories, and link related resources to domains
6868
- 🎨 Multi-language support, dark/light/custom themes
6969

70-
7170
### Demo
7271

7372
Try the live demo to [demo.domain-locker.com](https://demo.domain-locker.com) <br>
@@ -78,12 +77,15 @@ Try the live demo to [demo.domain-locker.com](https://demo.domain-locker.com) <b
7877
## Get Started
7978

8079
To use Domain Locker, you have two options:
80+
1. 💻 The managed instance, at **[domain-locker.com](http://domain-locker.com/)** _(free)_
81+
2. 🏗️ Or **[self-hosting](#deployment)** yourself via Docker _(also free, ofc!)_
8182

82-
1. The managed instance, at **[domain-locker.com](http://domain-locker.com/)** _(free)_
83-
2. Or **[self-hosting](#deployment)** yourself via Docker _(also free, ofc!)_
83+
### Option 1: Domain-Locker.com
8484

85+
Domain Locker is up and running at **[domain-locker.com](https://domain-locker.com)**<br>
86+
It's free to use starter plan, no setup required, just sign in & start tracking domains
8587

86-
### Self-Hosting
88+
### Option 2: Self-Hosting
8789

8890
```bash
8991
TODO

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export class AppComponent implements OnInit, OnDestroy {
223223

224224
/* Check if documentation enabled before navigating to any /about page */
225225
private async checkIfDocsDisabled(docsPath?: string): Promise<void> {
226-
if (await this.featureService.isFeatureEnabledPromise('disableDocs')) {
226+
if (!(await this.featureService.isFeatureEnabledPromise('enableDocs'))) {
227227
// Docs disabled, show warning and navigate back to home
228228
this.globalMessageService.showWarn(
229229
'Docs Disabled',

src/app/components/navbar/navbar.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ <h1 class="text-xl font-bold ml-2 text-primary relative">
1616
<p-menubar [model]="items" [styleClass]="'bg-transparent border-none p-0'"></p-menubar>
1717

1818
<p-button
19-
*ngIf="!isAuthenticated && !(disabledSignUp$ | async)"
19+
*ngIf="!isAuthenticated && (enableSignUp$ | async)"
2020
routerLink="/login"
2121
[queryParams]="{ newUser: 'true' }"
22-
label="Sign Up"
22+
label="Sign Up"
2323
size="small"
24-
icon="pi pi-face-smile"
24+
icon="pi pi-face-smile"
2525
class="ml-1"
2626
/>
2727

src/app/components/navbar/navbar.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class NavbarComponent implements OnInit, AfterViewInit {
5050
planColor: string = 'primary';
5151

5252
settingsEnabled$ = this.featureService.isFeatureEnabled('accountSettings');
53-
disabledSignUp$ = this.featureService.isFeatureEnabled('disableSignUp');
53+
enableSignUp$ = this.featureService.isFeatureEnabled('enableSignUp');
5454
private subscriptions: Subscription = new Subscription();
5555

5656
public isSupabaseEnabled = this.databaseService.serviceType === 'supabase';
@@ -155,7 +155,7 @@ export class NavbarComponent implements OnInit, AfterViewInit {
155155
// User is not logged in, show docs links
156156
this.items = unauthenticatedNavLinks;
157157
this.itemsWithSettings = unauthenticatedNavLinks;
158-
if (await this.featureService.isFeatureEnabledPromise('disableDocs')) {
158+
if (!(await this.featureService.isFeatureEnabledPromise('enableDocs'))) {
159159
// Docs is disabled, don't show docs links
160160
this.items = [];
161161
this.itemsWithSettings = [];

src/app/constants/feature-options.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export type FeatureDefinitions = {
2323
changeHistory: FeatureConfig<boolean>;
2424
accountSettings: FeatureConfig<boolean>;
2525
writePermissions: FeatureConfig<boolean>;
26-
disableDocs: FeatureConfig<boolean>;
27-
disableSignUp: FeatureConfig<boolean>;
28-
disableSocialLogin: FeatureConfig<boolean>;
29-
disableBilling: FeatureConfig<boolean>;
26+
enableDocs: FeatureConfig<boolean>;
27+
enableSignUp: FeatureConfig<boolean>;
28+
enableSocialLogin: FeatureConfig<boolean>;
29+
enableBilling: FeatureConfig<boolean>;
3030
allowLocalDbConfig: FeatureConfig<boolean>;
3131
};
3232

@@ -96,26 +96,26 @@ export const features: FeatureDefinitions = {
9696
default: true,
9797
demo: false,
9898
},
99-
disableDocs: {
100-
default: false,
101-
demo: true,
102-
selfHosted: true,
99+
enableDocs: {
100+
default: true,
101+
demo: false,
102+
selfHosted: false,
103103
},
104-
disableSignUp: {
105-
default: false,
106-
demo: true,
104+
enableSignUp: {
105+
default: true,
106+
demo: false,
107107
},
108-
disableSocialLogin: {
109-
default: false,
110-
demo: true,
111-
dev: true,
112-
selfHosted: true,
108+
enableSocialLogin: {
109+
default: true,
110+
demo: false,
111+
dev: false,
112+
selfHosted: false,
113113
},
114-
disableBilling: {
115-
default: false,
116-
demo: true,
117-
selfHosted: true,
118-
dev: true,
114+
enableBilling: {
115+
default: true,
116+
demo: false,
117+
selfHosted: false,
118+
dev: false,
119119
},
120120
allowLocalDbConfig: {
121121
default: false,
@@ -158,21 +158,21 @@ export const featureDescriptions: Record<keyof FeatureDefinitions, { label: stri
158158
label: 'Write Permissions',
159159
description: 'Allow others to write to your account',
160160
},
161-
disableDocs: {
162-
label: 'No Documentation',
163-
description: 'Disable access to the local documentation',
161+
enableDocs: {
162+
label: 'Documentation Enabled',
163+
description: 'Allows local access to documentation and posts',
164164
},
165-
disableSignUp: {
165+
enableSignUp: {
166166
label: 'Disable Sign Up',
167167
description: 'Prevent new users from signing up',
168168
},
169-
disableSocialLogin: {
170-
label: 'Disable Social Login',
171-
description: 'Prevent users from signing up or logging in with social accounts',
169+
enableSocialLogin: {
170+
label: 'Enable Social Login',
171+
description: 'Allow users to sign up or log in with social accounts (like Google, GitHub, etc)',
172172
},
173-
disableBilling: {
174-
label: 'Disable Billing',
175-
description: 'Prevent users from upgrading their account or sending payments',
173+
enableBilling: {
174+
label: 'Enable Billing',
175+
description: 'Allow users to upgrade their accounts, and manage payments',
176176
},
177177
allowLocalDbConfig: {
178178
label: 'Allow Local DB Config',

src/app/pages/(auth)/login.page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h2 class="font-semibold text-primary">Welcome!</h2>
3434
</p-card>
3535

3636
<!-- Social login options -->
37-
<p-card *ngIf="!isAuthenticated && !requireMFA && !(disabledSocialLogin$ | async)"
37+
<p-card *ngIf="!isAuthenticated && !requireMFA && (enableSocialLogin$ | async)"
3838
class="max-w-[500px] w-[calc(100%-0.5rem)]">
3939
<ng-template pTemplate="title">
4040
Continue With
@@ -144,7 +144,7 @@ <h2 class="font-semibold text-primary">Welcome!</h2>
144144
</div>
145145
</ng-template>
146146
</p-messages>
147-
</ng-template>
147+
</ng-template>
148148
</p-card>
149149

150150
</div>

src/app/pages/(auth)/login.page.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export default class LoginPageComponent implements OnInit {
6161

6262
private subscriptions: Subscription = new Subscription();
6363

64-
disabledSocialLogin$ = this.featureService.isFeatureEnabled('disableSocialLogin');
65-
64+
enableSocialLogin$ = this.featureService.isFeatureEnabled('enableSocialLogin');
65+
6666
constructor(
6767
private fb: FormBuilder,
6868
private supabaseService: SupabaseService,
@@ -117,7 +117,7 @@ export default class LoginPageComponent implements OnInit {
117117
this.requireMFA = true;
118118
this.factorId = factors.totp[0].id;
119119
this.form.get('mfaCode')?.setValidators([
120-
Validators.required,
120+
Validators.required,
121121
Validators.pattern(/^\d{6}$/)
122122
]);
123123
this.form.get('mfaCode')?.updateValueAndValidity();
@@ -127,7 +127,7 @@ export default class LoginPageComponent implements OnInit {
127127
}
128128
});
129129
}
130-
130+
131131
ngOnDestroy() {
132132
this.subscriptions.unsubscribe();
133133
}
@@ -151,7 +151,7 @@ export default class LoginPageComponent implements OnInit {
151151
this.factorId = null;
152152
this.challengeId = null;
153153
this.form.get('mfaCode')?.reset();
154-
154+
155155
// Reset form validators based on mode
156156
if (this.isLogin) {
157157
this.form.get('confirmPassword')?.clearValidators();
@@ -166,7 +166,7 @@ export default class LoginPageComponent implements OnInit {
166166
}
167167

168168
async checkIfSignupDisabled() {
169-
if ((await this.featureService.isFeatureEnabledPromise('disableSignUp'))) {
169+
if (!(await this.featureService.isFeatureEnabledPromise('enableSignUp'))) {
170170
this.messagingService.showWarn(
171171
'Sign Up Disabled',
172172
'It\'s not possible to create new accounts on the demo instance.',
@@ -198,7 +198,7 @@ export default class LoginPageComponent implements OnInit {
198198
signOut() {
199199
this.supabaseService.signOut();
200200
}
201-
201+
202202
private resetMessages() {
203203
this.errorMessage = '';
204204
this.successMessage = '';
@@ -215,34 +215,34 @@ export default class LoginPageComponent implements OnInit {
215215
try {
216216
await this.supabaseService.signInWithGoogle();
217217
} catch (error: any) {
218-
this.errorHandlerService.handleError({
219-
error,
220-
message: 'Failed to sign in with Google',
221-
showToast: true,
222-
location: 'loginWithGoogle'
218+
this.errorHandlerService.handleError({
219+
error,
220+
message: 'Failed to sign in with Google',
221+
showToast: true,
222+
location: 'loginWithGoogle'
223223
});
224224
}
225-
}
225+
}
226226

227227
async loginWithFacebook(): Promise<void> {
228228
try {
229229
await this.supabaseService.signInWithFacebook();
230230
} catch (error: any) {
231-
this.errorHandlerService.handleError({
232-
error,
233-
message: 'Failed to sign in with Facebook',
234-
showToast: true,
235-
location: 'loginWithFacebook'
231+
this.errorHandlerService.handleError({
232+
error,
233+
message: 'Failed to sign in with Facebook',
234+
showToast: true,
235+
location: 'loginWithFacebook'
236236
});
237237
}
238238
}
239-
239+
240240
async onSubmit() {
241241
if (!this.form.valid || (this.requireMFA && this.form.get('mfaCode')?.invalid)) return;
242-
242+
243243
this.resetMessages();
244244
this.showLoader = true;
245-
245+
246246
try {
247247
const credentials = {
248248
email: this.form.get('email')?.value,
@@ -309,13 +309,13 @@ export default class LoginPageComponent implements OnInit {
309309
private async setupMFAVerification(factorId: string): Promise<void> {
310310
this.requireMFA = true;
311311
this.factorId = factorId;
312-
312+
313313
this.form.get('mfaCode')?.setValidators([
314314
Validators.required,
315315
Validators.pattern(/^\d{6}$/)
316316
]);
317317
this.form.get('mfaCode')?.updateValueAndValidity();
318-
318+
319319
this.successMessage = 'Please enter your 2FA code to continue';
320320
this.cdr.detectChanges();
321321
}
@@ -331,21 +331,21 @@ export default class LoginPageComponent implements OnInit {
331331
this.turnstileResponse,
332332
);
333333
const timeoutPromise = this.createTimeout(delayTimeout);
334-
334+
335335
const result = await Promise.race([authPromise, timeoutPromise]);
336336
if (result instanceof Error) {
337337
throw result;
338338
}
339339

340340
this.handleSuccess();
341341
}
342-
342+
343343
private createTimeout(ms: number): Promise<never> {
344344
return new Promise((_, reject) => {
345345
setTimeout(() => reject(new Error('Request timed out')), ms);
346346
});
347347
}
348-
348+
349349
private handleSuccess() {
350350
if (this.requireMFA) {
351351
this.successMessage = '2FA verification is enabled. Please enter your code when prompted';
@@ -359,7 +359,7 @@ export default class LoginPageComponent implements OnInit {
359359
}
360360
this.cdr.detectChanges();
361361
}
362-
362+
363363
private handleError(error: unknown) {
364364
if (error instanceof Error) {
365365
this.errorMessage = error.message;
@@ -371,7 +371,7 @@ export default class LoginPageComponent implements OnInit {
371371
}
372372
this.cdr.detectChanges();
373373
}
374-
374+
375375
public resendVerificationEmail() {
376376
this.showLoader = true;
377377
try {
@@ -385,5 +385,5 @@ export default class LoginPageComponent implements OnInit {
385385
this.showLoader = false;
386386
}
387387
}
388-
388+
389389
}

0 commit comments

Comments
 (0)