Skip to content

Commit

Permalink
Merge pull request #20 from thathoff/fix-disabling
Browse files Browse the repository at this point in the history
Release 1.2.2
  • Loading branch information
thathoff authored May 18, 2021
2 parents 515c1e3 + 116af85 commit 19d3001
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Parcel cache folder
.cache
.parcel-cache

# Composer files
/vendor
Expand Down
2 changes: 1 addition & 1 deletion index.js

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

7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import 'regenerator-runtime/runtime'
import LoginScreen from "./components/LoginScreen";

panel.plugin("thathoff/oauth", {
created: () => {
created: async () => {
const settings = await panel.app.$api.get("oauth/settings")
if (!settings.enabled) {
return
}

// always route back to panel home when trying to access installation view
if (panel?.app?.$route?.path === "/installation") {
panel.app.$go("/");
Expand Down

0 comments on commit 19d3001

Please sign in to comment.