Skip to content

Commit

Permalink
chore: code and shared module position
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonghakseo committed Apr 7, 2024
1 parent 25fe94c commit f63dc6e
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 28 deletions.
3 changes: 1 addition & 2 deletions packages/popup/src/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ const Popup = () => {
backgroundColor: theme === 'light' ? '#eee' : '#222',
}}>
<header className="App-header" style={{ color: theme === 'light' ? '#222' : '#eee' }}>
{/*TODO: ADD asset managing module or some other solution */}
<img src={chrome.runtime.getURL('newtab/logo.svg')} className="App-logo" alt="logo" />

<p>
Edit <code>packages/popup/src/Popup.tsx</code> and save to reload.
Edit <code>pages/popup/src/Popup.tsx</code> and save to reload.
</p>
<a
className="App-link"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion pages/content-ui/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ export default function App() {
console.log('content ui loaded');
}, []);

return <div className="">content view</div>;
return (
<div>
Edit <code>pages/content-ui/src/app.tsx</code> and save to reload.
</div>
);
}
4 changes: 2 additions & 2 deletions pages/devtools-panel/src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

const Panel = () => {
const theme = useStorageSuspense(exampleThemeStorage);
console.log(chrome.runtime.getURL('logo.svg'));

return (
<div
className="App"
Expand All @@ -18,7 +18,7 @@ const Panel = () => {
<header className="App-header" style={{ color: theme === 'light' ? '#222' : '#eee' }}>
<img src={chrome.runtime.getURL('devtools-panel/logo.svg')} className="App-logo" alt="logo" />
<p>
Edit <code>packages/devtools-panel/src/Panel.tsx</code> and save to reload.
Edit <code>pages/devtools-panel/src/Panel.tsx</code> and save to reload.
</p>
<a
className="App-link"
Expand Down
1 change: 1 addition & 0 deletions pages/devtools/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
try {
console.log("Edit 'pages/devtools/src/index.ts' and save to reload.");
chrome.devtools.panels.create('Dev Tools', 'icon-34.png', 'devtools-panel/index.html');
} catch (e) {
console.error(e);
Expand Down
3 changes: 1 addition & 2 deletions pages/newtab/src/Newtab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ const Newtab = () => {
backgroundColor: theme === 'light' ? '#eee' : '#222',
}}>
<header className="App-header" style={{ color: theme === 'light' ? '#222' : '#eee' }}>
{/*TODO: ADD asset managing module or some other solution */}
<img src={chrome.runtime.getURL('newtab/logo.svg')} className="App-logo" alt="logo" />
<p>
Edit <code>packages/newtab/src/Newtab.tsx</code> and save to reload.
Edit <code>pages/newtab/src/Newtab.tsx</code> and save to reload.
</p>
<a
className="App-link"
Expand Down
10 changes: 9 additions & 1 deletion pages/options/src/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ const Options = () => {
style={{
backgroundColor: theme === 'light' ? '#eee' : '#222',
}}>
{/*TODO: ADD asset managing module or some other solution */}
<img src={chrome.runtime.getURL('options/logo.svg')} className="App-logo" alt="logo" />
<span style={{ color: theme === 'light' ? '#0281dc' : undefined, marginBottom: '10px' }}>Options</span>
Edit <code>pages/options/src/Options.tsx</code> and save to reload.
<button
style={{
backgroundColor: theme === 'light' ? '#eee' : '#222',
color: theme === 'light' ? '#222' : '#eee',
}}
onClick={exampleThemeStorage.toggle}>
Toggle Theme
</button>
</div>
);
};
Expand Down
3 changes: 1 addition & 2 deletions pages/sidepanel/src/SidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ const SidePanel = () => {
backgroundColor: theme === 'light' ? '#eee' : '#222',
}}>
<header className="App-header" style={{ color: theme === 'light' ? '#222' : '#eee' }}>
{/*TODO: ADD asset managing module or some other solution */}
<img src={chrome.runtime.getURL('sidepanel/logo.svg')} className="App-logo" alt="logo" />
<p>
Edit <code>packages/sidepanel/src/SidePanel.tsx</code> and save to reload.
Edit <code>pages/sidepanel/src/SidePanel.tsx</code> and save to reload.
</p>
<a
className="App-link"
Expand Down
36 changes: 18 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f63dc6e

Please sign in to comment.