Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1702 from CTemplar/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
The-Hidden-Hand authored Mar 14, 2022
2 parents 3afdc53 + b8dad23 commit 360460b
Show file tree
Hide file tree
Showing 12 changed files with 3,741 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctemplar",
"version": "2.5.71",
"version": "2.5.72",
"license": "Apache",
"main": "electron-main.js",
"description": "Angular webclient (with Linux, macOS and Windows desktop clients) for CTemplar's encrypted email service.",
Expand Down
2 changes: 1 addition & 1 deletion src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</div>
<div>
<a href="https://mastodon.social/@ctemplar" target="_blank" rel="noopener noreferrer">
<i class="fortfa-mastodon fortfa text-light"></i>
<i class="fa-mastodon fab text-light"></i>
</a>
<a href="https://www.reddit.com/r/ctemplar/" target="_blank" rel="noopener noreferrer">
<i class="fa-reddit fab text-light"></i>
Expand Down
3 changes: 2 additions & 1 deletion src/app/mail/mail.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@
.mobiledOptionsDropdown {
padding: 0.75rem 0.938rem;
background: var(--brand-faded);
overflow: visible;
&.dropdown-menu {
margin-top: 1px;
right: 0;
Expand All @@ -756,7 +757,7 @@
}

.dropdown-menu {
top: 42px !important;
top: 1rem !important;
left: -67px !important;
}
}
Expand Down
15 changes: 12 additions & 3 deletions src/app/store/services/token.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
StopGettingUnreadMailsCount,
SetAuthenticatedState,
ClearMailsOnLogout,
RefreshToken,
} from '../actions';
import { AppState, AuthState } from '../datatypes';
import { apiUrl } from '../../shared/config';
Expand All @@ -32,7 +33,12 @@ export class TokenInterceptor implements HttpInterceptor {

private isAuthenticated = false;

constructor(private injector: Injector, private store: Store<AppState>, private websocketService: WebsocketService) {
constructor(
private injector: Injector,
private store: Store<AppState>,
private websocketService: WebsocketService,
private usersService: UsersService,
) {
this.store
.select(state => state.auth)
.pipe()
Expand Down Expand Up @@ -65,12 +71,15 @@ export class TokenInterceptor implements HttpInterceptor {
}
}),
catchError((error: any) => {
const { status, url } = error;
if (error instanceof HttpErrorResponse) {
if (error.status === 401 && !error.url.includes('auth/sign-out')) {
if (status === 401 && this.usersService.shouldRemember() && !url.includes('auth/refresh')) {
this.store.dispatch(new RefreshToken());
} else if (status === 401 && !url.includes('auth/sign-out')) {
this.websocketService.disconnect();
this.store.dispatch(new ClearMailsOnLogout());
this.store.dispatch(new Logout({ session_expired: true }));
} else if (error.status === 423) {
} else if (status === 423) {
this.store.dispatch(new StopGettingUnreadMailsCount());
this.store.dispatch(new PaymentFailure());
}
Expand Down
4 changes: 4 additions & 0 deletions src/app/store/services/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export class UsersService {
return this.userKey || localStorage.getItem('user_key');
}

shouldRemember(): string {
return localStorage.getItem(REMEMBER_ME);
}

getNecessaryTokenUrl(url: string) {
url = url.replace(apiUrl, '');
const authenticatedUrls: string[] = [
Expand Down
Binary file modified src/assets/fonts/webfonts/fa-brands-400.eot
Binary file not shown.
3,718 changes: 3,717 additions & 1 deletion src/assets/fonts/webfonts/fa-brands-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/fonts/webfonts/fa-brands-400.ttf
Binary file not shown.
Binary file modified src/assets/fonts/webfonts/fa-brands-400.woff
Binary file not shown.
Binary file modified src/assets/fonts/webfonts/fa-brands-400.woff2
Binary file not shown.
3 changes: 3 additions & 0 deletions src/styles/vendors/fontawesome/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,9 @@ readers do not read off random characters that represent icons */
.#{$fa-css-prefix}-reddit:before {
content: fa-content($fa-var-reddit);
}
.#{$fa-css-prefix}-mastodon:before {
content: fa-content($fa-var-mastodon);
}
.#{$fa-css-prefix}-reddit-alien:before {
content: fa-content($fa-var-reddit-alien);
}
Expand Down
1 change: 1 addition & 0 deletions src/styles/vendors/fontawesome/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ $fa-var-readme: \f4d5;
$fa-var-rebel: \f1d0;
$fa-var-recycle: \f1b8;
$fa-var-red-river: \f3e3;
$fa-var-mastodon: \f4f6;
$fa-var-reddit: \f1a1;
$fa-var-reddit-alien: \f281;
$fa-var-reddit-square: \f1a2;
Expand Down

0 comments on commit 360460b

Please sign in to comment.