Skip to content

Commit

Permalink
Merge pull request #259 from torusresearch/feat/add-mode
Browse files Browse the repository at this point in the history
update example
  • Loading branch information
arch1995 authored Sep 16, 2023
2 parents 9dba6a7 + 672b29c commit 7dc7ac2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
26 changes: 13 additions & 13 deletions examples/vue-example/package-lock.json

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

8 changes: 7 additions & 1 deletion examples/vue-example/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<label for="whitelabel">Enable whitelabel</label>
<input type="checkbox" id="whitelabel" name="whitelabel" v-model="isWhiteLabelEnabled" />
</div>
<select v-model="selectedBuildEnv" class="select">
<option :key="login" v-for="login in Object.values(BUILD_ENV)" :value="login">{{ login }}</option>
</select>
<select v-model="selectedOpenloginNetwork" class="select">
<option :key="login" v-for="login in Object.values(OPENLOGIN_NETWORK)" :value="login">{{ login }}</option>
</select>
Expand Down Expand Up @@ -105,6 +108,7 @@ import {
UX_MODE_TYPE,
OPENLOGIN_NETWORK,
OPENLOGIN_NETWORK_TYPE,
BUILD_ENV,
} from "@toruslabs/openlogin-utils";
import loginConfig from "./lib/loginConfig";

Expand Down Expand Up @@ -132,7 +136,9 @@ export default defineComponent({
UX_MODE: UX_MODE,
selectedUxMode: UX_MODE.REDIRECT as UX_MODE_TYPE,
OPENLOGIN_NETWORK: OPENLOGIN_NETWORK,
BUILD_ENV: BUILD_ENV,
selectedOpenloginNetwork: OPENLOGIN_NETWORK.SAPPHIRE_DEVNET as OPENLOGIN_NETWORK_TYPE,
selectedBuildEnv: BUILD_ENV.PRODUCTION,
};
},
async created() {
Expand Down Expand Up @@ -173,7 +179,7 @@ export default defineComponent({
uxMode: this.selectedUxMode,
whiteLabel: this.isWhiteLabelEnabled ? whitelabel : {},
loginConfig: loginConfig,
buildEnv: "testing",
buildEnv: this.selectedBuildEnv,
// sdkUrl: "https://staging.openlogin.com",
});
op.init();
Expand Down

0 comments on commit 7dc7ac2

Please sign in to comment.