diff --git a/manifest.json b/manifest.json index 7a66809..e94f87b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "note-id", "name": "Note ID", - "version": "1.0.3", + "version": "1.0.4", "minAppVersion": "0.15.0", "description": "Displays notes by their ID, enabling structured sequences in a Zettelkasten (\"Folgezettel\").", "author": "Dominik Mayer", diff --git a/package.json b/package.json index f75406f..9577e5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-note-id", - "version": "1.0.3", + "version": "1.0.4", "description": "Displays notes by their ID, enabling structured sequences in a Zettelkasten (\"Folgezettel\").", "main": "main.js", "scripts": { diff --git a/src/Main.elm b/src/Main.elm index 0524181..5ab1778 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -13,6 +13,23 @@ import Task import Debug exposing (toString) +-- MAIN + + +main : Program () Model Msg +main = + Browser.element + { init = init + , update = update + , view = view + , subscriptions = subscriptions + } + + + +-- MODEL + + type alias Model = { notes : List NoteMeta , currentFile : Maybe String @@ -86,16 +103,6 @@ defaultItemHeight = 26 -main : Program () Model Msg -main = - Browser.element - { init = init - , update = update - , view = view - , subscriptions = subscriptions - } - - init : () -> ( Model, Cmd Msg ) init _ = ( defaultModel @@ -103,6 +110,10 @@ init _ = ) + +-- UPDATE + + type Msg = FileOpened (Maybe String) | FileRenamed ( String, String ) @@ -406,6 +417,10 @@ slice start end list = |> List.take (end - start) + +-- VIEW + + view : Model -> Html Msg view model = let