Add back extension popup files

This commit is contained in:
SethBurkart123
2023-09-19 20:50:04 +10:00
parent 88df9ec157
commit f34d0a3e77
33 changed files with 71 additions and 104 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
+10
View File
@@ -0,0 +1,10 @@
export interface SettingsState {
notificationCollector: boolean;
lessonAlerts: boolean;
animatedBackground: boolean;
animatedBackgroundSpeed: boolean;
customThemeColor: string;
betterSEQTAPlus: boolean;
}
declare const App: React.FC;
export default App;

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

+6
View File
@@ -0,0 +1,6 @@
interface ColorPickerProps {
color: string;
onChange: (color: string) => void;
}
declare const Picker: ({ color, onChange }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
export default Picker;
+7
View File
@@ -0,0 +1,7 @@
import React from 'react';
import "./Slider.css";
interface Slider {
onValueChange: (value: number) => void;
}
declare const Slider: React.FC<Slider>;
export default Slider;
+7
View File
@@ -0,0 +1,7 @@
import "./Switch.css";
interface SwitchProps {
onChange: (isOn: boolean) => void;
state: boolean;
}
export default function Switch(props: SwitchProps): import("react/jsx-runtime").JSX.Element;
export {};
+11
View File
@@ -0,0 +1,11 @@
import React, { JSX } from 'react';
interface Tab {
title: string;
content: JSX.Element;
}
interface TabbedContainerProps {
tabs: Tab[];
themeColor: string;
}
declare const TabbedContainer: React.FC<TabbedContainerProps>;
export default TabbedContainer;
+1
View File
@@ -0,0 +1 @@
declare module '*.png';
+1
View File
@@ -0,0 +1 @@
declare module '*.png';
+1
View File
@@ -0,0 +1 @@
import './index.css';
+10
View File
@@ -0,0 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.js'
import './index.css'
ReactDOM.createRoot(document.getElementById('ExtensionPopup')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
+2
View File
@@ -0,0 +1,2 @@
declare const About: React.FC;
export default About;
+8
View File
@@ -0,0 +1,8 @@
import { SettingsState } from '../App';
interface SettingsProps {
settingsState: SettingsState;
switchChange: (key: string, isOn: boolean) => void;
colorChange: (color: string) => void;
}
declare const Settings: React.FC<SettingsProps>;
export default Settings;
@@ -1,6 +1,6 @@
import Switch from '../components/Switch'; import Switch from '../components/Switch';
import ColorPicker from '../components/ColorPicker'; import ColorPicker from '../components/ColorPicker';
import { SettingsState } from '../App'; import { SettingsState } from '../../../src/popup/App';
interface ISetting { interface ISetting {
title: string; title: string;
+1
View File
@@ -0,0 +1 @@
export default function Shortcuts(): import("react/jsx-runtime").JSX.Element;
+2
View File
@@ -0,0 +1,2 @@
declare const _default: import("vite").UserConfig;
export default _default;
-77
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-25
View File
@@ -1,25 +0,0 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.js'
import './index.css'
const mountNode = document.getElementById("ExtensionPopup");
const shadowRoot = mountNode!.attachShadow({ mode: "open" });
// Step 2: Inject styles into the shadow DOM
const styleLink = document.createElement('link');
styleLink.setAttribute('rel', 'stylesheet');
styleLink.setAttribute('href', 'chrome-extension://adkchjaapbfjofglfpenifpahonbnehk/index.css');
shadowRoot.appendChild(styleLink);
// Step 3: Create a div inside shadow root to serve as the React root
const reactRoot = document.createElement('div');
shadowRoot.appendChild(reactRoot);
const root = ReactDOM.createRoot(reactRoot);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
)