-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #787 from netsirius/build-and-publish-email-web
Build and publish email web
- Loading branch information
Showing
22 changed files
with
904 additions
and
1,084 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
apps/freenet-email-app/delegates/alias-allocation/Cargo.toml
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
apps/freenet-email-app/delegates/alias-allocation/src/lib.rs
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
apps/freenet-email-app/delegates/identity-management/Cargo.toml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
apps/freenet-email-app/delegates/identity-management/src/lib.rs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[application] | ||
|
||
# dioxus project name | ||
name = "freenet-email-app" | ||
|
||
# default platfrom | ||
# you can also use `dx serve/build --platform XXX` to use other platform | ||
# value: web | desktop | ||
default_platform = "web" | ||
|
||
# Web `build` & `serve` dist path | ||
out_dir = "dist" | ||
|
||
# resource (static) file folder | ||
asset_dir = "public" | ||
|
||
[web.app] | ||
|
||
# HTML title tag content | ||
title = "" | ||
|
||
[web.watcher] | ||
|
||
index_on_404 = true | ||
|
||
watch_path = ["src"] | ||
|
||
# include `assets` in web platform | ||
[web.resource] | ||
|
||
# CSS style file | ||
style = [] | ||
|
||
# Javascript code file | ||
script = [] | ||
|
||
[web.resource.dev] | ||
|
||
# Javascript code file | ||
# serve: [dev-server] only | ||
script = [] | ||
|
||
[application.plugins] | ||
|
||
available = true | ||
|
||
required = [] | ||
|
||
[bundler] | ||
# Bundle identifier | ||
identifier = "" | ||
|
||
# Bundle publisher | ||
publisher = "" | ||
|
||
# Bundle icon | ||
icon = ["icons/icon.png"] | ||
|
||
# Bundle resources | ||
resources = ["public/*"] | ||
|
||
# Bundle copyright | ||
copyright = "" | ||
|
||
# Bundle category | ||
category = "Utility" | ||
|
||
# Bundle short description | ||
short_description = "An amazing dioxus application." | ||
|
||
# Bundle long description | ||
long_description = """ | ||
An amazing dioxus application. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[package] | ||
name = "freenet-email-app-web" | ||
version = "0.0.0" | ||
edition = "2021" | ||
rust-version = "1.71.1" | ||
resolver = "2" | ||
publish = false | ||
|
||
[dependencies] | ||
locutus-stdlib = { workspace = true } | ||
|
||
[lib] | ||
crate-type = ["cdylib"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use locutus_stdlib::prelude::*; | ||
|
||
struct Contract; | ||
|
||
// TODO: verify that the state is signed by a pub/key pair | ||
// ~/.locutus/secrets/keys/keypair1.json | ||
|
||
#[contract] | ||
impl ContractInterface for Contract { | ||
fn validate_state( | ||
_parameters: Parameters<'static>, | ||
_state: State<'static>, | ||
_related: RelatedContracts, | ||
) -> Result<ValidateResult, ContractError> { | ||
Ok(ValidateResult::Valid) | ||
} | ||
|
||
fn validate_delta( | ||
_parameters: Parameters<'static>, | ||
_delta: StateDelta<'static>, | ||
) -> Result<bool, ContractError> { | ||
Ok(true) | ||
} | ||
|
||
fn update_state( | ||
_parameters: Parameters<'static>, | ||
state: State<'static>, | ||
_updates: Vec<UpdateData>, | ||
) -> Result<UpdateModification<'static>, ContractError> { | ||
Ok(UpdateModification::valid(state)) | ||
} | ||
|
||
fn summarize_state( | ||
_parameters: Parameters<'static>, | ||
_state: State<'static>, | ||
) -> Result<StateSummary<'static>, ContractError> { | ||
Ok(StateSummary::from(vec![])) | ||
} | ||
|
||
fn get_state_delta( | ||
_parameters: Parameters<'static>, | ||
_state: State<'static>, | ||
_summary: StateSummary<'static>, | ||
) -> Result<StateDelta<'static>, ContractError> { | ||
Ok(StateDelta::from(vec![])) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[contract] | ||
type = "webapp" | ||
lang = "rust" | ||
|
||
[webapp] | ||
|
||
[webapp.state-sources] | ||
source_dirs = ["dist"] |
Oops, something went wrong.