Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial border text field for login and signup #6537

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c2d6fc2
Initial commit
BothimTV Feb 12, 2024
296c242
Patched background color for label when using the dark mode on the lo…
BothimTV Feb 12, 2024
e7a8ecb
Implemented border text field into the recovery dialog on the login p…
BothimTV Feb 12, 2024
d26a2ac
WIP: Fix centering of icons in IconButtons
BothimTV Feb 12, 2024
c953807
WIP: Adapt new layout (less text on signup)
BothimTV Feb 13, 2024
03c9ee4
Fixed wrong margin
BothimTV Feb 13, 2024
2f58fd6
Fixed centering of icons in IconButtons
BothimTV Feb 13, 2024
988dd32
Minor change to completeness bar
BothimTV Feb 13, 2024
388bfa3
Fix: colored completeness bar is not use everywhere anymore
BothimTV Feb 13, 2024
514666a
Round corners in recovery code field
BothimTV Feb 13, 2024
2ccc7f8
Readd password strength description
BothimTV Feb 14, 2024
b951f47
Recovery code input: Switched from HtmlEditor to BorderTextField
BothimTV Feb 14, 2024
dc159ec
Fixed some padding/margin issues
BothimTV Feb 14, 2024
4e3dd8d
Switched to general size definition
BothimTV Feb 14, 2024
257d8ae
Removed importance notice from password
BothimTV Feb 14, 2024
8d7d47e
Make it easier for a user to distinguish between a normal input and a…
BothimTV Feb 14, 2024
0ed97ce
Removed now unnecessary workarounds which were induced in d26a2ac and…
BothimTV Feb 15, 2024
bb54018
Merge branch 'master' into border-text-field
BothimTV Feb 15, 2024
ca5986f
Implement border field for payment details
BothimTV Feb 15, 2024
a0cd59a
We don't need the labelBgColorOverwrite anymore, we now use a blur ba…
BothimTV Feb 15, 2024
4e5d8ff
Removed unused properties
BothimTV Feb 15, 2024
2c35881
Get margin from sizes
BothimTV Feb 15, 2024
a9b3df5
The BorderTextField now uses the elevated background as default, the …
BothimTV Feb 16, 2024
7c06661
WIP: Change/reserve distance between inputs
BothimTV Feb 16, 2024
f8c24c9
Change indication of wrong/correct password on signup
BothimTV Feb 16, 2024
dbfe0f5
Changed valid indication position. Removed help label from password f…
BothimTV Feb 16, 2024
5266830
Spacing of the help label is now done by the BorderTextField
BothimTV Feb 16, 2024
acb840f
Change the checkboxes to agree to the TOS
BothimTV Feb 16, 2024
fb883cc
WIP: Add custom domain to selection
BothimTV Feb 16, 2024
0fb7fbd
Merge branch 'tutao:master' into border-text-field
BothimTV Feb 19, 2024
d259688
Merge branch 'master' into border-text-field
BothimTV Feb 24, 2024
95da1ba
Merge branch 'master' into border-text-field
BothimTV Feb 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/api/common/TutanotaConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ export const TUTANOTA_MAIL_ADDRESS_DOMAINS: ReadonlyArray<string> = Object.freez
"tutanota.com",
"tutanota.de",
"keemail.me",
"your-domain.com",
])
export const TUTANOTA_MAIL_ADDRESS_SIGNUP_DOMAINS = TUTANOTA_MAIL_ADDRESS_DOMAINS
export const DEFAULT_PAID_MAIL_ADDRESS_SIGNUP_DOMAIN = "tuta.com"
Expand Down
37 changes: 30 additions & 7 deletions src/gui/CompletenessIndicator.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,51 @@
import m, { Children, Component, Vnode } from "mithril"
import { theme } from "./theme.js"
import { DefaultAnimationTime } from "./animation/Animations.js"

export interface CompletenessIndicatorAttrs {
percentageCompleted: number
width?: string
passwordColorScale?: boolean
}

export class CompletenessIndicator implements Component<CompletenessIndicatorAttrs> {
view({ attrs }: Vnode<CompletenessIndicatorAttrs>): Children {
const mediumStrengthPercentage: number = 30
const goodStrengthPercentage: number = 75
return m(
"",
{
style: {
border: `1px solid ${theme.content_button}`,
border: attrs.passwordColorScale ? "" : `1px solid ${theme.content_button}`,
width: attrs.width ?? "100px",
height: "10px",
height: "8px",
},
},
m("", {
style: {
"background-color": theme.content_button,
width: attrs.percentageCompleted + "%",
height: "100%",
},
style: attrs.passwordColorScale
? {
"background-color":
attrs.percentageCompleted < mediumStrengthPercentage
? "hsl(0deg 50% 50%)"
: attrs.percentageCompleted < goodStrengthPercentage
? "hsl(60deg 50% 50%)"
: "hsl(120deg 50% 50%)",
"background-image":
attrs.percentageCompleted < mediumStrengthPercentage
? "linear-gradient(90deg, hsl(0deg 50% 50%) 0%, hsl(0deg 50% 50%) 100%)"
: attrs.percentageCompleted < goodStrengthPercentage
? "linear-gradient(90deg, hsl(0deg 50% 50%) 0%, hsl(60deg 50% 50%) 100%)"
: "linear-gradient(90deg, hsl(0deg 50% 50%) 0%, hsl(60deg 50% 50%) 75%, hsl(120deg 50% 50%) 100%)",
transition: `width ${DefaultAnimationTime * 3}ms ease 0s`,
width: attrs.percentageCompleted + "%",
height: "100%",
"border-radius": "8px",
}
: {
"background-color": theme.content_button,
width: attrs.percentageCompleted + "%",
height: "100%",
},
}),
)
}
Expand Down
Loading