├── .github └── workflows │ ├── check.yml │ ├── deploy.yml │ └── tests.yml ├── .gitignore ├── .idea ├── .gitignore ├── Daydream.iml ├── inspectionProfiles │ └── Project_Default.xml ├── jsLibraryMappings.xml ├── jsonSchemas.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── Makefile.toml ├── README.md ├── cypress.json ├── cypress ├── fixtures │ └── login.json ├── integration │ ├── login_spec.js │ ├── matrix-fake-api.js │ ├── roomlist_spec.js │ └── utils.js ├── plugins │ └── index.js └── support │ ├── commands.js │ └── index.js ├── i18n.toml ├── i18n ├── mo │ └── de │ │ └── daydream.mo ├── po │ └── de │ │ └── daydream.po └── pot │ ├── daydream.pot │ └── src │ ├── app │ ├── components │ │ ├── event_list.pot │ │ ├── events │ │ │ ├── image.pot │ │ │ ├── mod.pot │ │ │ ├── notice.pot │ │ │ ├── text.pot │ │ │ └── video.pot │ │ ├── input.pot │ │ ├── mod.pot │ │ ├── raw_html.pot │ │ ├── room_list.pot │ │ └── room_list │ │ │ ├── item.pot │ │ │ └── mod.pot │ ├── matrix │ │ ├── login.pot │ │ ├── mod.pot │ │ ├── sync.pot │ │ └── types.pot │ ├── mod.pot │ └── views │ │ ├── login.pot │ │ ├── main_view.pot │ │ └── mod.pot │ ├── bin │ ├── app.pot │ └── native_worker.pot │ ├── constants.pot │ ├── errors.pot │ ├── lib.pot │ └── utils │ ├── mod.pot │ ├── notifications.pot │ ├── ruma.pot │ └── string_utils.pot ├── media └── DaydreamLogo.ai ├── netlify.toml ├── package-lock.json ├── package.json ├── src ├── app │ ├── components │ │ ├── event_list.rs │ │ ├── events │ │ │ ├── image.rs │ │ │ ├── mod.rs │ │ │ ├── notice.rs │ │ │ ├── text.rs │ │ │ └── video.rs │ │ ├── input.rs │ │ ├── mod.rs │ │ ├── raw_html.rs │ │ └── room_list │ │ │ ├── item.rs │ │ │ └── mod.rs │ ├── matrix │ │ ├── login.rs │ │ ├── mod.rs │ │ ├── sync.rs │ │ └── types.rs │ ├── mod.rs │ ├── svgs │ │ ├── DaydreamLogo_v0.svg │ │ ├── DaydreamLogo_v0_light.svg │ │ └── loading_animation.svg │ └── views │ │ ├── login.rs │ │ ├── main_view.rs │ │ └── mod.rs ├── bin │ ├── app.rs │ └── native_worker.rs ├── constants.rs ├── errors.rs ├── lib.rs └── utils │ ├── mod.rs │ ├── notifications.rs │ ├── ruma.rs │ └── string_utils.rs ├── static ├── custom-css.scss ├── dark_theme │ ├── _globals.scss │ └── _variables.scss ├── images │ ├── login_bg.jpg │ └── login_bg.webp ├── index.html ├── index_rust_only.html ├── light_theme │ ├── _globals.scss │ └── _variables.scss ├── lightbox.scss ├── normalize.css ├── style.scss ├── sun-loading-animation.scss ├── theme_slider.scss └── variable-ovewrites.scss └── webdriver.json /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: Cargo Check 2 | on: [pull_request] 3 | jobs: 4 | check: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - name: Setup Rust 9 | uses: actions-rs/toolchain@v1 10 | with: 11 | toolchain: nightly 12 | - name: Run fmt 13 | run: cargo fmt -- --check 14 | - name: Run clippy 15 | run: cargo clippy -- --deny=warnings 16 | - name: Run check 17 | run: cargo check 18 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to Github pages 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | 7 | jobs: 8 | deploy: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | 13 | - name: Setup Rust 14 | uses: actions-rs/toolchain@v1 15 | with: 16 | toolchain: nightly 17 | target: wasm32-unknown-unknown 18 | 19 | - run: rustup default nightly 20 | 21 | - name: Setup Node 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: 14 25 | 26 | - name: Install 27 | run: yarn 28 | 29 | - name: Get emscripten SDK 30 | run: wget https://github.com/emscripten-core/emsdk/archive/master.zip && unzip master.zip && ./emsdk-master/emsdk install latest && ./emsdk-master/emsdk activate latest 31 | 32 | - name: Install gettext 33 | run: sudo apt-get update && sudo apt-get install -y gettext 34 | 35 | - name: Build 36 | run: source emsdk-master/emsdk_env.sh && cargo install cargo-make && cargo make dist 37 | 38 | - name: Deploy 39 | uses: peaceiris/actions-gh-pages@v3 40 | with: 41 | github_token: ${{ secrets.GITHUB_TOKEN }} 42 | publish_dir: ./dist 43 | cname: app.daydream.im 44 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | #name: E2E Tests 2 | #on: [push] 3 | #jobs: 4 | # chrome: 5 | # runs-on: ubuntu-latest 6 | # strategy: 7 | # matrix: 8 | # # run 3 copies of the current job in parallel 9 | # containers: [1, 2, 3] 10 | # steps: 11 | # - uses: actions/checkout@v1 12 | # - run: rustup default nightly 13 | # - uses: cypress-io/github-action@v1 14 | # with: 15 | # browser: chrome 16 | # command: npm run test 17 | # env: 18 | # WAIT_ON_TIMEOUT: 600000 19 | # - run: | 20 | # mkdir -p cypress/screenshots 21 | # mkdir -p cypress/videos 22 | # # after the test run completes 23 | # # store videos and any screenshots 24 | # # NOTE: screenshots will be generated only if E2E test failed 25 | # # thus we store screenshots only on failures 26 | # # Alternative: create and commit an empty cypress/screenshots folder 27 | # # to always have something to upload 28 | # - uses: actions/upload-artifact@v2 29 | # if: failure() 30 | # with: 31 | # name: cypress-screenshots 32 | # path: cypress/screenshots 33 | # # Test run video was always captured, so this action uses "always()" condition 34 | # - uses: actions/upload-artifact@v2 35 | # if: always() 36 | # with: 37 | # name: cypress-videos 38 | # path: cypress/videos 39 | # #firefox: 40 | # # runs-on: ubuntu-latest 41 | # # container: 42 | # # image: cypress/browsers:node12.16.1-chrome80-ff73 43 | # # options: --user 1001 44 | # # steps: 45 | # # - uses: actions/checkout@v1 46 | # # - uses: cypress-io/github-action@v1 47 | # # with: 48 | # # browser: firefox 49 | # # command: npm run test:firefox 50 | # # # after the test run completes 51 | # # # store videos and any screenshots 52 | # # # NOTE: screenshots will be generated only if E2E test failed 53 | # # # thus we store screenshots only on failures 54 | # # # Alternative: create and commit an empty cypress/screenshots folder 55 | # # # to always have something to upload 56 | # # - uses: actions/upload-artifact@v1 57 | # # if: failure() 58 | # # with: 59 | # # name: cypress-screenshots 60 | # # path: cypress/screenshots 61 | # # # Test run video was always captured, so this action uses "always()" condition 62 | # # - uses: actions/upload-artifact@v1 63 | # # if: always() 64 | # # with: 65 | # # name: cypress-videos 66 | # # path: cypress/videos 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | pkg/ 4 | dist/ 5 | wasm-pack.log 6 | node_modules 7 | cypress/videos 8 | cypress/screenshots -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /.idea/Daydream.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/jsonSchemas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "daydream" 3 | version = "0.1.0" 4 | authors = ["MTRNord "] 5 | edition = "2018" 6 | license = "AGPL-v3.0" 7 | repository = "https://github.com/MTRNord/Daydream" 8 | description = "A Matrix Web client written in Rust" 9 | 10 | [[bin]] 11 | name = "daydream_app" 12 | path = "src/bin/app.rs" 13 | 14 | [[bin]] 15 | name = "daydream_worker" 16 | path = "src/bin/native_worker.rs" 17 | 18 | [dependencies] 19 | console_error_panic_hook = { version = "0.1" } 20 | log = "0.4" 21 | tracing = {version = "0.1", features = ["log-always"] } 22 | serde = { version = "1.0", features = ["rc", "derive"] } 23 | serde_json = "1.0" 24 | wasm-bindgen = "0.2" 25 | wasm-bindgen-futures = "0.4" 26 | wasm-logger = "0.2" 27 | #wee_alloc = "0.4" 28 | lazy_static = "1.4.0" 29 | gh-emoji = "1.0.3" 30 | 31 | # Yew 32 | yew = { git = "https://github.com/daydream-mx/yew.git", branch = "MTRNord/daydream-no-bincode" } 33 | yew-router = { git = "https://github.com/daydream-mx/yew.git", branch = "MTRNord/daydream-no-bincode" } 34 | yewtil = { git = "https://github.com/daydream-mx/yew.git", branch = "MTRNord/daydream-no-bincode" } 35 | 36 | # Matrix 37 | #, branch = "daydream" 38 | matrix-sdk = { version = "0.1.0", git = "https://github.com/DevinR528/matrix-rust-sdk", default-features = false, features = ["messages"], branch = "power-ev-overflow"}# rev = "89c9e311408d2c57245f4ec5af7bbd4daa0046d3" # features = ["encryption"]} 39 | url = "2.1.1" 40 | thiserror = "1.0" 41 | futures-locks = { git = "https://github.com/asomers/futures-locks", default-features = false } 42 | 43 | # Markdown 44 | pulldown-cmark = "0.7.2" 45 | 46 | # Translations 47 | tr = { version = "0.1.3", default-features = false, features = ["gettext"]} 48 | i18n-embed = { version = "0.6", features = ["web-sys-requester"] } 49 | rust-embed = { version = "5", features = ["debug-embed", "compression"]} 50 | 51 | # Make links links again! 52 | linkify = "0.4.0" 53 | 54 | # Used for lightboxes 55 | rand = "0.7" 56 | 57 | [dependencies.web-sys] 58 | version = "0.3" 59 | features = [ 60 | 'KeyboardEvent', 61 | 'HtmlElement', 62 | 'DomStringMap', 63 | 'Notification', 64 | 'NotificationPermission', 65 | 'NotificationOptions', 66 | 'Window' 67 | ] 68 | 69 | [patch.'https://github.com/seanmonstar/reqwest'] 70 | reqwest = { git = "https://github.com/seanmonstar//reqwest", rev = "d42385e7f2cc364efa5e16a7154e7e0cebdd1b57"} 71 | 72 | [profile.release] 73 | # less code to include into binary 74 | panic = 'abort' 75 | # optimization over all codebase ( better optimization, slower build ) 76 | codegen-units = 1 77 | # optimization for size ( more aggresive ) 78 | opt-level = 'z' 79 | # optimization for size 80 | # opt-level = 's' 81 | # link time optimization using using whole-program analysis 82 | lto = true 83 | -------------------------------------------------------------------------------- /Makefile.toml: -------------------------------------------------------------------------------- 1 | [config] 2 | skip_core_tasks = true 3 | 4 | [tasks.format] 5 | install_crate = { crate_name = "rustfmt", rustup_component_name = "rustfmt", binary = "rustfmt", test_arg = "--help" } 6 | command = "cargo" 7 | args = ["fmt"] 8 | 9 | [tasks.ruma-docs] 10 | command = "cargo" 11 | args = ["doc", "-p", "ruma", "--open"] 12 | 13 | [tasks.wasm-clean] 14 | script_runner = "@rust" 15 | script = [ 16 | ''' 17 | fn main() -> std::io::Result<()> { 18 | if std::path::Path::new("./dist").exists() { 19 | std::fs::remove_dir_all("./dist")?; 20 | } 21 | Ok(()) 22 | } 23 | ''' 24 | ] 25 | 26 | [tasks.dist-folder] 27 | script_runner = "@rust" 28 | script = [ 29 | ''' 30 | fn main() -> std::io::Result<()> { 31 | std::fs::create_dir_all("./dist")?; 32 | Ok(()) 33 | } 34 | ''' 35 | ] 36 | 37 | [tasks.dist] 38 | # TODO add scss task when it works 39 | dependencies = ["format", "wasm-clean", "update-translations", "dist-folder", "scss", "pure-build-app", "wasm-build", "pure-build-worker", "wasm-build-worker", "copy-files"] 40 | 41 | [tasks.dist-debug] 42 | # TODO add scss task when it works 43 | dependencies = ["format", "wasm-clean", "update-translations", "dist-folder", "scss", "pure-build-app-debug", "wasm-build-debug", "pure-build-worker-debug", "wasm-build-worker-debug", "copy-files"] 44 | 45 | [tasks.run] 46 | watch = {watch = ["./src", "./static", "./startup_helper"], poll = true} 47 | dependencies = ["dist-debug", "start-server"] 48 | 49 | [tasks.start-server] 50 | script_runner = "@shell" 51 | script = [ 52 | ''' 53 | cd dist 54 | python3 -m http.server 55 | ''' 56 | ] 57 | 58 | [tasks.pure-build-app] 59 | command = "cargo" 60 | args = ["build", "--release", "--target", "wasm32-unknown-unknown", "--bin", "daydream_app"] 61 | 62 | [tasks.pure-build-app-debug] 63 | command = "cargo" 64 | args = ["build", "--target", "wasm32-unknown-unknown", "--bin", "daydream_app"] 65 | 66 | [tasks.pure-build-worker] 67 | command = "cargo" 68 | args = ["build", "--release", "--target", "wasm32-unknown-unknown", "--bin", "daydream_worker"] 69 | 70 | [tasks.pure-build-worker-debug] 71 | command = "cargo" 72 | args = ["build", "--target", "wasm32-unknown-unknown", "--bin", "daydream_worker"] 73 | 74 | [tasks.wasm-build] 75 | install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg = "--help" } 76 | command = "wasm-bindgen" 77 | args = ["--no-typescript", "--out-dir", "./dist/", "--target", "web", "--out-name", "daydream", "./target/wasm32-unknown-unknown/release/daydream_app.wasm"] 78 | 79 | [tasks.wasm-build-worker] 80 | install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg = "--help" } 81 | command = "wasm-bindgen" 82 | args = ["--no-typescript", "--out-dir", "./dist/", "--target", "no-modules", "--out-name", "worker", "./target/wasm32-unknown-unknown/release/daydream_worker.wasm"] 83 | 84 | [tasks.wasm-build-debug] 85 | install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg = "--help" } 86 | command = "wasm-bindgen" 87 | args = ["--no-typescript", "--debug", "--out-dir", "./dist/", "--target", "web", "--out-name", "daydream", "./target/wasm32-unknown-unknown/debug/daydream_app.wasm"] 88 | 89 | [tasks.wasm-build-worker-debug] 90 | install_crate = { crate_name = "wasm-bindgen-cli", binary = "wasm-bindgen", test_arg = "--help" } 91 | command = "wasm-bindgen" 92 | args = ["--no-typescript", "--debug", "--out-dir", "./dist/", "--target", "no-modules", "--out-name", "worker", "./target/wasm32-unknown-unknown/debug/daydream_worker.wasm"] 93 | 94 | 95 | [tasks.copy-files] 96 | # TODO use rust 97 | script_runner = "@shell" 98 | script = [ 99 | ''' 100 | mkdir -p dist/images 101 | cp static/index_rust_only.html dist/index.html 102 | cp static/images/* dist/images/ 103 | cp static/normalize.css dist/normalize.css 104 | ''' 105 | ] 106 | 107 | [tasks.update-translations] 108 | condition = { platforms = ["mac", "linux"] } 109 | ignore_errors = true 110 | command = "cargo" 111 | args = ["i18n"] 112 | dependencies = ["install-xtr"] 113 | 114 | [tasks.install-xtr] 115 | condition = { platforms = ["mac", "linux"] } 116 | install_crate = { crate_name = "xtr", binary = "xtr", test_arg = "--help" } 117 | 118 | [tasks.scss] 119 | install_crate = { crate_name = "grass", binary = "grass", test_arg = "--help" } 120 | install_crate_args = ["--git", "https://github.com/connorskees/grass", "grass"] 121 | command = "grass" 122 | args = ["static/style.scss", "dist/style.css"] 123 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [![Netlify Status](https://api.netlify.com/api/v1/badges/48791884-918f-464f-8126-6a95c093717c/deploy-status)](https://app.netlify.com/sites/daydream-rs/deploys) 3 | [![Contributors][contributors-shield]][contributors-url] 4 | [![Forks][forks-shield]][forks-url] 5 | [![Stargazers][stars-shield]][stars-url] 6 | [![Issues][issues-shield]][issues-url] 7 | [![GPL-3.0 License][license-shield]][license-url] 8 | [![#daydream](https://img.shields.io/badge/matrix-%23daydream-blue?style=flat-square)](https://matrix.to/#/#daydream:nordgedanken.dev) 9 | 10 | 11 | 12 | 13 |
14 |

15 | 16 | Logo 17 | 18 | 19 |

Daydream Matrix Client

20 | 21 |

22 | A small first try of writing a Matrix Client in wasm and rust using the Matrix Rust SDK 23 | 25 |
26 |
27 | 29 | Report Bug 30 | · 31 | Request Feature 32 |

33 |

34 | 35 | 36 | 37 | 38 | ## Table of Contents 39 | 40 | * [About the Project](#about-the-project) 41 | * [Built With](#built-with) 42 | * [Getting Started](#getting-started) 43 | * [Prerequisites](#prerequisites) 44 | * [Setting up a Development Environment](#setting-up-a-development-environment) 45 | 46 | * [Roadmap](#roadmap) 47 | * [Contributing](#contributing) 48 | * [License](#license) 49 | * [Contact](#contact) 50 | * [Acknowledgements](#acknowledgements) 51 | 52 | 53 | 54 | 55 | ## About The Project 56 | 57 | 58 | 59 | 60 | ### Built With 61 | 62 | * [Rust](https://www.rust-lang.org/) 63 | * [Matrix](https://matrix.org) 64 | * [Yew](https://github.com/yewstack/yew) 65 | * [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk/) 66 | * [Netlify](https://netlify.com) 67 | * [Nodejs](https://nodejs.org/en/) 68 | * [Yarn](https://yarnpkg.com/) 69 | 70 | 71 | 72 | 73 | ## Getting Started 74 | 75 | To get a local copy up and running follow these simple steps. 76 | 77 | ### Prerequisites 78 | 79 | This is an example of how to list things you need to use the software and how to install them. 80 | * Rust 81 | * Nodejs 82 | * Yarn 83 | * gettext (See: https://github.com/kellpossible/cargo-i18n#system-requirements) 84 | * When you want to recompile translations: 85 | * https://github.com/kellpossible/cargo-i18n 86 | * `cargo install xtr` 87 | 88 | ### Setting up a Development Environment 89 | 90 | 1. Clone the repo 91 | ```sh 92 | git clone https://github.com/MTRNord/Daydream.git 93 | ``` 94 | 2. Install node dependencies 95 | ```sh 96 | yarn install 97 | ``` 98 | 99 | #### 🛠️ Build 100 | 101 | ```sh 102 | yarn run build 103 | ``` 104 | 105 | #### 🔬 Serve locally 106 | 107 | ```sh 108 | yarn run start:dev 109 | ``` 110 | 111 | 119 | 120 | 121 | ## Roadmap 122 | 123 | See the [open issues](https://github.com/MTRNord/Daydream/issues) for a list of proposed features (and known issues). 124 | 125 | 126 | 127 | 128 | ## Contributing 129 | 130 | Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. 131 | 132 | 1. Fork the Project 133 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 134 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 135 | 4. Push to the Branch (`git push origin feature/AmazingFeature`) 136 | 5. Open a Pull Request 137 | 138 | 139 | 140 | 141 | ## License 142 | 143 | Distributed under the AGPL-v3.0 License. See `LICENSE` for more information. 144 | 145 | 146 | 147 | 148 | ## Contact 149 | 150 | Matrix Room - [#daydream:nordgedanken.dev](https://matrix.to/#/#daydream:nordgedanken.dev) 151 | 152 | MTRNord - [@mtrnord](https://github.com/mtrnord) - https://matrix.to/#/@mtrnord:nordgedanken.dev 153 | 154 | Project Link: [https://github.com/MTRNord/Daydream](https://github.com/MTRNord/Daydream) 155 | 156 | 157 | 158 | 159 | ## Acknowledgements 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | [contributors-shield]: https://img.shields.io/github/contributors/MTRNord/Daydream.svg?style=flat-square 168 | [contributors-url]: https://github.com/MTRNord/Daydream/graphs/contributors 169 | [forks-shield]: https://img.shields.io/github/forks/MTRNord/Daydream.svg?style=flat-square 170 | [forks-url]: https://github.com/MTRNord/Daydream/network/members 171 | [stars-shield]: https://img.shields.io/github/stars/MTRNord/Daydream.svg?style=flat-square 172 | [stars-url]: https://github.com/MTRNord/Daydream/stargazers 173 | [issues-shield]: https://img.shields.io/github/issues/MTRNord/Daydream.svg?style=flat-square 174 | [issues-url]: https://github.com/MTRNord/Daydream/issues 175 | [license-shield]: https://img.shields.io/github/license/MTRNord/Daydream.svg?style=flat-square 176 | [license-url]: https://github.com/MTRNord/Daydream/blob/master/LICENSE 177 | [product-screenshot]: images/screenshot.png 178 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:8000", 3 | "projectId": "7z38mu", 4 | "testFiles": "**/*_spec.js" 5 | } 6 | -------------------------------------------------------------------------------- /cypress/fixtures/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "user_id": "@carl:example.com", 3 | "access_token": "123456", 4 | "device_id": "KCZFUCGSLZ" 5 | } 6 | -------------------------------------------------------------------------------- /cypress/integration/login_spec.js: -------------------------------------------------------------------------------- 1 | import {fake_matrix_api_handler} from './matrix-fake-api'; 2 | import {login} from "./utils"; 3 | describe('LoginPage', () => { 4 | 5 | beforeEach(function () { 6 | // We use cy.visit({onBeforeLoad: ...}) to stub 7 | // window.fetch before any app code runs 8 | cy.visit('/', { 9 | onBeforeLoad(win) { 10 | let fetch = win.fetch; 11 | cy.stub(win, 'fetch') 12 | .callsFake(args => fake_matrix_api_handler(args, fetch, win)); 13 | }, 14 | }) 15 | }) 16 | 17 | it('Does login', () => { 18 | login() 19 | // First show spinner 20 | cy.get('svg#loading').should('be.visible'); 21 | // Now it should be gone and instead we see the roomlist 22 | cy.get('svg#loading').should('not.be.visible'); 23 | cy.get('ul.scrollable').should('be.visible'); 24 | }) 25 | }) 26 | -------------------------------------------------------------------------------- /cypress/integration/matrix-fake-api.js: -------------------------------------------------------------------------------- 1 | const fake_matrix_api_handler = (arg, fetch, win) => { 2 | if (typeof arg === "string") { 3 | console.log("REQUESTED: " + arg); 4 | if (arg.includes('daydream_bg.wasm') || arg.includes('worker_bg.wasm')) { 5 | console.log("doing fetch"); 6 | return fetch(arg); 7 | } 8 | } else if (typeof arg === "object") { 9 | console.log("REQUESTED: ", arg); 10 | console.log("Special mode"); 11 | if (arg["url"] === "http://localhost:8448/_matrix/client/r0/login") { 12 | console.log("handling login"); 13 | return new Promise((resolve, reject) => { 14 | const resp_data = { 15 | "user_id": "@carl:example.com", 16 | "access_token": "123456", 17 | "device_id": "KCZFUCGSLZ" 18 | }; 19 | const resp = new Blob([JSON.stringify(resp_data, null, 2)], {type: 'application/json'}); 20 | 21 | const init = { 22 | "status": 200, 23 | "statusText": "Ok", 24 | headers: {'Content-type': 'application/json'} 25 | }; 26 | const response = new win.Response(resp, init); 27 | Object.defineProperty(response, "url", {value: arg["url"]}); 28 | resolve(response) 29 | } 30 | ) 31 | } else { 32 | // TODO handle different test states 33 | console.log("handling sync"); 34 | return new Promise((resolve, reject) => { 35 | const resp_data = { 36 | "next_batch": "s72595_4483_1934", 37 | "rooms": { 38 | "join": { 39 | "!726s6s6q:example.com": { 40 | "unread_notifications": { 41 | "highlight_count": 0, 42 | "notification_count": 0, 43 | }, 44 | "summary": { 45 | "m.heroes": [ 46 | "@alice:example.com", 47 | "@bob:example.com" 48 | ], 49 | "m.joined_member_count": 2, 50 | "m.invited_member_count": 0 51 | }, 52 | "state": { 53 | "events": [ 54 | { 55 | "content": { 56 | "membership": "join", 57 | "avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF", 58 | "displayname": "Alice Margatroid" 59 | }, 60 | "type": "m.room.member", 61 | "event_id": "$143273582443PhrSn:example.org", 62 | "room_id": "!726s6s6q:example.com", 63 | "sender": "@example:example.org", 64 | "origin_server_ts": 1432735824653, 65 | "unsigned": { 66 | "age": 1234 67 | }, 68 | "state_key": "@alice:example.org" 69 | } 70 | ] 71 | }, 72 | "timeline": { 73 | "events": [ 74 | { 75 | "content": { 76 | "membership": "join", 77 | "avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF", 78 | "displayname": "Alice Margatroid" 79 | }, 80 | "type": "m.room.member", 81 | "event_id": "$143273582443PhrSn:example.org", 82 | "room_id": "!726s6s6q:example.com", 83 | "sender": "@example:example.org", 84 | "origin_server_ts": 1432735824653, 85 | "unsigned": { 86 | "age": 1234 87 | }, 88 | "state_key": "@alice:example.org" 89 | }, 90 | { 91 | "content": { 92 | "body": "This is an example text message", 93 | "msgtype": "m.text", 94 | "format": "org.matrix.custom.html", 95 | "formatted_body": "This is an example text message" 96 | }, 97 | "type": "m.room.message", 98 | "event_id": "$143273582443PhrSn:example.org", 99 | "room_id": "!726s6s6q:example.com", 100 | "sender": "@example:example.org", 101 | "origin_server_ts": 1432735824653, 102 | "unsigned": { 103 | "age": 1234 104 | } 105 | } 106 | ], 107 | "limited": true, 108 | "prev_batch": "t34-23535_0_0" 109 | }, 110 | "ephemeral": { 111 | "events": [ 112 | { 113 | "content": { 114 | "user_ids": [ 115 | "@alice:matrix.org", 116 | "@bob:example.com" 117 | ] 118 | }, 119 | "type": "m.typing", 120 | "room_id": "!jEsUZKDJdhlrceRyVU:example.org" 121 | } 122 | ] 123 | }, 124 | "account_data": { 125 | "events": [ 126 | { 127 | "content": { 128 | "tags": { 129 | "u.work": { 130 | "order": 0.9 131 | } 132 | } 133 | }, 134 | "type": "m.tag" 135 | }, 136 | { 137 | "type": "org.example.custom.room.config", 138 | "content": { 139 | "custom_config_key": "custom_config_value" 140 | } 141 | } 142 | ] 143 | } 144 | } 145 | }, 146 | "invite": { 147 | "!696r7674:example.com": { 148 | "invite_state": { 149 | "events": [ 150 | { 151 | "sender": "@alice:example.com", 152 | "type": "m.room.name", 153 | "state_key": "", 154 | "content": { 155 | "name": "My Room Name" 156 | } 157 | }, 158 | { 159 | "sender": "@alice:example.com", 160 | "type": "m.room.member", 161 | "state_key": "@bob:example.com", 162 | "content": { 163 | "membership": "invite" 164 | } 165 | } 166 | ] 167 | } 168 | } 169 | }, 170 | "leave": {} 171 | } 172 | }; 173 | const resp = new Blob([JSON.stringify(resp_data, null, 2)], {type: 'application/json'}); 174 | 175 | const init = { 176 | "status": 200, 177 | "statusText": "Ok", 178 | headers: {'Content-type': 'application/json'} 179 | }; 180 | const response = new win.Response(resp, init); 181 | Object.defineProperty(response, "url", {value: arg["url"]}); 182 | // Lets wait 2 sec to get a chance to see a spinner 183 | setTimeout(() => { 184 | resolve(response) 185 | }, 2000); 186 | } 187 | ) 188 | } 189 | } 190 | 191 | } 192 | export {fake_matrix_api_handler} 193 | export default fake_matrix_api_handler 194 | -------------------------------------------------------------------------------- /cypress/integration/roomlist_spec.js: -------------------------------------------------------------------------------- 1 | import {fake_matrix_api_handler} from "./matrix-fake-api"; 2 | import {login} from "./utils"; 3 | 4 | describe('RoomList', () => { 5 | const name_of_user = "Alice Margatroid"; 6 | beforeEach(function () { 7 | // We use cy.visit({onBeforeLoad: ...}) to stub 8 | // window.fetch before any app code runs 9 | cy.visit('/', { 10 | onBeforeLoad(win) { 11 | let fetch = win.fetch; 12 | cy.stub(win, 'fetch') 13 | .callsFake(args => fake_matrix_api_handler(args, fetch, win)); 14 | }, 15 | }) 16 | }); 17 | 18 | it("does allow clicking a room", () => { 19 | login(); 20 | cy.get('ul.scrollable').contains(name_of_user).click(); 21 | 22 | cy.log('check if the room title is shown after click'); 23 | cy.get('h1').contains(name_of_user).should('be.visible'); 24 | }); 25 | 26 | it("should allow searching", () => { 27 | login(); 28 | 29 | cy.log('check if the room is not shown if anything else is in the search'); 30 | cy.get('input.uk-search-input').clear().type("blub"); 31 | cy.get("ul.scrollable").contains(name_of_user).should("not.exist"); 32 | 33 | cy.log('check if the room is shown if a part of the name is in the search'); 34 | cy.get('input.uk-search-input').clear().type("Alice"); 35 | cy.get("ul.scrollable").contains(name_of_user).should("exist").should("be.visible"); 36 | 37 | cy.log('check if the room is shown if the full name is in the search'); 38 | cy.get('input.uk-search-input').clear().type(name_of_user); 39 | cy.get("ul.scrollable").contains(name_of_user).should("exist").should("be.visible"); 40 | }); 41 | }) 42 | -------------------------------------------------------------------------------- /cypress/integration/utils.js: -------------------------------------------------------------------------------- 1 | const login = () => { 2 | cy.get('form#login_form').within(() => { 3 | // Set homeserverurl 4 | const homeserver_url = "http://localhost:8448"; 5 | cy.get('input#homeserver').type(homeserver_url); 6 | cy.get('input#homeserver').should('have.value', homeserver_url); 7 | 8 | // Set username 9 | const username = "@carl:example.com"; 10 | cy.get('input#username').type(username); 11 | cy.get('input#username').should('have.value', username); 12 | 13 | // Set password 14 | const password = "12345"; 15 | cy.get('input#password').type(username); 16 | cy.get('input#password').should('have.value', username); 17 | }); 18 | cy.get('form#login_form').submit(); 19 | } 20 | 21 | export {login} 22 | -------------------------------------------------------------------------------- /cypress/plugins/index.js: -------------------------------------------------------------------------------- 1 | /// 2 | // *********************************************************** 3 | // This example plugins/index.js can be used to load plugins 4 | // 5 | // You can change the location of this file or turn off loading 6 | // the plugins file with the 'pluginsFile' configuration option. 7 | // 8 | // You can read more here: 9 | // https://on.cypress.io/plugins-guide 10 | // *********************************************************** 11 | 12 | // This function is called when a project is opened or re-opened (e.g. due to 13 | // the project's config changing) 14 | 15 | /** 16 | * @type {Cypress.PluginConfig} 17 | */ 18 | module.exports = (on, config) => { 19 | // `on` is used to hook into various events Cypress emits 20 | // `config` is the resolved Cypress config 21 | } 22 | -------------------------------------------------------------------------------- /cypress/support/commands.js: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add("login", (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This will overwrite an existing command -- 25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /cypress/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /i18n.toml: -------------------------------------------------------------------------------- 1 | # (Required) The locale/language identifier of the language used in the source 2 | # code. 3 | src_locale = "en-US" 4 | 5 | # (Required) The locales that the software will be translated into. 6 | target_locales = ["de"] 7 | 8 | [gettext] 9 | # (Required) Path to the output directory, relative to `i18n.toml` of the crate 10 | # being localized. 11 | output_dir = "i18n" 12 | -------------------------------------------------------------------------------- /i18n/mo/de/daydream.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daydream-mx/Daydream/85c2cf395906e944174eb8e7acac1afe6426fefa/i18n/mo/de/daydream.mo -------------------------------------------------------------------------------- /i18n/po/de/daydream.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: Daydream\n" 4 | "Report-Msgid-Bugs-To: \n" 5 | "POT-Creation-Date: 2020-08-22 14:39+0000\n" 6 | "Language: de\n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "X-Generator: POEditor.com\n" 11 | 12 | #. Placeholder text for the roomlist filtering 13 | #: src/app/components/room_list/mod.rs:180 14 | msgid "Filter Rooms..." 15 | msgstr "Räume filter..." 16 | 17 | #. {0} is the Error that happened on login 18 | #. The error message of the Login page 19 | #: src/app/views/login.rs:157 20 | msgid "Error: {0}" 21 | msgstr "Fehler: {0}" 22 | 23 | #. The Login Button of the Login page 24 | #: src/app/views/login.rs:178 src/app/views/login.rs:248 25 | msgid "Login" 26 | msgstr "Anmelden" 27 | 28 | #. The URL Field of the Login page 29 | #: src/app/views/login.rs:198 30 | msgid "Homeserver URL" 31 | msgstr "Heimserver Adresse" 32 | 33 | #. The Matrix ID Field of the Login page 34 | #: src/app/views/login.rs:217 35 | msgid "MXID" 36 | msgstr "MXID" 37 | 38 | #. The Password Field of the Login page 39 | #: src/app/views/login.rs:236 40 | msgid "Password" 41 | msgstr "Passwort" 42 | 43 | #. A warning for encrypted rooms 44 | #: src/app/views/main_view.rs:81 45 | msgid "Daydream currently does not support encryption." 46 | msgstr "Daydream unterstützt aktuell keine Verschlüsselung" 47 | 48 | #~ msgid "Rooms" 49 | #~ msgstr "Räume" 50 | -------------------------------------------------------------------------------- /i18n/pot/daydream.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Placeholder text for the roomlist filtering 21 | #: src/app/components/room_list/mod.rs:180 22 | msgid "Filter Rooms..." 23 | msgstr "" 24 | 25 | #. {0} is the Error that happened on login 26 | #. The error message of the Login page 27 | #: src/app/views/login.rs:157 28 | msgid "Error: {0}" 29 | msgstr "" 30 | 31 | #. The Login Button of the Login page 32 | #: src/app/views/login.rs:178 src/app/views/login.rs:248 33 | msgid "Login" 34 | msgstr "" 35 | 36 | #. The URL Field of the Login page 37 | #: src/app/views/login.rs:198 38 | msgid "Homeserver URL" 39 | msgstr "" 40 | 41 | #. The Matrix ID Field of the Login page 42 | #: src/app/views/login.rs:217 43 | msgid "MXID" 44 | msgstr "" 45 | 46 | #. The Password Field of the Login page 47 | #: src/app/views/login.rs:236 48 | msgid "Password" 49 | msgstr "" 50 | 51 | #. A warning for encrypted rooms 52 | #: src/app/views/main_view.rs:81 53 | msgid "Daydream currently does not support encryption." 54 | msgstr "" 55 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/event_list.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/events/image.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/events/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/events/notice.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/events/text.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/events/video.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/input.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Placeholder text for the roomlist filtering 21 | #: ./src/app/components/room_list/mod.rs:180 22 | msgid "Filter Rooms..." 23 | msgstr "" 24 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/raw_html.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/room_list.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-06-07 12:39+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Placeholder text for the roomlist filtering 21 | #: ./src/app/components/room_list.rs:161 22 | msgid "Filter Rooms..." 23 | msgstr "" 24 | 25 | #. Header of the Roomlist 26 | #: ./src/app/components/room_list.rs:173 27 | msgid "Rooms" 28 | msgstr "" 29 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/room_list/item.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/components/room_list/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Placeholder text for the roomlist filtering 21 | #: ./src/app/components/room_list/mod.rs:180 22 | msgid "Filter Rooms..." 23 | msgstr "" 24 | -------------------------------------------------------------------------------- /i18n/pot/src/app/matrix/login.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/matrix/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/matrix/sync.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/matrix/types.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/app/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Placeholder text for the roomlist filtering 21 | #: ./src/app/components/room_list/mod.rs:180 22 | msgid "Filter Rooms..." 23 | msgstr "" 24 | 25 | #. {0} is the Error that happened on login 26 | #. The error message of the Login page 27 | #: ./src/app/views/login.rs:157 28 | msgid "Error: {0}" 29 | msgstr "" 30 | 31 | #. The Login Button of the Login page 32 | #: ./src/app/views/login.rs:178 ./src/app/views/login.rs:248 33 | msgid "Login" 34 | msgstr "" 35 | 36 | #. The URL Field of the Login page 37 | #: ./src/app/views/login.rs:198 38 | msgid "Homeserver URL" 39 | msgstr "" 40 | 41 | #. The Matrix ID Field of the Login page 42 | #: ./src/app/views/login.rs:217 43 | msgid "MXID" 44 | msgstr "" 45 | 46 | #. The Password Field of the Login page 47 | #: ./src/app/views/login.rs:236 48 | msgid "Password" 49 | msgstr "" 50 | 51 | #. A warning for encrypted rooms 52 | #: ./src/app/views/main_view.rs:81 53 | msgid "Daydream currently does not support encryption." 54 | msgstr "" 55 | -------------------------------------------------------------------------------- /i18n/pot/src/app/views/login.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. {0} is the Error that happened on login 21 | #. The error message of the Login page 22 | #: ./src/app/views/login.rs:157 23 | msgid "Error: {0}" 24 | msgstr "" 25 | 26 | #. The Login Button of the Login page 27 | #: ./src/app/views/login.rs:178 ./src/app/views/login.rs:248 28 | msgid "Login" 29 | msgstr "" 30 | 31 | #. The URL Field of the Login page 32 | #: ./src/app/views/login.rs:198 33 | msgid "Homeserver URL" 34 | msgstr "" 35 | 36 | #. The Matrix ID Field of the Login page 37 | #: ./src/app/views/login.rs:217 38 | msgid "MXID" 39 | msgstr "" 40 | 41 | #. The Password Field of the Login page 42 | #: ./src/app/views/login.rs:236 43 | msgid "Password" 44 | msgstr "" 45 | -------------------------------------------------------------------------------- /i18n/pot/src/app/views/main_view.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. A warning for encrypted rooms 21 | #: ./src/app/views/main_view.rs:81 22 | msgid "Daydream currently does not support encryption." 23 | msgstr "" 24 | -------------------------------------------------------------------------------- /i18n/pot/src/app/views/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. {0} is the Error that happened on login 21 | #. The error message of the Login page 22 | #: ./src/app/views/login.rs:157 23 | msgid "Error: {0}" 24 | msgstr "" 25 | 26 | #. The Login Button of the Login page 27 | #: ./src/app/views/login.rs:178 ./src/app/views/login.rs:248 28 | msgid "Login" 29 | msgstr "" 30 | 31 | #. The URL Field of the Login page 32 | #: ./src/app/views/login.rs:198 33 | msgid "Homeserver URL" 34 | msgstr "" 35 | 36 | #. The Matrix ID Field of the Login page 37 | #: ./src/app/views/login.rs:217 38 | msgid "MXID" 39 | msgstr "" 40 | 41 | #. The Password Field of the Login page 42 | #: ./src/app/views/login.rs:236 43 | msgid "Password" 44 | msgstr "" 45 | 46 | #. A warning for encrypted rooms 47 | #: ./src/app/views/main_view.rs:81 48 | msgid "Daydream currently does not support encryption." 49 | msgstr "" 50 | -------------------------------------------------------------------------------- /i18n/pot/src/bin/app.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/bin/native_worker.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/constants.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/errors.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/lib.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Placeholder text for the roomlist filtering 21 | #: ./src/app/components/room_list/mod.rs:180 22 | msgid "Filter Rooms..." 23 | msgstr "" 24 | 25 | #. {0} is the Error that happened on login 26 | #. The error message of the Login page 27 | #: ./src/app/views/login.rs:157 28 | msgid "Error: {0}" 29 | msgstr "" 30 | 31 | #. The Login Button of the Login page 32 | #: ./src/app/views/login.rs:178 ./src/app/views/login.rs:248 33 | msgid "Login" 34 | msgstr "" 35 | 36 | #. The URL Field of the Login page 37 | #: ./src/app/views/login.rs:198 38 | msgid "Homeserver URL" 39 | msgstr "" 40 | 41 | #. The Matrix ID Field of the Login page 42 | #: ./src/app/views/login.rs:217 43 | msgid "MXID" 44 | msgstr "" 45 | 46 | #. The Password Field of the Login page 47 | #: ./src/app/views/login.rs:236 48 | msgid "Password" 49 | msgstr "" 50 | 51 | #. A warning for encrypted rooms 52 | #: ./src/app/views/main_view.rs:81 53 | msgid "Daydream currently does not support encryption." 54 | msgstr "" 55 | -------------------------------------------------------------------------------- /i18n/pot/src/utils/mod.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/utils/notifications.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/utils/ruma.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /i18n/pot/src/utils/string_utils.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE daydream'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the daydream package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: daydream 0.1.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-08-22 15:44+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | -------------------------------------------------------------------------------- /media/DaydreamLogo.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daydream-mx/Daydream/85c2cf395906e944174eb8e7acac1afe6426fefa/media/DaydreamLogo.ai -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | # Settings in the [build] context are global and are applied to all contexts 2 | # unless otherwise overridden by more specific contexts. 3 | [build] 4 | # Directory that contains the deploy-ready HTML files and assets generated by 5 | # the build. This is relative to the base directory if one has been set, or the 6 | # root directory if a base has not been set. This sample publishes the 7 | # directory located at the absolute path "root/project/build-output" 8 | publish = "dist/" 9 | 10 | # Default build command. 11 | command = "(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y) && source $HOME/.cargo/env && rustup target add wasm32-unknown-unknown && cargo install cargo-make && cargo make dist" 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "daydream", 3 | "private": true, 4 | "scripts": { 5 | "test": "start-server-and-test 'cargo install cargo-make && cargo make run' http-get://localhost:8000 cy:run:ci", 6 | "cy:open": "cypress open", 7 | "cy:run:ci": "cypress run --browser chrome --record --key 99194b81-775d-4e98-9bac-8f2cc12bc62e --ci-build-id \"${GITHUB_SHA}-${GITHUB_WORKFLOW}-${GITHUB_EVENT_NAME}\" --group github-action-e2e --parallel", 8 | "deploy": "push-dir --dir=dist --branch=gh-pages --cleanup --verbose" 9 | }, 10 | "devDependencies": { 11 | "cross-env": "^7.0.2", 12 | "cypress": "^4.9.0", 13 | "push-dir": "^0.4.1", 14 | "start-server-and-test": "^1.11.0" 15 | }, 16 | "dependencies": { 17 | "uikit": "^3.5.4" 18 | } 19 | } -------------------------------------------------------------------------------- /src/app/components/event_list.rs: -------------------------------------------------------------------------------- 1 | use std::{collections::HashMap, rc::Rc}; 2 | 3 | use crate::utils::ruma::AnyMessageEventExt; 4 | use log::*; 5 | use matrix_sdk::{ 6 | events::{room::message::MessageEventContent, AnyMessageEventContent, AnySyncMessageEvent}, 7 | identifiers::RoomId, 8 | Room, 9 | }; 10 | use yew::{prelude::*, virtual_dom::VList}; 11 | 12 | use crate::app::components::{ 13 | events::{image::Image, notice::Notice, text::Text, video::Video}, 14 | input::Input, 15 | }; 16 | use crate::app::matrix::{MatrixAgent, Request, Response}; 17 | 18 | pub struct EventList { 19 | on_submit: Callback, 20 | state: State, 21 | matrix_agent: Box>, 22 | props: Props, 23 | } 24 | 25 | #[derive(Default)] 26 | pub struct State { 27 | // TODO handle all events 28 | pub events: HashMap>, 29 | } 30 | 31 | #[allow(clippy::large_enum_variant)] 32 | pub enum Msg { 33 | NewMessage(Response), 34 | SendMessage(String), 35 | Nope, 36 | } 37 | 38 | #[derive(Clone, PartialEq, Properties, Debug)] 39 | pub struct Props { 40 | pub current_room: Rc, 41 | } 42 | 43 | impl Component for EventList { 44 | type Message = Msg; 45 | type Properties = Props; 46 | 47 | fn create(props: Self::Properties, link: ComponentLink) -> Self { 48 | let matrix_callback = link.callback(Msg::NewMessage); 49 | let mut matrix_agent = MatrixAgent::bridge(matrix_callback); 50 | 51 | let state = State { 52 | events: Default::default(), 53 | }; 54 | 55 | let room_id = props.current_room.room_id.clone(); 56 | if !state.events.contains_key(&room_id) { 57 | matrix_agent.send(Request::GetOldMessages((room_id, None))); 58 | } 59 | 60 | EventList { 61 | on_submit: link.callback(Msg::SendMessage), 62 | props, 63 | matrix_agent, 64 | state, 65 | } 66 | } 67 | 68 | fn update(&mut self, msg: Self::Message) -> bool { 69 | match msg { 70 | Msg::NewMessage(Response::Sync((room_id, raw_msg))) => { 71 | // TODO handle all events 72 | if let Ok(msg) = raw_msg.deserialize() { 73 | if self.state.events.contains_key(&room_id) { 74 | if !(self.state.events[&room_id] 75 | .iter() 76 | .any(|x| x.event_id() == msg.event_id())) 77 | { 78 | self.state.events.get_mut(&room_id).unwrap().push(msg); 79 | room_id == self.props.current_room.room_id 80 | } else { 81 | false 82 | } 83 | } else { 84 | let msgs = vec![msg]; 85 | self.state.events.insert(room_id.clone(), msgs); 86 | room_id == self.props.current_room.room_id 87 | } 88 | } else { 89 | false 90 | } 91 | } 92 | Msg::NewMessage(Response::OldMessages((room_id, messages))) => { 93 | let mut deserialized_messages: Vec = messages 94 | .iter() 95 | .map(|x| x.deserialize()) 96 | .filter_map(Result::ok) 97 | .map(|x| x.without_room_id()) 98 | .collect(); 99 | // This is a clippy false positive 100 | #[allow(clippy::map_entry)] 101 | if self.state.events.contains_key(&room_id) { 102 | self.state 103 | .events 104 | .get_mut(&room_id) 105 | .unwrap() 106 | .append(deserialized_messages.as_mut()); 107 | true 108 | } else { 109 | self.state.events.insert(room_id, deserialized_messages); 110 | true 111 | } 112 | } 113 | Msg::NewMessage(_) => false, 114 | Msg::SendMessage(message) => { 115 | info!("Sending Message"); 116 | self.matrix_agent.send(Request::SendMessage(( 117 | self.props.current_room.room_id.clone(), 118 | message, 119 | ))); 120 | false 121 | } 122 | Msg::Nope => false, 123 | } 124 | } 125 | 126 | fn change(&mut self, props: Self::Properties) -> bool { 127 | if self.props != props { 128 | let room_id = props.current_room.room_id.clone(); 129 | if !self.state.events.contains_key(&room_id) { 130 | self.matrix_agent 131 | .send(Request::GetOldMessages((room_id, None))); 132 | } 133 | 134 | self.props = props; 135 | true 136 | } else { 137 | false 138 | } 139 | } 140 | 141 | fn view(&self) -> Html { 142 | let events = if self 143 | .state 144 | .events 145 | .contains_key(&self.props.current_room.room_id) 146 | { 147 | let events = &self.state.events[&self.props.current_room.room_id]; 148 | 149 | let mut html_nodes = VList::new(); 150 | if let Some(event) = events.first() { 151 | html_nodes.add_child(self.get_event(None, event)); 152 | } 153 | html_nodes.add_children( 154 | events 155 | .windows(2) 156 | .map(|e| self.get_event(Some(&e[0]), &e[1])), 157 | ); 158 | 159 | html_nodes.into() 160 | } else { 161 | html! {} 162 | }; 163 | 164 | html! { 165 |
166 |

{ self.props.current_room.display_name() }

167 |
168 |
169 | { events } 170 |
171 |
172 |
173 | 174 |
175 | } 176 | } 177 | } 178 | 179 | impl EventList { 180 | // Typeinspection of IDEA breaks with this :D 181 | //noinspection RsTypeCheck 182 | fn get_event( 183 | &self, 184 | prev_event: Option<&AnySyncMessageEvent>, 185 | event: &AnySyncMessageEvent, 186 | ) -> Html { 187 | // TODO make encryption supported 188 | 189 | match &event.content() { 190 | AnyMessageEventContent::RoomMessage(room_message) => match room_message { 191 | MessageEventContent::Text(text_event) => { 192 | html! { 193 | 199 | } 200 | } 201 | MessageEventContent::Notice(notice_event) => { 202 | html! { 203 | 209 | } 210 | } 211 | MessageEventContent::Image(image_event) => { 212 | html! { 213 | 219 | } 220 | } 221 | MessageEventContent::Video(video_event) => { 222 | html! { 223 |