about summary refs log tree commit diff
path: root/src/components
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2024-01-25 15:33:23 -0800
committerGitHub <noreply@github.com>2024-01-25 15:33:23 -0800
commit5443503593a67cc7ff6e081ef9b1fe66ea0cbe0d (patch)
tree3a18e5a1b3a272c6ee7705dc6d64a9e17a23a9df /src/components
parent335bef3d308e6aff2238fc4820bd39c8f7517112 (diff)
downloadvoidsky-5443503593a67cc7ff6e081ef9b1fe66ea0cbe0d.tar.zst
Add account-activation queueing to signup (#2613)
* Add deactivated-account tracking

* Center button text

* Add Deactivated screen

* Add icon to Deactivated screen

* Abort session resumption if the session is deactivated

* Implement deactivated screen status checks

* Bump api@0.9.5

* Use new typo-fixed scope

* UI refinements
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Button.tsx1
-rw-r--r--src/components/Loader.tsx41
-rw-r--r--src/components/icons/Group3.tsx5
-rw-r--r--src/components/icons/Loader.tsx5
4 files changed, 52 insertions, 0 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index d2100f0b4..7c682ac1a 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -337,6 +337,7 @@ export function Button({
         a.flex_row,
         a.align_center,
         a.overflow_hidden,
+        a.justify_center,
         ...baseStyles,
         ...(state.hovered || state.pressed ? hoverStyles : []),
         ...(state.focused ? focusStyles : []),
diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx
new file mode 100644
index 000000000..bbe4e2f75
--- /dev/null
+++ b/src/components/Loader.tsx
@@ -0,0 +1,41 @@
+import React from 'react'
+import Animated, {
+  Easing,
+  useSharedValue,
+  useAnimatedStyle,
+  withRepeat,
+  withTiming,
+} from 'react-native-reanimated'
+
+import {atoms as a} from '#/alf'
+import {Props, useCommonSVGProps} from '#/components/icons/common'
+import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
+
+export function Loader(props: Props) {
+  const common = useCommonSVGProps(props)
+  const rotation = useSharedValue(0)
+
+  const animatedStyles = useAnimatedStyle(() => ({
+    transform: [{rotate: rotation.value + 'deg'}],
+  }))
+
+  React.useEffect(() => {
+    rotation.value = withRepeat(
+      withTiming(360, {duration: 500, easing: Easing.linear}),
+      -1,
+    )
+  }, [rotation])
+
+  return (
+    <Animated.View
+      style={[
+        a.relative,
+        a.justify_center,
+        a.align_center,
+        {width: common.size, height: common.size},
+        animatedStyles,
+      ]}>
+      <Icon {...props} style={[a.absolute, a.inset_0, props.style]} />
+    </Animated.View>
+  )
+}
diff --git a/src/components/icons/Group3.tsx b/src/components/icons/Group3.tsx
new file mode 100644
index 000000000..2bb16ba87
--- /dev/null
+++ b/src/components/icons/Group3.tsx
@@ -0,0 +1,5 @@
+import {createSinglePathSVG} from './TEMPLATE'
+
+export const Group3_Stroke2_Corner0_Rounded = createSinglePathSVG({
+  path: 'M17 16H21.1456C20.8246 11.4468 17.7199 9.48509 15.0001 10.1147M10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4ZM18.5 4.5C18.5 5.88071 17.3807 7 16 7C14.6193 7 13.5 5.88071 13.5 4.5C13.5 3.11929 14.6193 2 16 2C17.3807 2 18.5 3.11929 18.5 4.5ZM1 17H13C12.3421 7.66667 1.65792 7.66667 1 17Z',
+})
diff --git a/src/components/icons/Loader.tsx b/src/components/icons/Loader.tsx
new file mode 100644
index 000000000..01419ba54
--- /dev/null
+++ b/src/components/icons/Loader.tsx
@@ -0,0 +1,5 @@
+import {createSinglePathSVG} from './TEMPLATE'
+
+export const Loader_Stroke2_Corner0_Rounded = createSinglePathSVG({
+  path: 'M12 5a7 7 0 0 0-5.218 11.666A1 1 0 0 1 5.292 18a9 9 0 1 1 13.416 0 1 1 0 1 1-1.49-1.334A7 7 0 0 0 12 5Z',
+})