Skip to content

Commit

Permalink
Start improving UI of projects screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Erudition committed Sep 29, 2023
1 parent 244d473 commit 9b4975d
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 7 deletions.
8 changes: 6 additions & 2 deletions BACKEND OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
For now we just need a simple append-only log for our RON frames, that replicates to other devices with NAT hole-punching included. All non-internet sync methods are welcome, especially something like local Bluetooth sync.

## WebNative
- Uses IPFS
- Uses IPFS, custom block-sync solution (not Helia)
- has a public+private filesystem, Webnative File System, where private is encrypted
- adds auth and account sharing, adding devices

## OrbitDb
- Uses IPFS
- Uses IPFS, now Helia
- Berty uses it

## Peerbit
- Uses LibP2P, custom block-sync solution (not Helia)
- Designed to be super low latency

## Berty Protocol
- On top of orbitDb, details are settled
- IPFS transport includes Bluetooth!
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)

# Minder
The ultimate assistant for ADHD. Keeps track of what you _should be doing_ and sends effective reminders (including zaps) if you're off task.

Expand Down Expand Up @@ -37,3 +39,23 @@ Much later, seeing the power of NativeScript to easily handle my local notificat
- But that "export" of data from Elm still needs to be triggered from elm somehow. I tried triggering it on every `update` ever (like `updateWithTime` and `updateWithStorage`), but it wasn't working, and we really only need it when the values are changed anyway. So now I have it trigger whenever the activity is changed! Still need a way to trigger it at launch though, without taking up the launch URL.
- Android notifs can only have one vibe pattern per channel? Fine, guess I'll have multiple channels then.
- Seems like "global" variables can't be read or changed from within the worker. For once that makes sense since the workers are supposed to be totally isolated. So I put the storing of the ViewModel update in the main thread (app.js) and just told the worker to let the main thread know. Works well.




== Using GitHub Under Protest ==

This project is currently hosted on GitHub. This is not ideal; GitHub is a
proprietary, trade-secret system that is not Free, Libre, Open Souce Software
(FLO). We are deeply concerned about using a proprietary system like GitHub
to develop our FOSS project. In the long term, we may make the move to Nest, powered by Pijul.
We urge you to read about the
[Give up GitHub](https://GiveUpGitHub.org) campaign from
[the Software Freedom Conservancy](https://sfconservancy.org) to understand
some of the reasons why GitHub is not a good place to host FLOSS projects.

Any use of this project's code by GitHub Copilot, past or present, is done
without our permission. We do not consent to GitHub's use of this project's
code in Copilot.

![Logo of the GiveUpGitHub campaign](https://sfconservancy.org/img/GiveUpGitHub.png)
2 changes: 1 addition & 1 deletion capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: CapacitorConfig = {
webDir: 'dist',
server: {
allowNavigation: ["erudition.github.io"], // don't add "localhost" here
// url: "https://localhost/", // default is https://localhost, but setting this to ANYTHING prevent navigation to localhost...
// url: "https://localhost/", // default is https://localhost, but setting this to ANYTHING prevents navigation to localhost...
//url: "https://erudition.github.io/minder-preview/Erudition/Minder/branch/master/",
hostname: 'minder-localhost',
// can't be localhost because service worker is blocked in android webview. https://stackoverflow.com/a/76373851/8645412 can't be erudition.github.io or else online requests will become local requests.
Expand Down
4 changes: 4 additions & 0 deletions elm/Task/Assignable.elm
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,7 @@ setActivityID newActivityID (Assignable metaAssignable) =

children (Assignable metaAssignable) =
(Reg.latest metaAssignable.reg).children


parent (Assignable metaAssignable) =
metaAssignable.project
64 changes: 60 additions & 4 deletions elm/TaskList.elm
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ viewAssignable profile ( time, timeZone ) trackedTaskMaybe assignable =
viewAssignableTitle =
[ text <| Assignable.title assignable ]

project =
Assignable.parent assignable

viewSubAssignables =
List.map viewSubAssignable (RepList.listValues (Assignable.children assignable))

Expand Down Expand Up @@ -317,14 +320,67 @@ viewAssignable profile ( time, timeZone ) trackedTaskMaybe assignable =
[]
, node "ion-button" [ attribute "fill" "clear", onClick (AddAssignment assignable) ] [ node "ion-icon" [ name "add-circle-outline" ] [], text "assign" ]
]

presentActionSheet =
ActionSheet.actionSheet
[ ActionSheet.header <| Maybe.withDefault "This project" (Project.title project)
, ActionSheet.trigger sheetButtonID
]
[ ActionSheet.deleteButton (Toast "NYI: Delete Project")
, ActionSheet.button "Rename" (Toast "clicked Continue!")
]
|> SH.fromUnstyled

sheetButtonID =
"actionsheet-trigger-for-assignable-" ++ Assignable.idString assignable
in
div
[ class "assignments" ]
[ node "ion-card-title" [ onDoubleClick (PromptRename (Assignable.title assignable) (\t -> Assignable.setTitle t assignable)) ] (viewAssignableTitle ++ viewSubAssignables)
, div [ css [ displayFlex, overflowX scroll ] ] viewAssignments
node "ion-item-sliding"
[]
[ node "ion-item"
[ classList []
, attribute "data-flip-key" ("assignable-" ++ Assignable.idString assignable)
]
[ -- node "ion-thumbnail"
-- [ class "project-image"
-- , attribute "slot" "start"
-- , css
-- [ backgroundColor <| Css.hsl 0 0 0.5
-- , Css.height (pct 100)
-- ]
-- ]
-- [ --img [ src "https://ionicframework.com/docs/img/demos/thumbnail.svg" ] []
-- SH.fromUnstyled <| identicon "100%" (RepList.handleString rootEntryItem)
-- ]
div [ css [ Css.width (pct 100) ] ]
[ node "ion-label"
[ onDoubleClick (PromptRename (Project.title project |> Maybe.withDefault "Untitled Project") (\t -> Project.setTitle (Just t) project)) ]
[ text (Project.title (Assignable.parent assignable) |> Maybe.withDefault "")
]
, node "ion-label"
[ onDoubleClick (PromptRename (Assignable.title assignable) (\t -> Project.setTitle (Just t) project)) ]
[ text (Assignable.title assignable)
]
, div [] [ text (String.fromInt (List.length assignments) ++ "assignments") ]
, viewMenuButton sheetButtonID
]
]
, node "ion-item-options"
[]
[ node "ion-item-option" [ attribute "color" "danger" ] [ text "delete" ]
, node "ion-item-option" [ attribute "color" "primary", onClick (AddAssignable project) ] [ text "add assignable" ]
]
, presentActionSheet
]



-- div
-- [ class "assignments" ]
-- [ node "ion-card-title" [ onDoubleClick (PromptRename (Assignable.title assignable) (\t -> Assignable.setTitle t assignable)) ] (viewAssignableTitle ++ viewSubAssignables)
-- , div [ css [ displayFlex, overflowX scroll ] ] viewAssignments
-- ]


viewAssignment : ( Moment, Zone ) -> Maybe AssignmentID -> Int -> Assignment -> Html Msg
viewAssignment ( time, timeZone ) trackedTaskMaybe index assignment =
let
Expand Down

0 comments on commit 9b4975d

Please sign in to comment.