Skip to content

Commit

Permalink
v2.1.2b
Browse files Browse the repository at this point in the history
  • Loading branch information
theADAMJR committed Jun 27, 2020
1 parent eda04b7 commit 4966752
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 65 deletions.
2 changes: 0 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { WarningsModuleComponent } from './dashboard/warnings-module/warnings-mo
import { TimersModuleComponent } from './dashboard/timers-module/timers-module.component';
import { BadgesComponent } from './dashboard/badges/badges.component';
import { CratesComponent } from './crates/crates.component';
import { StatusComponent } from './status/status.component';

const routes: Routes = [
{ path: '', component: HomeComponent },
Expand Down Expand Up @@ -64,7 +63,6 @@ const routes: Routes = [
{ path: 'pro', component: ProComponent },
{ path: 'payment-success', component: PaymentSuccessComponent },

{ path: 'status', component: StatusComponent },
{ path: '**', component: NotFoundComponent }
];

Expand Down
12 changes: 4 additions & 8 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ErrorHandler, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { NgModule, ErrorHandler, CUSTOM_ELEMENTS_SCHEMA, ViewContainerRef } from '@angular/core';
import { HttpClientModule, HttpErrorResponse } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ChartsModule } from 'ng2-charts';
Expand Down Expand Up @@ -59,25 +59,22 @@ import { TruncatedPipe } from './pipes/truncated.pipe';
import { DurationStringPipe } from './pipes/duration-string.pipe';
import { environment } from 'src/environments/environment';
import { CratesComponent } from './crates/crates.component';
import { StatusComponent } from './status/status.component';
import { SEOService } from './services/seo.service';
import { HomeFooterComponent } from './home-footer/home-footer.component';
import { WavesComponent } from './waves/waves.component';

export class AlertErrorHandler implements ErrorHandler {
export class AlertErrorHandler implements ErrorHandler {
async handleError(error: Error | any) {
try {
alert(error?.rejection?.error ?? error?.message ?? error);
console.log(error);

const key = localStorage.getItem('key');
await fetch(`${environment.endpoint}/error?key=${key}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message: error.message })
});
} finally {
console.log(error);
}
} catch {}
}
}

Expand Down Expand Up @@ -134,7 +131,6 @@ export class AlertErrorHandler implements ErrorHandler {
TruncatedPipe,
DurationStringPipe,
CratesComponent,
StatusComponent,
HomeFooterComponent,
WavesComponent
],
Expand Down
8 changes: 6 additions & 2 deletions src/app/dashboard/timers-module/timers-module.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ <h3 routerLink="/docs/timers" fragment="schedule">Schedule</h3>
<li class="list-group-item" *ngFor="let task of schedule; index as i"
[class]="task.status.toLowerCase()">
<span *ngIf="isCommandTimer(task.timer)">
<i class="fa fa-code" aria-hidden="true"></i> Execute <code>Command Timer</code> in <strong>#{{ getChannel(task.timer.channel)?.name }}</strong>, every <u>{{ task.timer.interval }}</u> from {{ task.timer.from | cleanDateTime }}
<i class="fa fa-code" aria-hidden="true"></i>
Execute <code class="rounded p-1">Command Timer</code> in <code class="rounded p-1">#{{ getChannel(task.timer.channel)?.name }}</code>,
every <code class="rounded p-1">{{ task.timer.interval }}</code> from <code class="rounded p-1">{{ task.timer.from | cleanDateTime }}</code>
</span>
<span *ngIf="!isCommandTimer(task.timer)">
<i class="fa fa-comment" aria-hidden="true"></i> Send <code>Message Timer</code> to <strong>#{{ getChannel(task.timer.channel)?.name }}</strong>, every <u>{{ task.timer.interval }}</u> from {{ task.timer.from | cleanDateTime }}
<i class="fa fa-comment" aria-hidden="true"></i>
Send <code class="rounded p-1">Message Timer</code> to <code class="rounded p-1">#{{ getChannel(task.timer.channel)?.name }}</code>,
every <code class="rounded p-1">{{ task.timer.interval }}</code> from <code class="rounded p-1">{{ task.timer.from | cleanDateTime }}</code>
</span>
<p class="float-right m-0">{{ task.status }}</p>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/app/docs/docs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class DocsComponent implements OnInit {
document.querySelector(window.location.hash)?.scrollIntoView();

this.setAnchorReferences();
} catch (e) { this.router.navigate(['/404']); }
} catch (e) { this.router.navigate(['/docs']); }
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/guards/dashboard-auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class DashboardAuthGuard implements CanActivate {

const canActivate = Boolean(this.userService.user);
if (!canActivate)
this.router.navigate(['/login'])
this.router.navigate(['/login']);
return canActivate;
}
}
2 changes: 1 addition & 1 deletion src/app/guards/guild-auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class GuildAuthGuard implements CanActivate {
};
const canActivate = this.guildService.guilds?.some(g => g.id === guildId);
if (!canActivate)
this.router.navigate(['/404'])
this.router.navigate(['/dashboard']);
return canActivate;
}
}
2 changes: 1 addition & 1 deletion src/app/guards/leaderboard-auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class LeaderboardAuthGuard implements CanActivate {
}
const canActivate = guildConfig && !guildConfig.settings.privateLeaderboard;
if (!canActivate)
this.router.navigate(['/404'])
this.router.navigate(['/404']);
return canActivate;
}
}
8 changes: 7 additions & 1 deletion src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ <h3>What are you waiting for? 🤔</h3>
<button class="my-2" routerLink="/invite" color="success" mat-button>Level Up Your Servers</button>
</section>

<section></section>
<hr>

<section class="container">
<div class="d-flex justify-content-center pt-5">
<dbots-widget bot-id="525935335918665760"></dbots-widget>
</div>
</section>

<home-footer></home-footer>
1 change: 1 addition & 0 deletions src/app/module-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export abstract class ModuleConfig implements OnDestroy {
this.filterFormValue();

await this.guildService.saveGuild(this.guildId, this.moduleName, this.form.value);
this.originalSavedGuild[this.moduleName] = this.form.value;
} catch {
console.log(this.form.value);
}
Expand Down
4 changes: 0 additions & 4 deletions src/app/status/status.component.css

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/status/status.component.html

This file was deleted.

25 changes: 0 additions & 25 deletions src/app/status/status.component.spec.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/status/status.component.ts

This file was deleted.

12 changes: 10 additions & 2 deletions src/assets/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@
### v2.1.2b
`Upcoming`

<!-- ![v2.1.2b Dashboard](assets/docs/img/dashboard-v2.1.2b.png) -->
![v2.1.2b Dashboard](assets/docs/img/dashboard-v2.1.2b.png)

**Add**
- dashboard -> timers -> add better command timers interface
- dashboard -> one-click sign in

**Fix**
**Change/Fix**
- timers -> timer spam
- dashboard -> guild -> redirects to /dashboard then to /login when guild cannot be found
- rate limiting -> changed rate limiting settings to be more user friendly
- bot persistently crashed due to memory leak

**Remove**
- obnoxious alert error logs
- `ITS TIME TO STOP! ITS TIME TO STOP OK! NO MORE!` rate limiting message

---

Expand All @@ -42,6 +49,7 @@
- auto mod ->copy and paste boo boo with explicit words
- commands -> empty permissions displayed undefined
- docs -> changelog -> navigating to docs anchor links was sending 404
- reaction roles -> emoji name comparison bug stopped some reaction roles from working

**Removed**
- logs -> cleared all existing logs as some were unnecessary
Expand Down
4 changes: 3 additions & 1 deletion src/assets/docs/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
## Ideas

**Command Timers** - Cwis.exe#6169
**Reaction Roles** - Cwis.exe#6169
**Reaction Roles** - Cwis.exe#6169

**Skilled Bug Slayer** - Griffler#7298
Binary file added src/assets/docs/img/dashboard-v2.1.2b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<meta name="google-site-verification" content="yINl58er1BTC2i-8ZGqLL5ASaIczOaWg-Vlbvy1xAQ0" />

<script src="//discordbotlist.com/widget/index.js" defer></script>
<script src="//www.googletagmanager.com/gtag/js?id=UA-125736685-2" defer></script>
<script defer>
window.dataLayer = window.dataLayer || [];
Expand All @@ -23,6 +22,7 @@
</script>

<script src="//8m2kq30c0slt.statuspage.io/embed/script.js" defer></script>
<script src="https://dbots.co/assets/js/widget.js" defer></script>
</head>
<body class="mat-app-background">
<app-root>
Expand Down

0 comments on commit 4966752

Please sign in to comment.