-
-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: warning for protected note without protection
- Use `.sn-button` everywhere - Delete permissions modal - Capitalize "Clear session data"
- Loading branch information
Showing
25 changed files
with
411 additions
and
469 deletions.
There are no files selected for viewing
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
37 changes: 37 additions & 0 deletions
37
app/assets/javascripts/components/NoProtectionsNoteWarning.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { AppState } from '@/ui_models/app_state'; | ||
import { toDirective } from './utils'; | ||
|
||
type Props = { appState: AppState; onViewNote: () => void }; | ||
|
||
function NoProtectionsNoteWarning({ appState, onViewNote }: Props) { | ||
console.log("🚀 ~ file: NoProtectionsNoteWarning.tsx ~ line 7 ~ NoProtectionsNoteWarning ~ onViewNote", onViewNote) | ||
return ( | ||
<div className="flex flex-col items-center justify-center text-center max-w-md"> | ||
<h1 className="text-2xl m-0 w-full">This note is protected</h1> | ||
<p className="text-lg mt-2 w-full"> | ||
Add a passcode or create an account to require authentication to view | ||
this note. | ||
</p> | ||
<div className="mt-4 flex gap-3"> | ||
<button | ||
className="sn-button info" | ||
onClick={() => { | ||
appState.accountMenu.setShow(true); | ||
}} | ||
> | ||
Open account menu | ||
</button> | ||
<button className="sn-button outlined" onClick={onViewNote}> | ||
View note | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export const NoProtectionsdNoteWarningDirective = toDirective<Props>( | ||
NoProtectionsNoteWarning, | ||
{ | ||
onViewNote: '&', | ||
} | ||
); |
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
47 changes: 0 additions & 47 deletions
47
app/assets/javascripts/directives/views/permissionsModal.ts
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.main-ui-view( | ||
.main-ui-view.sn-component( | ||
ng-class='self.platformString' | ||
) | ||
#app.app( | ||
|
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.