mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-22 16:26:28 +00:00
add version in about page
This commit is contained in:
parent
c8a25eb9bf
commit
c8b2539414
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -515,7 +515,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cryptgeon"
|
name = "cryptgeon"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cryptgeon"
|
name = "cryptgeon"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
authors = ["cupcakearmy <hi@nicco.io>"]
|
authors = ["cupcakearmy <hi@nicco.io>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { call } from '$lib/api'
|
import { call } from '$lib/api'
|
||||||
import { onMount } from 'svelte'
|
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
|
|
||||||
export type Status = {
|
export type Status = {
|
||||||
|
version: string
|
||||||
max_size: number
|
max_size: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
19
client/src/lib/ui/AboutParagraph.svelte
Normal file
19
client/src/lib/ui/AboutParagraph.svelte
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export let title: string
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>▶ {title}</b>
|
||||||
|
<slot />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
b {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p > :global(span) {
|
||||||
|
padding-left: 1.25em;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,5 +1,8 @@
|
|||||||
<script context="module">
|
<script context="module">
|
||||||
import { browser, dev } from '$app/env'
|
import { browser, dev } from '$app/env'
|
||||||
|
import { status } from '$lib/stores/status'
|
||||||
|
import AboutParagraph from '$lib/ui/AboutParagraph.svelte'
|
||||||
|
|
||||||
export const hydrate = dev
|
export const hydrate = dev
|
||||||
export const router = browser
|
export const router = browser
|
||||||
export const prerender = true
|
export const prerender = true
|
||||||
@ -13,45 +16,52 @@
|
|||||||
<h1>About</h1>
|
<h1>About</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<i>cryptgeon</i> is a secure, open source sharing note service inspired by
|
<i>cryptgeon</i> is a secure, open source sharing note / file service inspired by
|
||||||
<a href="https://privnote.com"><i>PrivNote</i></a>.
|
<a href="https://privnote.com"><i>PrivNote</i></a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<AboutParagraph title="how does it work?">
|
||||||
<b>▶ how does it work?</b>
|
<span>
|
||||||
<br />
|
each note has a 512bit generated <i>id</i> that is used to retrieve the note. the note is then
|
||||||
each note has a 512bit generated <i>id</i> that is used to retrieve the note. the note is then encrypted
|
encrypted with aes in gcm mode on the client side and then sent to the server. data is stored in
|
||||||
with aes in gcm mode on the client side and then sent to the server. data is stored in memory and
|
memory and never persisted to disk. the server never sees the encryption key and cannot decrypt
|
||||||
never persisted to disk. the server never sees the encryption key and cannot decrypt the contents
|
the contents of the notes even if it tried to.
|
||||||
of the notes even if it tried to.
|
</span>
|
||||||
</p>
|
</AboutParagraph>
|
||||||
|
|
||||||
<b>▶ features</b>
|
<AboutParagraph title="features">
|
||||||
<ul>
|
<ul>
|
||||||
<li>server cannot decrypt contents due to client side encryption</li>
|
<li>server cannot decrypt contents due to client side encryption</li>
|
||||||
<li>view and time constraints</li>
|
<li>view and time constraints</li>
|
||||||
<li>in memory, no persistence</li>
|
<li>in memory, no persistence</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</AboutParagraph>
|
||||||
|
|
||||||
<p>
|
<AboutParagraph title="tech stack">
|
||||||
<b>▶ tech stack</b>
|
<span>
|
||||||
<br />
|
|
||||||
the backend is written in rust and the frontend is svelte and typescript.
|
the backend is written in rust and the frontend is svelte and typescript.
|
||||||
<br />
|
<br />
|
||||||
you are welcomed to check & audit the
|
you are welcomed to check & audit the
|
||||||
<a href="https://github.com/cupcakearmy/cryptgeon" target="_blank" rel="noopener">source code</a
|
<a href="https://github.com/cupcakearmy/cryptgeon" target="_blank" rel="noopener">
|
||||||
>.
|
source code
|
||||||
</p>
|
</a>.
|
||||||
|
</span>
|
||||||
|
</AboutParagraph>
|
||||||
|
|
||||||
<p>
|
<AboutParagraph title="attribution">
|
||||||
<br />
|
<span>
|
||||||
<b>▶ attributions</b>
|
|
||||||
<br />
|
|
||||||
<small>
|
|
||||||
icons made by <a href="https://www.freepik.com" title="Freepik">freepik</a> from
|
icons made by <a href="https://www.freepik.com" title="Freepik">freepik</a> from
|
||||||
<a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
|
<a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
|
||||||
</small>
|
</span>
|
||||||
</p>
|
</AboutParagraph>
|
||||||
|
|
||||||
|
<AboutParagraph title="version">
|
||||||
|
<span>
|
||||||
|
{#if $status}
|
||||||
|
<code>v{$status.version}</code>
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
|
</AboutParagraph>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -107,13 +107,19 @@ async fn delete(path: web::Path<NotePath>) -> impl Responder {
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
struct Status {
|
struct Status {
|
||||||
|
version: String,
|
||||||
max_size: usize,
|
max_size: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/status")]
|
#[get("/status")]
|
||||||
async fn status() -> impl Responder {
|
async fn status() -> impl Responder {
|
||||||
println!("Limit: {}", *LIMIT);
|
println!("Limit: {}", *LIMIT);
|
||||||
return HttpResponse::Ok().json(Status { max_size: *LIMIT });
|
return HttpResponse::Ok().json(Status {
|
||||||
|
version: option_env!("CARGO_PKG_VERSION")
|
||||||
|
.unwrap_or("Unknown")
|
||||||
|
.to_string(),
|
||||||
|
max_size: *LIMIT,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init(cfg: &mut web::ServiceConfig) {
|
pub fn init(cfg: &mut web::ServiceConfig) {
|
||||||
|
Loading…
Reference in New Issue
Block a user