-
-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: native listed integration (#846)
* feat(wip): native listed integration * feat(wip): wip * feat: simplified actions menu structure * feat: open settings alert upon succesful creation * fix: handle remove menu row api * chore(deps): snjs
- Loading branch information
Showing
9 changed files
with
290 additions
and
411 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 20 additions & 73 deletions
93
app/assets/javascripts/preferences/panes/listed/BlogItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
app/assets/javascripts/ui_models/app_state/actions_menu_state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import { UuidString } from "@standardnotes/snjs"; | ||
import { action, makeObservable, observable } from "mobx"; | ||
import { UuidString } from '@standardnotes/snjs'; | ||
import { action, makeObservable, observable } from 'mobx'; | ||
|
||
export class ActionsMenuState { | ||
hiddenExtensions: Record<UuidString, boolean> = {}; | ||
hiddenSections: Record<UuidString, boolean> = {}; | ||
|
||
constructor() { | ||
makeObservable(this, { | ||
hiddenExtensions: observable, | ||
toggleExtensionVisibility: action, | ||
hiddenSections: observable, | ||
toggleSectionVisibility: action, | ||
reset: action, | ||
}); | ||
} | ||
|
||
toggleExtensionVisibility = (uuid: UuidString): void => { | ||
this.hiddenExtensions[uuid] = !this.hiddenExtensions[uuid]; | ||
} | ||
toggleSectionVisibility = (uuid: UuidString): void => { | ||
this.hiddenSections[uuid] = !this.hiddenSections[uuid]; | ||
}; | ||
|
||
reset = (): void => { | ||
this.hiddenExtensions = {}; | ||
} | ||
this.hiddenSections = {}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.