Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 2.34 KB

CHANGELOG.md

File metadata and controls

32 lines (26 loc) · 2.34 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Changed

  • systemHooks.writeBlobToHandle promise can resolve with true to indicate success, in which case File > Save will not prompt to save the file again. false indicates failure or cancellation, whereas undefined can be used if it is unknown whether the file will be saved successfully, as is the case when using the download attribute on an anchor element. If saving as a monochrome bitmap, undefined will cause the canvas to become monochrome, but it will still prompt to save the file again. This tradeoff is reasonable because the download attribute doesn't support saving over an already saved file anyways

1.0.0 - 2022-08-02

Added

  • systemHooks API for overriding file dialogs, file saving/loading, and Set as Wallpaper commands
    • systemHooks.showSaveFileDialog = async ({ formats, defaultFileName, defaultPath, defaultFileFormatID, getBlob, savedCallbackUnreliable, dialogTitle }) => { ... };
    • systemHooks.showOpenFileDialog = async ({ formats }) => { ... };
    • systemHooks.writeBlobToHandle = async (save_file_handle, blob) => { ... };
    • systemHooks.readBlobFromHandle = async (file_handle) => { ... };
    • systemHooks.setWallpaperTiled = (canvas) => { ... };
    • systemHooks.setWallpaperCentered = (canvas) => { ... };
  • function undoable({ name, icon }, actionFunction) to make an action undoable, as far is it modifies the canvas
  • function show_error_message(message, [error]) to show an error message dialog box, optionally with expandable error details
  • function open_from_file(blob, source_file_handle) to load a file from a blob and file handle pair (kinda quirky API)
  • function set_theme(theme_file_name) to switch themes
  • function set_language(language_code) to switch languages, prompting the user to reload the application
  • You can use .main-canvas selector to access the canvas element.
  • URL parameter #load:<URL> to load a file from a URL