-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* realBrowser * update plasmo to 0.85.2 * Seperate firefox dev * fix instructor names not loading * move background file into background folder * add permission request tab * Pretty permissions tag * invoke popup on install * Host changes * add check for permissions when popup opens * clean up the styling on permission request popup * Remove console logs and empty className --------- Co-authored-by: Ethan Bickel <notethanbickel@gmail.com>
- Loading branch information
Showing
9 changed files
with
4,815 additions
and
3,581 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import '~/style.css'; | ||
|
||
import React, { useState } from 'react'; | ||
|
||
import { neededOrigins } from '~data/config'; | ||
|
||
const realBrowser = process.env.PLASMO_BROWSER === 'chrome' ? chrome : browser; | ||
|
||
function PermissionsPls() { | ||
const [granted, setGranted] = useState(false); | ||
|
||
return ( | ||
<div> | ||
<h1>Sk.edge needs permissions to run</h1> | ||
<p> | ||
We need access to Schedule Planner and the sources we get our data from. | ||
</p> | ||
<h2>Please click the button below to grant permissions.</h2> | ||
<button | ||
className="p-2 bg-blue-dark text-white rounded-lg" | ||
onClick={async () => { | ||
const response = await realBrowser.permissions.request({ | ||
origins: neededOrigins, | ||
}); | ||
if (response) { | ||
setGranted(true); | ||
} | ||
}} | ||
> | ||
Request permissions | ||
</button> | ||
{granted && ( | ||
<p> | ||
Thank you! | ||
<br /> You can close this window now. | ||
</p> | ||
)} | ||
</div> | ||
); | ||
} | ||
export default PermissionsPls; |