Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelix1 authored Feb 29, 2024
1 parent 8d63b50 commit 726d452
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
33 changes: 33 additions & 0 deletions plugins/antied/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { semanticColors } from "@vendetta/ui";
import { showToast } from "@vendetta/ui/toasts";

const CustomColorPickerActionSheet = findByName("CustomColorPickerActionSheet");
const dialog = findByProps("show", "confirm", "close");

const { ScrollView, View, Text, TouchableOpacity, TextInput, Pressable, Image } = General;
const { FormLabel, FormIcon, FormArrow, FormRow, FormSwitch, FormSwitchRow, FormSection, FormDivider, FormInput, FormSliderRow } = Forms;
Expand Down Expand Up @@ -258,6 +259,38 @@ export default () => {
})
}
/>
{
(storage?.log?.length > 0) && (<>
<FormRow
label="Clear Logs"
trailing={<FormRow.Icon source={getAssetIDByName("ic_trash_24px")} />}
onPress={() => {
dialog.show({
title: "Clear logs",
body: "This will erase saved logs, continue?",
confirmText: "Yes",
cancelText: "No",
confirmColor: "brand",
onConfirm: () => {
storage.log = [];
showToast("[ANTIED] Logs cleared")
}
})
}}
/>
</>)
}
<FormRow
label="Clear Logs"
leading={<FormRow.Icon source={getAssetIDByName("ic_audit_log_24px")} />}
trailing={FormRow.Arrow}
onPress={() =>
navigation.push("VendettaCustomPage", {
title: "Antied Logging Page",
render: () => <LogPage/>,
})
}
/>

<FormRow
label='Customization'
Expand Down
4 changes: 3 additions & 1 deletion plugins/antied/pages/log.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export default () => {
</>) : (<>
<FormRow label="Only us chicken here, go touch some grass"/>
</>)
}
}
{
(log.length > 0) && (<>
<View style={styles.main_container}>
Expand All @@ -302,6 +302,8 @@ export default () => {
data={log}
renderItem={({ item }) => <MessageThing data={item} />}
removeClippedSubviews={true}
initialNumToRender={10}
maxToRenderPerBatch={20}
/>
</View>
</>)
Expand Down

0 comments on commit 726d452

Please sign in to comment.