@zvonimirsun/iszy-nuxt-auth-layer 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,7 +12,7 @@ const props = defineProps<{
|
|
|
12
12
|
const userStore = useUserStore()
|
|
13
13
|
const authFeatures = await userStore.getAuthFeatures()
|
|
14
14
|
const toast = useToast()
|
|
15
|
-
const publicRegister = computed(() => authFeatures.
|
|
15
|
+
const publicRegister = computed(() => authFeatures.publicRegister)
|
|
16
16
|
const loginPath = computed(() => `/login?redirect=${encodeURIComponent(props.loginRedirect || '/settings')}`)
|
|
17
17
|
const adminRoleNames = new Set([RoleEnum.ADMIN, RoleEnum.SUPERADMIN]) as Set<string>
|
|
18
18
|
const showAdminLink = computed(() => {
|
|
@@ -71,8 +71,8 @@ async function bind(type: ThirdPartyType, title = '绑定第三方登录', width
|
|
|
71
71
|
}
|
|
72
72
|
binding.value = true
|
|
73
73
|
window.addEventListener('message', bindCallback)
|
|
74
|
-
const top = (window.screen.height -
|
|
75
|
-
const left = (window.screen.width -
|
|
74
|
+
const top = (window.screen.height - height) / 2
|
|
75
|
+
const left = (window.screen.width - width) / 2
|
|
76
76
|
const page = window.open(`/api/oauth/${type}/bind`, title, `popup,width=${width},height=${height},top=${top},left=${left}`)
|
|
77
77
|
if (!page) {
|
|
78
78
|
binding.value = false
|
package/app/pages/login.vue
CHANGED
|
@@ -130,8 +130,8 @@ function thirdPartyLogin(url: string, title = '第三方登录', width = 500, he
|
|
|
130
130
|
loading.value = true
|
|
131
131
|
error.value = undefined
|
|
132
132
|
window.addEventListener('message', thirdPartyLoginCallback)
|
|
133
|
-
const top = (window.screen.height -
|
|
134
|
-
const left = (window.screen.width -
|
|
133
|
+
const top = (window.screen.height - height) / 2
|
|
134
|
+
const left = (window.screen.width - width) / 2
|
|
135
135
|
const page = window.open(url, title, `popup,width=${width},height=${height},top=${top},left=${left}`)
|
|
136
136
|
if (!page) {
|
|
137
137
|
loading.value = false
|