[Themes] Implement (#34)
* [Themes] Initial work * [Themes] Read from __vendetta_themes and early UI (#36) * [Themes] Read from `__vendetta_themes` * [Themes] Save as JSON and native theming * [Themes] Basic UI * [Themes] Merge processed theme data * [Themes] Import ReactNative from `@lib/preinit`, oraganize imports * [Themes] Some minor cleanup * [Themes] UI overhaul * [Themes] Minor adjustments * [Themes] Implement updates, make UI reactive-ish * [Themes] Move to new format * [Themes > UI] Last-minute ThemeCard changes * [Themes] Properly support AMOLED --------- Co-authored-by: Amsyar Rasyiq <82711525+amsyarasyiq@users.noreply.github.com>
This commit is contained in:
parent
7dc0b1286a
commit
85a83e4873
15 changed files with 464 additions and 132 deletions
|
@ -1,35 +0,0 @@
|
|||
import { clipboard, stylesheet } from "@metro/common";
|
||||
import { HTTP_REGEX } from "@lib/constants";
|
||||
import { installPlugin } from "@lib/plugins";
|
||||
import { showInputAlert } from "@ui/alerts";
|
||||
import { getAssetIDByName } from "@ui/assets";
|
||||
import { semanticColors } from "@ui/color";
|
||||
import { General } from "@ui/components";
|
||||
|
||||
const { TouchableOpacity, Image } = General;
|
||||
|
||||
const styles = stylesheet.createThemedStyleSheet({
|
||||
icon: {
|
||||
marginRight: 10,
|
||||
tintColor: semanticColors.HEADER_PRIMARY,
|
||||
}
|
||||
});
|
||||
|
||||
export default function InstallPluginButton() {
|
||||
return (
|
||||
<TouchableOpacity onPress={() =>
|
||||
clipboard.getString().then((content) =>
|
||||
showInputAlert({
|
||||
title: "Install Plugin",
|
||||
initialValue: HTTP_REGEX.test(content) ? content : "",
|
||||
placeholder: "https://example.com/",
|
||||
onConfirm: installPlugin,
|
||||
confirmText: "Install",
|
||||
confirmColor: undefined,
|
||||
cancelText: "Cancel"
|
||||
}))
|
||||
}>
|
||||
<Image style={styles.icon} source={getAssetIDByName("ic_add_24px")} />
|
||||
</TouchableOpacity >
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue