Giter Club home page Giter Club logo

elk-native's Introduction

Elk native logo

Elk Native


discord chat



Warning

Elk Native is no longer maintained. Elk can be used a PWA instead.


Native version of Elk, a nimble Mastodon web client.

Elk Native is even more early alpha than the web version, but we would love your feedback and contributions. If you would like to help us with testing, feedback, or contributing, join our discord and get involved.

Screenshot of the app, showing the federated timeline home Screenshot of the app, showing the federated timeline home

Contributing

We're really excited that you're interested in contributing to Elk! Please read through the small guide below to get started:

Note:
This repo only holds the code necessary for the native app and just git-submodules the frontend from https://github.com/elk-zone/elk so please submit Issues and PRs concerning the frontend there!

Local Setup

First you will need to install Rust and other system dependencies required for developing a Tauri app, you can follow this guide.

Next, you need to install the Tauri CLI which is used to orchestrate the build and package up the final app:

cargo install tauri-cli
# or
npm install -g @tauri-apps/cli
# or 
pnpm install -g @tauri-apps/cli
# or
yarn add -g @tauri-apps/cli

Now clone the submodule in the elk folder.

git submodule update --init elk

Next install the frontend dependencies:

cd elk && pnpm i

Then you can run the app in development mode:

cargo tauri dev

To create a production build of the app:

cargo tauri build

Logging

This app uses a unified logging stream that encompasses both logs from the Rust Core as well as from the frontend. Log levels and filters can be set through the RUST_LOG environment variable (this also works in a release mode app).

For more information on how to specify log levels and filters see the env_logger docs.

License

MIT © 2022-PRESENT Elk Native contributors

elk-native's People

Contributors

danielroe avatar dependabot[bot] avatar erlend-sh avatar github-actions[bot] avatar jonaskruckenberg avatar marekvospel avatar mckristoffer avatar mrbretticus avatar patak-dev avatar piotrski avatar pro-sumer avatar renovate[bot] avatar sxzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elk-native's Issues

Links in posts don't open when clicked

When I click on a link in a post nothing happens. Shouldn't Elk open a web page (either in Elk itself or in the default browser)?

This happens with both nightly23.1.16 and nightly23.1.13.

Licensing?

Do you intend to license this project with an open source license?

RUSTSEC-2022-0048: xml-rs is Unmaintained

xml-rs is Unmaintained

Details
Status unmaintained
Package xml-rs
Version 0.8.4
URL https://github.com/netvl/xml-rs/issues
Date 2022-01-26

xml-rs is a XML parser has open issues around parsing including integer
overflows / panics that may or may not be an issue with untrusted data.

Together with these open issues with Unmaintained status xml-rs
may or may not be suited to parse untrusted data.

Alternatives

See advisory page for additional details.

Build fails

 Finished release [optimized] target(s) in 1m 40s
    Bundling elk_0.4.0_amd64.deb (/home/jak2k/software/elk-native/target/release/bundle/deb/elk_0.4.0_amd64.deb)
    Bundling elk_0.4.0_amd64.AppImage (/home/jak2k/software/elk-native/target/release/bundle/appimage/elk_0.4.0_amd64.AppImage)
       Error failed to bundle project: error running appimage.sh

macOS: Restore last window size/position

When you start Elk.app it always starts with the same dimension and at the same position on Display 1.
It does not save the last postion or window size the user has set it to.

Tested with latest Elk-Native.

khiar.net

I installed the bin version of the software from aur.
Unfortunately, I cannot confirm my login in the software.
Redirection to URL with a scheme that is not HTTP(S)

Improve layout for larger screens

I am currently using the Elk app on a larger screen and I have noticed that there is empty space on the left and right. To improve the user experience, I suggest the following changes:

  • The menu should be attached to the left side of the screen
  • The timeline should fill the rest of the screen, and the right panel should appear on wider screens

One way to implement these changes would be to add a new variant to the unocss for native, which would only be included in Tauri builds.

MacOS: not getting passed Nuxt screen

Hi all - thanks so much for this awesome client.

Trying to get this to run using cargo tauri dev, it's not loading anything - just stuck on the Nuxt slash screen:

Screenshot 2023-12-08 at 4 35 36 PM

Any tips? This is off of the head of main: 73fd12c.

Some system stats:

Software:

    System Software Overview:

      System Version: macOS 13.3 (22E252)
      Kernel Version: Darwin 22.4.0
❯ cargo --version
cargo 1.73.0 (9c4383fb5 2023-08-26)

Any help would be a big thanks - would love to help here as much as possible!! ❤️

How to handle native-specific UI overrides? / Decreasing width required for sidebar.

For some context, I love the navigation sidebar at the left-side of the page.

image

However, if I collapse the window below this width, the sidebar (rightly) turns into footer navigation since it detects it's probably being viewed on a mobile device.

That makes perfect sense for responsive web development, but in the case of a desktop app I'd like to decrease the content width a little bit more but still keep the sidebar there.

Additionally, I'm not sure there's a use case for the footer-based navigation on the desktop app, since on a desktop there is plenty of horizontal screen real-estate for all those navigation items. At the very least, if people like the footer-based navigation, it could be some sort of setting (I'm skeptical anyone would use it, but everyone has their own preferences).


With that said, I was going to put up a PR for this, but noticed there isn't any sort of system to override the styles inside the main Elk frontend. Shouldn't one be implemented?

Another potential feature that would make use of being able to modify the underlying JS: updating the sidebar to take advantage of MacOS' / Windows' transparency features (if you feel that fits the design / overall experience of Elk).

My initial idea is to have some sort of patch system where the native app can run patches on the frontend code. That's probably ripe for bugs, especially as things change in the main codebase, so hopefully there's a better way!

Anyway, just thought it might be worth starting a conversation around this. Love the app so far!

Improve update experience

The current update alert is okay, but it could be improved.

  • Include release notes with markdown formatting
  • It would be beneficial to add information about the authors and group the changes similarly to how elk does.

image

Use `extends` instead of git submodule setup

Currently we use git submodules to check out https://github.com/elk-zone/elk. This means our options for customising elk for native build are more limited and often have to happen upstream, which can hold back development of elk-native.

Instead, I propose we use the Nuxt extends/layers feature (issue tracker) to build on top of existing elk app.

This will allow us to move the tauri module that currently exists upstream into this rep and address issues like elk-zone/elk#1492 more easily.

Blank window, minimal interface on macOS High Sierra

Installed the 0.1.1 (20230118.113740) build of Elk Native.

The application launches without an errors, but only displays a blank window with the sidebar icons. (See first screenshot.)

Clicking on the sidebar icons with display header text for the various sections, but minimal other interface elements appear. (See second screenshot.)

I cannot sign into a Mastodon account or view any timelines.

  • MacBook Air (13-inch, Early 2015)
  • macOS High Sierra 10.13.6 (17G14042)

Screen Shot 2023-01-18 at 9 12 03 AM

Screen Shot 2023-01-18 at 9 20 05 AM

Provide better build instruction

  • Need to provide all dependencies: build and runtime
  • Try to have sections of instructions per OS
  • Have common issues and possible workaround for specific OS's

Details:
Need to provide more detailed instructions as I tried to build on ubuntu and debian (in docker) and they failed cause of the errors related to rust version and cargo install tauri-cli

Moreover I suggest to try to use github workflow or dockerized build of AppImage to simplify the process

Will try to submit PR with updated instructions and possibly Dockerfile that will built app (I used arch linux as base image to do the build)

Missing Android Release

You've got releases for Linux, Ubuntu, Windows, and MacOS.
Where are the native releases for Android and iOS?
That's a pretty big gap for people who want to use Elk natively on mobile.

macOS: Cannot drag window around

Not sure whether this is a generic Tauri issue or Elk Native specific, but I cannot drag the window around (using the title bar) on macOS.

(resizing the window by dragging borders does work, but I cannot move it)

Native Mobile artifacts

I’m sure this is already on your radar, but wanted to make an issue to track so folks can subscribe for updates :)

Redirection to URL with a scheme that is not HTTP(S)

Installed Elk_0.1.0_linux_x86_64.deb on Pop!_OS with Eddy.

Authenticated against mastodon.lol, granted OAuth permission. Immediately after, I got the error in the title. I consistently see this - the very first time, after sign-out and sign-in when I no longer need to grant the permissions. Every time.

Once I get that, I can right click the body of the window and reload and from there it operates in parity with the Web UI. It is not obvious there is even a reload possible, I was just clicking at semi-random.

Screenshot from 2023-01-17 11-04-53

[FEATURE REQUEST] Store accounts in a secrets service if possible

On linux, there are many apps (such as kdewallet5 or gnome keyring), that provide org.freedesktop.secrets, so apps can ask them for passwords, login tokens etc, which these apps usually store in some encrypted way.

This basically functions like password manager, you login with a master password to decrypt the keyring and all other services can use different passwords, which you don't have to remember.

I've created this issue to track the progress, as I plan to implement this, but it's going to take me some time. (due to needed research, falling back to filesystem storage etc.)

I'm also not aware of whether those APIs exist on windows & macos, so this issue can also be used for discussion about implementing this on windows and macos.

Publish on Flathub

I see you have an AppImage available for download, but making the package available on Flathub will allow elk-native to be easily accessible to many via GUI package manager frontends like GNOME Software. Although this is not final software, you can publish it to Flathub’s beta repository. I think it’s worth a look, keep up the great work!

"Cannot connect to server" when attempting to sign in

Hi,

I am getting the "Cannot connect to server" error message when attempting to sign in:
imageimageimage

Note: my instance is tech.lgbt, however I have also tested the mastodon.social and m.webtoo.ls servers.

I am using a version compiled from master. When running a release that has been compiled with cargo tauri build --debug (note: I can reproduce on a debug build as well as a non-debug build, installed from the AUR), the following log message is produced when attempting pressing the "Sign in" button:

[2023-12-05][18:26:18][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]

The full logs are:

[2023-12-05][18:26:00][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][WARN] @nuxtjs/i18n Could not find en-US locale code in localeMessages
VM 0x7feb1e400000 on pid 22127 received NeedDebuggerBreak trap
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
[2023-12-05][18:26:18][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
[2023-12-05][18:26:33][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
[2023-12-05][18:26:43][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
[2023-12-05][18:26:45][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
[2023-12-05][18:27:22][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
[2023-12-05][18:28:33][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
[2023-12-05][18:29:16][ha@tauri://localhost/_nuxt/entry.00b77760.js:18:20962][ERROR] [h3]
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft
Couldn't get key from code: SuperLeft

Additionally, there is nothing in the browser console of interest.
Here is the full contents of the browser console:

[Error] Origin tauri://localhost is not allowed by Access-Control-Allow-Origin. Status code: 200
[Error] Fetch API cannot load https://m.webtoo.ls/nodeinfo/2.0 due to access control checks.
[Error] Failed to load resource: Origin tauri://localhost is not allowed by Access-Control-Allow-Origin. Status code: 200 (2.0, line 0)

Looking at the network requests, it does not seem to be making any requests, other than loading 2 inline svgs.

After messing around trying to get source maps to build so I can figure out where that error is from (I couldn't get it to work), I eventually managed to do smth that started showing the following console logs:

[Error] Refused to connect to tauri://localhost/api/tech.lgbt/login because it does not appear in the connect-src directive of the Content Security Policy.

so, my best guess, is that for some reason it doesn't want to connect to the internal server ? Unsure, though.
It also produced the following logs in the browser console:

[Warning] @nuxtjs/i18n Could not find en-US locale code in localeMessages (entry.864cc6c3.js, line 39)
[Error] Origin tauri://localhost is not allowed by Access-Control-Allow-Origin. Status code: 200
[Error] Fetch API cannot load https://m.webtoo.ls/nodeinfo/2.0 due to access control checks.
[Error] Failed to load resource: Origin tauri://localhost is not allowed by Access-Control-Allow-Origin. Status code: 200 (2.0, line 0)
[Error] Refused to connect to tauri://localhost/api/list-servers because it does not appear in the connect-src directive of the Content Security Policy. (x2)
[Error] FetchError: Load failed (/api/list-servers)
	ow (entry.864cc6c3.js:1:14337)
	zo (entry.864cc6c3.js:1:14290)
	(anonymous function) (entry.864cc6c3.js:1:13948)
[Error] Refused to connect to tauri://localhost/api/tech.lgbt/login because it does not appear in the connect-src directive of the Content Security Policy.

MacOS Native - not seeing load new posts counter

The "load new posts" counter isn't showing up for me in the most recent build, Elk v0.6.1, MacOS Monterey 12.5. Sorry, I may be forgetting the exact wording, but it's the thing at the top of the stack of posts that you can click to load new posts.

BTW this is a very nice feature, and another thing I like more than how certain other microblogging service native apps work.

Here's the log - looks truncated, let me know if there's something else you need here.
Elk.log

Cannot back to Elk when not signed to Mastodon

Cannot back to Elk when not signed to Mastodon. It will redirect to original Mastodon server.

For example, initially, I didn't sign in to m.webtoo.ls, and Elk will redirect me to webtools website and required my email and password. After signing in, it will redirect to m.webtoo.ls website instead of backing to Elk app.

[UI] Strange top bar

Well, I met this problem only in the native app. When I maximize the window, the top bar of notifications will extend to the far right. It looks strange. Can you make it more natural?

图片

Color shifted to orange when viewing users profile's default "posts" section

When viewing a user's profile, I saw a light yellow color on the followers list count side. Is that intended behavior? However, clicking on the "post with replies" or "media" section the color goes back to normal (gets shifted to white color).

Here's the recording video

simplescreenrecorder-2023-08-01_13.31.14.webm

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
  • tauri 1.2.4
  • log 0.4.20
  • env_logger 0.10.0
  • tauri-build 1.4.0
npm
package.json
  • @tauri-apps/cli ^1.2.3
  • tiny-glob ^0.2.9

  • Check this box to trigger a request for Renovate to run again on this repository

Miscounting characters in post

I just had an instance where my post was exactly 500 characters and pushed publish and nothing happened. I copied and pasted my response into another app and it said I was 4 characters over 500. I edited the post to remove 4 characters and it posted fine.

"Search" feature returning error: ERROR: MastoDeserializeError

(oops... may have put this on the wrong fork, please move if necessary)

when I click on "Search" in desktop MS Edge on Windows, I get the following error:

ERROR: MastoDeserializeError: Unknown content type */* returned from the server.

This happens on "Posts," "Hashtags" and "News." "For you" is OK.

My Mastodon instance (mastodon.cloud) is running 3.4.6.

Elk Version v0.7.4

Web capture_27-2-2023_105210_elk zone

Web capture_27-2-2023_105149_elk zone

macOS window dragging unavailable in wider viewports

Elk.app v0.2.0
macOS 13.2

I noticed that window dragging is working in the latest release, but it seems finicky when the window is at certain breakpoints. I've attached a screencast video demonstrating.

Screen.Recording.Elk.mp4

Thanks for the hard work here!

Ubuntu : conflict between 2 different packages with the same name : Elk

On Ubuntu, installing Elk_0.3.0_linux_x86_64.deb

There is a big problem with the other existing package
elk_3.99.8-4.2build1

As soon as the desktop app of Elk 0.3 is installed, it is deleted a few minutes later by an update of the other elk_3.99.8-4.2build1
It is therefore impossible to use the app.

It seems necessary to change the name so that there is no confusion between the 2 packages.

another thing:
still on Ubuntu, no links in the Appimage work ?...

Timeline does not update

Elk Native (macOS build) only shows the posts in the timeline at the time the App was started; no further posts appear.

Shouldn't Elk automatically load new posts? (Or at least offer a way to reload manually?)

Copy link to post not working properly

if I want to share a post via link I can klick on copy link to this post (as seen in the screenshot) or on share this post and then copy link. However in both cases I get this link, that starts with tauri.localhost followed by the real link. as in: https://tauri.localhost/<instance>/@<user>/<post-id>
(sorry I don't know if it would be ok to post a link here..)

grafik

Cannot sign in to any server

Whatever server I try, I cannot sign in using the Native Elk App (I have been able to sign in using the web version of Elk on the same servers some time ago).

Sign in dialog with error message 'Cannot connect to the server'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.