Skip to content
sprout2000Public

About

Minimalist image viewer based on Leaflet.js and Electron.

Topics

Resources

Stars

372 stars

Watchers

6 watching

Forks

Repository files navigation

leaves LeafView

GitHub license GitHub contributors

Minimalist image viewer based on Leaflet.js and Electron.

2023-07-13-171541

Image by Joe from Pixabay.

👍 Features

  • Pan and zoom with the mouse wheel
  • Browse images in a folder
  • Grid view
  • Remembers the last opened folder
  • Follows files added to or removed from the folder
  • Available in 20 languages
  • Automatic updates (macOS and Linux only)
2023-07-13-171712

📥 Download

Download the latest version of LeafView from the Releases page.

📗 Usage

⌨️ Keyboard Shortcuts

Key Function
J, Ctrl+N, Cmd/Ctrl+→ Next Image
K, Ctrl+P, Cmd/Ctrl+← Previous Image
+ Zoom In
- Zoom Out
0 Reset Zoom
← ↑ ↓ → Pan
Fn+Delete or Del Move to Trash
H, Ctrl+G Toggle Grid View

🖱️ Mouse Operations

Mouse Function
Drag Pan
Wheel Zoom In/Out
Double-click Reset Zoom
Right-click Show the Context Menu

🌐 Supported Languages

Language Code
اللغة العربية ar
Čeština cs
Deutsch de
English en
Español es
Français fr
हिंदी hi
Magyar hu
Bahasa Indonesia id
Italiano it
日本語 ja
한국어 ko
Bahasa Melayu ms
Polski pl
Português pt
Русский ru
Türkçe tr
Українська uk
简体中文 zh_CN
繁體中文 zh_TW

🍻 Contributing

You can easily contribute to this repository by providing a translation.

  1. Create {language_code}.json (e.g. nl.json) in src/locales, based on en.json. It must have the same keys as en.json.
  2. Import the file and add the language to languages in src/languages.ts.
+ import nl from "./locales/nl.json";

  export const languages: Language[] = [
    ...
+   { code: "nl", label: "Nederlands", translation: nl },
    ...
  ];
  1. Make sure npm run lint and npm test pass (see Development).
  2. Send a pull request to this repository.

🎉 Contributors

Thanks go to these wonderful people 🙂:

🛠️ Building from Source

You will need to have Node.js and Git installed.

# 1. Clone this repo
git clone https://github.com/sprout2000/leafview.git

# 2. Install dependencies
cd leafview
npm install

# 3. Build the app and create an installer
npm run build && npm run package

The installer will be created in the release directory.

🔧 Development

# Start the app in development mode
npm run dev

# Lint and format the code with Biome
npm run lint

# Run the tests with Vitest and show the coverage
npm test

The tests are in src/__tests__ (main process) and src/__tests__/web (renderer process).

©️ Copyright

Copyright (c) 2020-present sprout2000

About

Minimalist image viewer based on Leaflet.js and Electron.

Topics

Resources

Stars

372 stars

Watchers

6 watching

Forks

Releases

Contributors

Languages