From f6b1b5797176b6d0088cc538cbe2d665855a5674 Mon Sep 17 00:00:00 2001 From: Gorjan Petrovski Date: Thu, 8 Jul 2021 20:24:05 +0200 Subject: [PATCH] feat: preferences help & feedback (#596) --- app/assets/icons/ic-settings-filled.svg | 3 - app/assets/icons/ic-settings.svg | 3 + app/assets/javascripts/components/Icon.tsx | 4 +- .../components/preferences/content.tsx | 28 ++++++ .../components/preferences/help-feedback.tsx | 92 +++++++++++++++++++ .../components/preferences/menu.tsx | 23 +++++ .../components/preferences/pane.tsx | 56 +++++------ .../{mock-state.ts => preferences.ts} | 15 ++- .../components/preferences/view.tsx | 55 +++++++---- app/assets/stylesheets/_preferences.scss | 1 + package.json | 2 +- yarn.lock | 8 +- 12 files changed, 228 insertions(+), 62 deletions(-) delete mode 100644 app/assets/icons/ic-settings-filled.svg create mode 100644 app/assets/icons/ic-settings.svg create mode 100644 app/assets/javascripts/components/preferences/content.tsx create mode 100644 app/assets/javascripts/components/preferences/help-feedback.tsx create mode 100644 app/assets/javascripts/components/preferences/menu.tsx rename app/assets/javascripts/components/preferences/{mock-state.ts => preferences.ts} (78%) diff --git a/app/assets/icons/ic-settings-filled.svg b/app/assets/icons/ic-settings-filled.svg deleted file mode 100644 index 0a7c8b835a8..00000000000 --- a/app/assets/icons/ic-settings-filled.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/app/assets/icons/ic-settings.svg b/app/assets/icons/ic-settings.svg new file mode 100644 index 00000000000..cc14f94a82e --- /dev/null +++ b/app/assets/icons/ic-settings.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/assets/javascripts/components/Icon.tsx b/app/assets/javascripts/components/Icon.tsx index 721c1cec50f..b6be09cc52f 100644 --- a/app/assets/javascripts/components/Icon.tsx +++ b/app/assets/javascripts/components/Icon.tsx @@ -19,7 +19,7 @@ import HelpIcon from '../../icons/ic-help.svg'; import KeyboardIcon from '../../icons/ic-keyboard.svg'; import ListedIcon from '../../icons/ic-listed.svg'; import SecurityIcon from '../../icons/ic-security.svg'; -import SettingsFilledIcon from '../../icons/ic-settings-filled.svg'; +import SettingsIcon from '../../icons/ic-settings.svg'; import StarIcon from '../../icons/ic-star.svg'; import ThemesIcon from '../../icons/ic-themes.svg'; import UserIcon from '../../icons/ic-user.svg'; @@ -47,7 +47,7 @@ const ICONS = { keyboard: KeyboardIcon, listed: ListedIcon, security: SecurityIcon, - 'settings-filled': SettingsFilledIcon, + settings: SettingsIcon, star: StarIcon, themes: ThemesIcon, user: UserIcon, diff --git a/app/assets/javascripts/components/preferences/content.tsx b/app/assets/javascripts/components/preferences/content.tsx new file mode 100644 index 00000000000..efdaa710962 --- /dev/null +++ b/app/assets/javascripts/components/preferences/content.tsx @@ -0,0 +1,28 @@ +import { FunctionalComponent } from 'preact'; + +export const Title: FunctionalComponent = ({ children }) => ( +

{children}

+); + +export const Subtitle: FunctionalComponent = ({ children }) => ( +

{children}

+); + +export const Text: FunctionalComponent = ({ children }) => ( +

{children}

+); + +export const Button: FunctionalComponent<{ label: string; link: string }> = ({ + label, + link, +}) => ( + + {label} + +); diff --git a/app/assets/javascripts/components/preferences/help-feedback.tsx b/app/assets/javascripts/components/preferences/help-feedback.tsx new file mode 100644 index 00000000000..0f9ead7a9ff --- /dev/null +++ b/app/assets/javascripts/components/preferences/help-feedback.tsx @@ -0,0 +1,92 @@ +import { FunctionalComponent } from 'preact'; +import { PreferencesGroup, PreferencesPane, PreferencesSegment } from './pane'; +import { Title, Subtitle, Text, Button } from './content'; + +export const HelpAndFeedback: FunctionalComponent = () => ( + + + + Frequently asked questions + Who can read my private notes? + + Quite simply: no one but you. Not us, not your ISP, not a hacker, and + not a government agency. As long as you keep your password safe, and + your password is reasonably strong, then you are the only person in + the world with the ability to decrypt your notes. For more on how we + handle your privacy and security, check out our easy to read{' '} + + Privacy Manifesto. + + + + + Can I collaborate with others on a note? + + Because of our encrypted architecture, Standard Notes does not + currently provide a real-time collaboration solution. Multiple users + can share the same account however, but editing at the same time may + result in sync conflicts, which may result in the duplication of + notes. + + + + Can I use Standard Notes totally offline? + + Standard Notes can be used totally offline without an account, and + without an internet connection. You can find{' '} + + more details here. + + + + + Can’t find your question here? +