1- import { constants , React , ReactNative , stylesheet } from "@vendetta/metro/common" ;
1+ import { constants , React , ReactNative , stylesheet , NavigationNative } from "@vendetta/metro/common" ;
22import { findByName } from '@vendetta/metro' ;
33import { useProxy } from "@vendetta/storage" ;
44import { storage } from "@vendetta/plugin" ;
55import { semanticColors } from "@vendetta/ui" ;
66import { Forms , General } from "@vendetta/ui/components" ;
77import { getAssetIDByName } from "@vendetta/ui/assets"
88
9+ import ColorPickComponent from './components/colorpick' ;
10+ import CustomizationComponent from './components/customize' ;
11+ import IgnoreListComponent from './components/ignorelist' ;
12+ import NerdComponent from './components/nerd' ;
913import PatchesComponent from './components/patches' ;
1014import TextComponent from './components/texts' ;
1115import TimestampComponent from './components/timestamp' ;
12- import ColorPickComponent from './components/colorpick' ;
13- import IgnoreListComponent from './components/ignorelist' ;
14- import CustomizationComponent from './components/customize' ;
16+ import CreditsPage from './components/credits' ;
1517
16- import updates from "./update" ;
1718import bugs from "./knowbug" ;
1819import VersionChange from "../../lib/components/versionChange" ;
1920
@@ -101,6 +102,15 @@ export default function SettingPage() {
101102 const [ animation ] = React . useState ( new Animated . Value ( 0 ) ) ;
102103 const [ isKnownBugOpen , setKnownBugOpen ] = React . useState ( false )
103104
105+ const navigation = NavigationNative . useNavigation ( ) ;
106+
107+ const openCreditPage = ( ) => {
108+ navigation . push ( "VendettaCustomPage" , {
109+ title : `Credits & Support` ,
110+ render : ( ) => React . createElement ( CreditsPage , { styles : styles } )
111+ } )
112+ }
113+
104114 React . useEffect ( ( ) => {
105115 Animated . loop (
106116 Animated . timing (
@@ -138,9 +148,10 @@ export default function SettingPage() {
138148 createChild ( "timestamp" , "Timestamp" , "Timestamp Styles" , null , TimestampComponent , styles ) ,
139149 createChild ( "colorpick" , "Colors" , "Customize Colors" , null , ColorPickComponent , styles ) ,
140150 createChild ( "ingorelist" , "Ignore List" , "Show IngoreList" , null , IgnoreListComponent , null ) ,
151+ createChild ( "nerd" , "Nerd Stuff" , "Open Sesami" , null , NerdComponent , null , styles ) ,
141152 ]
142153
143- const currentOS = ReactNative ?. Platform ?. OS || null ;
154+ // const currentOS = ReactNative?.Platform?.OS || null;
144155
145156 const entireUIList = ( < >
146157 < View style = { [ styles . lnBorder , bgStyle , styles . darkMask ] } >
@@ -177,61 +188,13 @@ export default function SettingPage() {
177188 </ > )
178189 } )
179190 }
180- < FormDivider />
181- < FormSection title = "Nerd Stuff" >
182- < FormRow
183- label = "Debug"
184- subLabel = "Enable console logging"
185- style = { [ styles . padBot ] }
186- trailing = {
187- < FormSwitch
188- value = { storage . debug }
189- onValueChange = { ( value ) => {
190- storage . debug = value
191- } }
192- />
193- }
194- />
195- < FormDivider />
196- < FormRow
197- label = "Debug updateRows"
198- subLabel = "Enable updateRows console logging"
199- style = { [ styles . padBot ] }
200- trailing = {
201- < FormSwitch
202- value = { storage . debugUpdateRows }
203- onValueChange = { ( value ) => {
204- storage . debugUpdateRows = value
205- } }
206- />
207- }
208- />
209- </ FormSection >
210- < FormDivider />
211- {
212- updates && (
213- < FormSection title = "Updates" >
214- < View style = { {
215- margin : 5 ,
216- padding : 5 ,
217- borderRadius : 10 ,
218- backgroundColor : "rgba(59, 30, 55, 0.15)"
219- } } >
220- {
221- updates . map ( ( data , index ) => {
222- return < VersionChange change = { data } index = { index } totalIndex = { updates . length } />
223- } )
224- }
225- </ View >
226- </ FormSection >
227- )
228- }
229- < FormDivider />
191+
230192 {
231193 bugs && (
232194 < FormSection title = "Known Bugs" >
233195 < FormRow
234196 label = "Click to show those Lady Bug"
197+ style = { { padding : 2 } }
235198 onPress = { ( ) => {
236199 setKnownBugOpen ( ! isKnownBugOpen )
237200 } }
@@ -267,30 +230,23 @@ export default function SettingPage() {
267230
268231 return ( < >
269232 < ScrollView >
270- {
271- /*
272- (currentOS == "android") ?
273- (<>
274- <LinearGradient
275- start={{x: 0.8, y: 0}}
276- end={{x: 0, y: 0.8}}
277- colors={[ "#b8ff34", "#4bff61", "#44f6ff", "#4dafff", "#413dff", "#d63efd" ]}
278- style={[ styles.lnBorder, styles.shadowTemplate, styles.lnShadow, styles.padBot ]}
279- >
280- {entireUIList}
281- </LinearGradient>
282- </>) :
283- (entireUIList)
284- */
285- }
286233 < LinearGradient
287234 start = { { x : 0.8 , y : 0 } }
288235 end = { { x : 0 , y : 0.8 } }
289236 colors = { [ "#b8ff34" , "#4bff61" , "#44f6ff" , "#4dafff" , "#413dff" , "#d63efd" ] }
290237 style = { [ styles . lnBorder , styles . shadowTemplate , styles . lnShadow , styles . padBot ] }
291238 >
239+ < FormRow
240+ label = "CREDITS"
241+ subLabel = "See the people behind the plugin and ways to support its development."
242+ onPress = { openCreditPage }
243+ style = { [ styles . lnBorder , bgStyle , styles . darkMask ] }
244+ trailing = { < FormRow . Icon source = { getAssetIDByName ( "ic_arrow_right" ) } /> }
245+ />
246+
292247 { entireUIList }
293248 </ LinearGradient >
249+ < View style = { { height : 60 } } />
294250 </ ScrollView >
295251 </ > )
296252}
0 commit comments