Skip to content

Commit

Permalink
Fix a few lighthouse reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Bauer committed Oct 18, 2020
1 parent f43433f commit 65df132
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 53 deletions.
16 changes: 8 additions & 8 deletions secretnote-fe/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
</a>
</li>
<li class="nav-item" routerLinkActive="active">
<a class="nav-link" routerLink="/chat/create"><span appOcticon octicon="comment-discussion"></span>&nbsp;<ng-container i18n>New
Chat
</ng-container>
<a class="nav-link" routerLink="/chat/create"><span appOcticon octicon="comment-discussion"></span>&nbsp;
<ng-container i18n>New Chat</ng-container>
</a>
</li>
<li class="nav-item" routerLinkActive="active">
Expand All @@ -30,12 +29,13 @@
</small>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="https://github.com/MarkusBauer/secretnote" rel="nofollow"
<a class="nav-link" href="https://github.com/MarkusBauer/secretnote" rel="noreferrer"
title="This site is open source software, code hosted on Github" target="_blank"><span appOcticon octicon="mark-github"></span></a>
</li>
<li class="nav-item" ngbDropdown>
<a class="nav-link" ngbDropdownToggle role="button" id="languageDropdown" title="Select Language"><span appOcticon
octicon="globe">Language</span></a>
<a class="nav-link" ngbDropdownToggle role="button" id="languageDropdown" title="Select Language">
<span appOcticon octicon="globe">Language</span>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="languageDropdown" ngbDropdownMenu>
<a ngbDropdownItem class="dropdown-item" [href]="'/en' + router.url">English</a>
<a ngbDropdownItem class="dropdown-item" [href]="'/de' + router.url" title="German">Deutsch</a>
Expand All @@ -59,7 +59,7 @@ <h3 class="card-header bg-danger text-white" i18n>Secret communication requires
Without scripting it is not possible to keep your message secret, because someone else would have to carry out encryption for
you.
</p>
<h5 class="card-title text-danger" i18n>Why Javascript?</h5>
<h4 class="card-title text-danger" i18n>Why Javascript?</h4>
<p class="card-text" i18n="@@noscript-js">
Your note should be secret to you and the recipient, right?
Your note is secret as long as only you and your recipient have its <em>encryption key</em>.
Expand All @@ -69,7 +69,7 @@ <h5 class="card-title text-danger" i18n>Why Javascript?</h5>
notice.
But <strong>with javascript, your note is safe</strong> even from rogue servers, because your encryption key is never sent.
</p>
<a routerLink="/faq" fragment="faq" class="card-link text-danger" i18n>Read more in the F.A.Q</a>
<a routerLink="/faq" fragment="faq" class="card-link text-danger" aria-label="Frequently Asked Questions" i18n>Read more in the F.A.Q</a>
</div>
</div>
</div>
Expand Down
12 changes: 7 additions & 5 deletions secretnote-fe/src/app/page-about/page-about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ <h1 i18n>About SecretNote</h1>
<p>
<ng-container i18n="@@about-text1">SecretNote is free and open source software, powered by Rust, Redis, Angular and Typescript.
Anyone is free to host custom instances free of charge.</ng-container>
<a href="https://github.com/MarkusBauer/secretnote" rel="nofollow" target="_blank"><span appOcticon octicon="mark-github"></span>&nbsp;https://github.com/MarkusBauer/secretnote</a>
<a href="https://github.com/MarkusBauer/secretnote" rel="noreferrer" target="_blank">
<span appOcticon octicon="mark-github" class="text-nowrap"></span>&nbsp;https://github.com/MarkusBauer/secretnote
</a>
</p>

<h5>
<h2>
Version
<span class="badge badge-primary" *ngIf="environment.build.version">{{ environment.build.version }}</span>
</h5>
</h2>
<p>
Git commit: <code>{{environment.build.git_hash}}</code><br/>
<ng-container i18n>Commit time</ng-container>: {{environment.build.build_time}}
Expand All @@ -17,12 +19,12 @@ <h5>
<br/>
<br/>

<h5 i18n>Privacy Policy</h5>
<h2 i18n>Privacy Policy</h2>
<p><strong i18n>Scope: </strong> Website <code>https://secretnote.mk-bauer.de</code>.</p>
<p i18n="@@gdpr-responsibility"><strong>Responsibility:</strong>
For questions or requests regarding personal data contact
<code>secretnote AT mk-bauer DOT de</code>.
This website is hosted by <a href="https://uberspace.de/" rel="nofollow">Uberspace</a> which process data for us.
This website is hosted by <a href="https://uberspace.de/" rel="noreferrer">Uberspace</a> which process data for us.
We signed a data processing contract with Uberspace.
</p>
<p i18n="@@gdpr-security">
Expand Down
16 changes: 8 additions & 8 deletions secretnote-fe/src/app/page-faq/page-faq.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 i18n id="faq">Frequently Asked Questions</h1>

<h5 i18n>Why?</h5>
<h2 i18n>Why?</h2>
<p i18n="@@faq-why-1">
Imagine you want to send someone a password over messenger.
Years later someone could go back in your message history and reveal the password!
Expand All @@ -12,17 +12,17 @@ <h5 i18n>Why?</h5>
If your friend wants uses the secret link and it has already been invalidated, it's obvious that it was sniffed.
</p>

<h5 i18n>Do I know when the note has been read?</h5>
<h2 i18n>Do I know when the note has been read?</h2>
<p i18n="@@faq-read">After creating a note you'll get an admin link. With this link you can check if your note has been read.</p>

<h5 i18n>How are notes protected?</h5>
<h2 i18n>How are notes protected?</h2>
<p i18n="@@faq-protected">
Your notes are protected using state-of-the-art end-to-end encryption (AES-GCM-128 with authentication).
The communication to the server is again encrypted using TLS.
Your encryption keys are never send over network.
</p>

<h5 i18n>Why is Javascript required?</h5>
<h2 i18n>Why is Javascript required?</h2>
<p i18n="@@faq-js">
Without scripting it is not possible to keep your message secret, because someone else would have to carry out encryption for you.
Your note should be secret to you and the recipient, right?
Expand All @@ -32,16 +32,16 @@ <h5 i18n>Why is Javascript required?</h5>
But if the server would get the encryption key, he could (in theory) decrypt and read your secret note, and you wouldn't even notice.
But <strong>with javascript, your note is safe</strong> even from rogue servers, because your encryption key is never sent.
</p>
<h5 i18n>How is the encryption key transmitted to the recipient?</h5>
<h2 i18n>How is the encryption key transmitted to the recipient?</h2>
<p i18n="@@faq-key">
The key is encoded in the <em>fragment</em> part of your secret url.
This part of the url is kept local to your browser and never transmitted over network.
</p>
<h5 i18n>Can I check if the javascript is trustworthy?</h5>
<h2 i18n>Can I check if the javascript is trustworthy?</h2>
<p i18n="@@faq-jstrust">
The source code of this service is available on Github (<a href="https://github.com/MarkusBauer/secretnote" rel="nofollow" target="_blank">https://github.com/MarkusBauer/secretnote</a>), anyone can read and check it.
The source code of this service is available on Github (<a href="https://github.com/MarkusBauer/secretnote" rel="noreferrer" target="_blank">https://github.com/MarkusBauer/secretnote</a>), anyone can read and check it.
To ensure this service uses unaltered javascript code, you can check the <em>integrity</em> hashes of the three javascript files.
You find the hashes of this service when viewing the source code of this page.
You find the hashes of the open source code when inspecting the current release.
These releases are built by <a href="https://github.com/features/actions" rel="nofollow" target="_blank">Github Actions</a>, so not even the service operators could interfere with the build process.
These releases are built by <a href="https://github.com/features/actions" rel="noreferrer" target="_blank">Github Actions</a>, so not even the service operators could interfere with the build process.
</p>
20 changes: 19 additions & 1 deletion secretnote-fe/src/bootstrap-mod.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
$blue: #007bff !default;
$indigo: #6610f2 !default;
$purple: #6f42c1 !default;
$pink: #e83e8c !default;
$red: #dc3545 !default;
$orange: #fd7e14 !default;
$yellow: #ffc107 !default;
$green: #28a745 !default;
$teal: #20c997 !default;
$cyan: #17a2b8 !default;




//$primary: #6f42c1;
$primary: darken(#6f42c1, 12%);
$primary: darken($purple, 12%);
$code-color: darken($pink, 30%);


$font-size-base: 1rem !default;
$h2-font-size: $font-size-base * 1.25;
8 changes: 8 additions & 0 deletions secretnote-fe/src/locale/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,14 @@
<context context-type="linenumber">12</context>
</context-group>
</trans-unit>
<trans-unit id="1bec8edeef24331bc81449e7624fe20d72cb31ad" datatype="html">
<source>Commit time</source>
<target>Commit-Zeitstempel</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">16</context>
</context-group>
</trans-unit>

<trans-unit id="b8d10cd55fae4e4ad4f87d28e18251694f159bf7" datatype="html">
<source>Privacy Policy</source>
Expand Down
64 changes: 33 additions & 31 deletions secretnote-fe/src/locale/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
<source>New Chat</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">15</context>
<context context-type="linenumber">17</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-chat-create/page-chat-create.component.html</context>
Expand All @@ -267,60 +267,62 @@
<source>F.A.Q</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">18</context>
<context context-type="linenumber">21</context>
</context-group>
</trans-unit>
<trans-unit id="004b222ff9ef9dd4771b777950ca1d0e4cd4348a" datatype="html">
<source>About</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">21</context>
<context context-type="linenumber">24</context>
</context-group>
</trans-unit>
<trans-unit id="780dfdaaf2aebeb6438c782eecced1e6d8fec805" datatype="html">
<source>Secret communication requires Javascript</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">48</context>
<context context-type="linenumber">54</context>
</context-group>
</trans-unit>
<trans-unit id="noscript-intro" datatype="html">
<source>
We all know that Javascript is not commonly associated with security.
But Javascript is requires to ensure proper client-side encryption of your messages.
Without scripting it is not possible to keep your message secret, because someone else would have to carry out encryption for you.
</source>
We all know that Javascript is not commonly associated with security.
But Javascript is required to ensure proper client-side encryption of your messages.
Without scripting it is not possible to keep your message secret, because someone else would have to carry out encryption for
you.
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">50</context>
<context context-type="linenumber">56</context>
</context-group>
</trans-unit>
<trans-unit id="8ec1d2702c0c9a6dda25deed7a0735ee77f13295" datatype="html">
<source>Why Javascript?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">62</context>
</context-group>
</trans-unit>
<trans-unit id="noscript-js" datatype="html">
<source>
Your note should be secret to you and the recipient, right?
Your note is secret as long as only you and your recipient have its <x id="START_EMPHASISED_TEXT" ctype="x-em" equiv-text="&lt;em&gt;"/>encryption key<x id="CLOSE_EMPHASISED_TEXT" ctype="x-em" equiv-text="&lt;/em&gt;"/>.
And here we need Javascript: Browser-side scripting is the only way to keep the encryption key in your browser -
without scripting, the server would have to carry out encryption (and therefore need the encryption key).
But if the server would get the encryption key, he could (in theory) decrypt and read your secret note, and you wouldn&apos;t even notice.
But <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>with javascript, your note is safe<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> even from rogue servers, because your encryption key is never sent.
</source>
Your note should be secret to you and the recipient, right?
Your note is secret as long as only you and your recipient have its <x id="START_EMPHASISED_TEXT" ctype="x-em" equiv-text="&lt;em&gt;"/>encryption key<x id="CLOSE_EMPHASISED_TEXT" ctype="x-em" equiv-text="&lt;/em&gt;"/>.
And here we need Javascript: Browser-side scripting is the only way to keep the encryption key in your browser -
without scripting, the server would have to carry out encryption (and therefore need the encryption key).
But if the server would get the encryption key, he could (in theory) decrypt and read your secret note, and you wouldn&apos;t even
notice.
But <x id="START_TAG_STRONG" ctype="x-strong" equiv-text="&lt;strong&gt;"/>with javascript, your note is safe<x id="CLOSE_TAG_STRONG" ctype="x-strong" equiv-text="&lt;/strong&gt;"/> even from rogue servers, because your encryption key is never sent.
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">63</context>
</context-group>
</trans-unit>
<trans-unit id="7d15144d9f7bf550ee7a73ff7d750c3683d5411e" datatype="html">
<source>Read more in the F.A.Q</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/app.component.html</context>
<context context-type="linenumber">64</context>
<context context-type="linenumber">72</context>
</context-group>
</trans-unit>
<trans-unit id="f44297b1ba9a9b96dca3389692847a880bc266d7" datatype="html">
Expand Down Expand Up @@ -711,25 +713,25 @@
<context context-type="linenumber">3</context>
</context-group>
</trans-unit>
<trans-unit id="5d527dec8178544cac539fef57220a3b6cabb7ae" datatype="html">
<source>Build time</source>
<trans-unit id="1bec8edeef24331bc81449e7624fe20d72cb31ad" datatype="html">
<source>Commit time</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">13</context>
<context context-type="linenumber">16</context>
</context-group>
</trans-unit>
<trans-unit id="b8d10cd55fae4e4ad4f87d28e18251694f159bf7" datatype="html">
<source>Privacy Policy</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">20</context>
<context context-type="linenumber">22</context>
</context-group>
</trans-unit>
<trans-unit id="153f8ab0bb5d7be411521f9a0a947c2082b1aa6f" datatype="html">
<source>Scope: </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">21</context>
<context context-type="linenumber">23</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-responsibility" datatype="html">
Expand All @@ -741,7 +743,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">22</context>
<context context-type="linenumber">24</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-security" datatype="html">
Expand All @@ -751,7 +753,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">28</context>
<context context-type="linenumber">30</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-data" datatype="html">
Expand All @@ -762,7 +764,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">32</context>
<context context-type="linenumber">34</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-rights" datatype="html">
Expand All @@ -774,7 +776,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">37</context>
<context context-type="linenumber">39</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-usermessages" datatype="html">
Expand All @@ -786,7 +788,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">45</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-serverdata" datatype="html">
Expand All @@ -799,14 +801,14 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">49</context>
<context context-type="linenumber">51</context>
</context-group>
</trans-unit>
<trans-unit id="gdpr-changes" datatype="html">
<source>We reserve the right to change or update this privacy policy at any point in time.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/page-about/page-about.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">58</context>
</context-group>
</trans-unit>
<trans-unit id="e941d6a03d83e2a059842217226b6d314e05f303" datatype="html">
Expand Down

0 comments on commit 65df132

Please sign in to comment.