fix login screen
This commit is contained in:
parent
265129fd84
commit
7505a602b6
9
.idea/workspace.xml
generated
9
.idea/workspace.xml
generated
@ -5,13 +5,16 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="efee9cb0-966d-4623-845a-f3b0398ae3ab" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/app/assets/js/scripts/loginSkirda.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/app.ejs" beforeDir="false" afterPath="$PROJECT_DIR$/app/app.ejs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/assets/js/scripts/loginOptions.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/assets/js/scripts/loginOptions.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/assets/js/scripts/uibinder.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/assets/js/scripts/uibinder.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/assets/js/scripts/loginSkirdaDiscord.js" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/assets/js/scripts/skirda/auth/telegram.js" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/assets/lang/en_US.toml" beforeDir="false" afterPath="$PROJECT_DIR$/app/assets/lang/en_US.toml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/assets/lang/ru_RU.toml" beforeDir="false" afterPath="$PROJECT_DIR$/app/assets/lang/ru_RU.toml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/loginOptions.ejs" beforeDir="false" afterPath="$PROJECT_DIR$/app/loginOptions.ejs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/loginSkirdaTelegram.ejs" beforeDir="false" afterPath="$PROJECT_DIR$/app/loginSkirda.ejs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/loginSkirdaDiscord.ejs" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/loginSkirdaTelegram.ejs" beforeDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -35,8 +35,6 @@
|
||||
<%- include('loginOptions') %>
|
||||
<%- include('loginOffline') %>
|
||||
<%- include('loginSkirda') %>
|
||||
<%- include('loginSkirdaDiscord') %>
|
||||
<%- include('loginSkirdaTelegram') %>
|
||||
<%- include('settings') %>
|
||||
<%- include('landing') %>
|
||||
</div>
|
||||
|
BIN
app/assets/images/icons/skirda.png
Normal file
BIN
app/assets/images/icons/skirda.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 193 KiB |
@ -21,53 +21,54 @@ function loginOptionsCancelEnabled(val){
|
||||
$(loginOptionsCancelContainer).hide()
|
||||
}
|
||||
}
|
||||
|
||||
loginOptionMicrosoft.onclick = (e) => {
|
||||
switchView(getCurrentView(), VIEWS.waiting, 500, 500, () => {
|
||||
ipcRenderer.send(
|
||||
MSFT_OPCODE.OPEN_LOGIN,
|
||||
loginOptionsViewOnLoginSuccess,
|
||||
loginOptionsViewOnLoginCancel
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
loginOptionMojang.onclick = (e) => {
|
||||
switchView(getCurrentView(), VIEWS.login, 500, 500, () => {
|
||||
loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
loginCancelEnabled(true)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
loginOptionOffline.onclick = (e) => {
|
||||
switchView(getCurrentView(), VIEWS.loginOffline, 500, 500, () => {
|
||||
loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
loginCancelEnabled(true)
|
||||
})
|
||||
}
|
||||
|
||||
loginOptionSkirdaDiskord.onclick = (e) => {
|
||||
InitSkirdaDiscordLogin()
|
||||
switchView(getCurrentView(), VIEWS.loginSkirdaDiscord, 500, 500, () => {
|
||||
loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
loginCancelEnabled(true)
|
||||
})
|
||||
}
|
||||
|
||||
loginOptionSkirdaTelegram.onclick = (e) => {
|
||||
InitSkirdaTelegramAuth()
|
||||
switchView(getCurrentView(), VIEWS.loginSkirdaTelegram, 500, 500, () => {
|
||||
loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
// loginCancelEnabled(true)
|
||||
})
|
||||
}
|
||||
//
|
||||
// loginOptionMicrosoft.onclick = (e) => {
|
||||
// switchView(getCurrentView(), VIEWS.waiting, 500, 500, () => {
|
||||
// ipcRenderer.send(
|
||||
// MSFT_OPCODE.OPEN_LOGIN,
|
||||
// loginOptionsViewOnLoginSuccess,
|
||||
// loginOptionsViewOnLoginCancel
|
||||
// )
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// loginOptionMojang.onclick = (e) => {
|
||||
// switchView(getCurrentView(), VIEWS.login, 500, 500, () => {
|
||||
// loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
// loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
// loginCancelEnabled(true)
|
||||
// })
|
||||
// }
|
||||
//
|
||||
//
|
||||
// loginOptionOffline.onclick = (e) => {
|
||||
// switchView(getCurrentView(), VIEWS.loginOffline, 500, 500, () => {
|
||||
// loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
// loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
// loginCancelEnabled(true)
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// loginOptionSkirdaDiskord.onclick = (e) => {
|
||||
// InitSkirdaDiscordLogin()
|
||||
// switchView(getCurrentView(), VIEWS.loginSkirdaDiscord, 500, 500, () => {
|
||||
// loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
// loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
// loginCancelEnabled(true)
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// loginOptionSkirdaTelegram.onclick = (e) => {
|
||||
// InitSkirdaTelegramAuth()
|
||||
// switchView(getCurrentView(), VIEWS.loginSkirdaTelegram, 500, 500, () => {
|
||||
// loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
// loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
// // loginCancelEnabled(true)
|
||||
// })
|
||||
// }
|
||||
|
||||
loginOptionSkirdaAuth.onclick = (e) => {
|
||||
console.log("aaaa")
|
||||
switchView(getCurrentView(), VIEWS.loginSkirdaAuth, 500, 500, () => {
|
||||
loginViewOnSuccess = loginOptionsViewOnLoginSuccess
|
||||
loginViewOnCancel = loginOptionsViewOnLoginCancel
|
||||
|
@ -1,223 +0,0 @@
|
||||
// const http = require('http')
|
||||
// const fs = require('fs')
|
||||
// const {addSkirdaAccount} = require('configmanager')
|
||||
// const auth_api_url = 'http://192.168.88.10:8083'
|
||||
// const auth_api_url = 'http://localhost:8083'
|
||||
const ConfigManager = require('../configmanager')
|
||||
const {MojangRestAPI} = require('helios-core/mojang')
|
||||
const {RestResponseStatus} = require('helios-core/common')
|
||||
const auth_api_url = 'http://skirda.brzezinski.ru'
|
||||
|
||||
function uuidv4() {
|
||||
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, c =>
|
||||
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
|
||||
)
|
||||
}
|
||||
|
||||
class SkirdaAuth {
|
||||
/**
|
||||
* @typedef {Object} DiscordRedirectAuth
|
||||
* @property {string} redirectUrl how the person is called
|
||||
* @property {string} requestId how many years the person lived
|
||||
*
|
||||
* @return {Promise<DiscordRedirectAuth | string>}
|
||||
* */
|
||||
static temp_installId = uuidv4()
|
||||
|
||||
static async Init() {
|
||||
const resp = await fetch(`${auth_api_url}/v1/auth/discord/init?installId=${SkirdaAuth.temp_installId}`)
|
||||
|
||||
if (resp.statusCode !== 200) {
|
||||
return await resp.text()
|
||||
}
|
||||
|
||||
return await resp.json()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param requestId {string} Request id from init route
|
||||
// * @param timeout {number} Timeout to poll in seconds
|
||||
* @return {SkirdaUserResp | string} Result of OAuth login
|
||||
*/
|
||||
static async CyclePolling(requestId) {
|
||||
for (let i = 0; i < 15; i++) {
|
||||
const resp = await SkirdaAuth._poll(requestId)
|
||||
|
||||
switch (resp.status) {
|
||||
case 204:
|
||||
await SkirdaAuth._sleep(4000)
|
||||
continue
|
||||
case 200:
|
||||
return await resp.json()
|
||||
default:
|
||||
console.error(await resp.text())
|
||||
return 'TODO error'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} SkYggAuthResponse
|
||||
* @property {string} ClientToken
|
||||
* @property {string} AccessToken
|
||||
* @property {YggProfile} Profile
|
||||
*
|
||||
* @typedef {Object} YggProfile
|
||||
* @property {string} name
|
||||
* @property {string} UUID
|
||||
*
|
||||
* @param jwtToken {string} JWT Token for auth
|
||||
* @return {YggProfile | string} Result of auth
|
||||
*/
|
||||
static async YggdrasilAuth(jwtToken) {
|
||||
const resp = await fetch(`${auth_api_url}/yggdrasil/skirda/authenticate`, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': jwtToken
|
||||
}
|
||||
})
|
||||
|
||||
if (resp.statusCode !== 200) {
|
||||
return await resp.text()
|
||||
}
|
||||
|
||||
return await resp.json()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} SkirdaUserResp
|
||||
* @property skirdaUserId {string}
|
||||
* @property username {string}
|
||||
* @property token {string}
|
||||
*
|
||||
* @param requestId {string}
|
||||
* @return {Response}
|
||||
* */
|
||||
static async _poll(requestId) {
|
||||
return await fetch(`${auth_api_url}/v1/auth/discord/periodicPolling?installId=${SkirdaAuth.temp_installId}&requestId=${requestId}`)
|
||||
}
|
||||
|
||||
static _sleepSetTimeout_ctrl
|
||||
|
||||
/**
|
||||
* @param ms {number}
|
||||
* @return {boolean}
|
||||
*/
|
||||
static async _sleep(ms) {
|
||||
clearInterval(this._sleepSetTimeout_ctrl)
|
||||
return new Promise(resolve => this._sleepSetTimeout_ctrl = setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
static async ValidateAccount(jwtToken) {
|
||||
const resp = await fetch(`${auth_api_url}/auth/refresh`, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': jwtToken
|
||||
}
|
||||
})
|
||||
// console.log(resp, resp.statusCode)
|
||||
return resp.status === 200
|
||||
}
|
||||
|
||||
static async ValidateSelected() {
|
||||
const current = ConfigManager.getSelectedAccount()
|
||||
if (current === null) {
|
||||
return false
|
||||
}
|
||||
|
||||
const resp = await fetch(`${auth_api_url}/auth/refresh`, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': jwtToken
|
||||
}
|
||||
})
|
||||
if (resp.status !== 200) {
|
||||
return false
|
||||
}
|
||||
const result = await resp.json()
|
||||
|
||||
return result !== null
|
||||
|
||||
// const response = await MojangRestAPI.validate(current.accessToken, ConfigManager.getClientToken())
|
||||
// const isValid = response.data
|
||||
// if (!result) {
|
||||
// const refreshResponse = await MojangRestAPI.refresh(current.accessToken, ConfigManager.getClientToken())
|
||||
// if (refreshResponse.responseStatus === RestResponseStatus.SUCCESS) {
|
||||
// const session = refreshResponse.data
|
||||
// ConfigManager.updateMojangAuthAccount(current.uuid, session.accessToken)
|
||||
// ConfigManager.save()
|
||||
// } else {
|
||||
// log.error('Error while validating selected profile:', refreshResponse.error)
|
||||
// log.info('Account access token is invalid.')
|
||||
// return false
|
||||
// }
|
||||
// log.info('Account access token validated.')
|
||||
// return true
|
||||
// } else {
|
||||
// log.info('Account access token validated.')
|
||||
// return true
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// const skAuth = new SkirdaDiscordAuth()
|
||||
const loginSkirdaDiscordButton = document.getElementById('loginSkirdaDiscordInitAuth')
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
* */
|
||||
async function InitSkirdaDiscordLogin() {
|
||||
const res = await SkirdaAuth.Init()
|
||||
let redir
|
||||
try {
|
||||
redir = JSON.parse(res)
|
||||
} catch (e) {
|
||||
SpawnError(Lang.queryJS('login.error.unknown'))
|
||||
return
|
||||
}
|
||||
|
||||
// console.log(redir)
|
||||
|
||||
const resOpenUrl = await shell.openExternal(redir.redirectUrl)
|
||||
|
||||
const skirdaAuth = await SkirdaAuth.CyclePolling(redir.requestId)
|
||||
//TODO validate resp
|
||||
// console.log(skirdaAuth)
|
||||
|
||||
if (typeof skirdaAuth.token !== 'string') {
|
||||
SpawnError(Lang.queryJS('login.error.unknown'))
|
||||
return
|
||||
}
|
||||
|
||||
const yggAuth = await SkirdaAuth.YggdrasilAuth(skirdaAuth.token)
|
||||
let yggAuthRes
|
||||
try {
|
||||
yggAuthRes = JSON.parse(yggAuth)
|
||||
} catch (e) {
|
||||
SpawnError(Lang.queryJS('login.error.unknown'))
|
||||
return
|
||||
}
|
||||
// console.log(yggAuthRes)
|
||||
|
||||
|
||||
AuthManager.addSkirdaAccount(yggAuthRes.profile.id, skirdaAuth.token, skirdaAuth.skirdaUserId, yggAuthRes.profile.name, skirdaAuth.token).then((value) => {
|
||||
updateSelectedAccount(value)
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
switchView(VIEWS.loginSkirdaDiscord, VIEWS.landing, 500, 500)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
function SpawnError(actualDisplayableError) {
|
||||
setOverlayContent(actualDisplayableError.title, actualDisplayableError.desc, Lang.queryJS('login.tryAgain'))
|
||||
setOverlayHandler(() => {
|
||||
formDisabled(false)
|
||||
toggleOverlay(false)
|
||||
})
|
||||
toggleOverlay(true)
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
const sk_tg_auth_api_url = 'https://skirda.brzezinski.ru/auth'
|
||||
|
||||
/**@typedef {Object} SkirdaTelegramAuthInitResponse
|
||||
* @property {string} redirect_url
|
||||
* @property {string} subscribe_url
|
||||
* */
|
||||
|
||||
/** @typedef {Object} SkirdaTelegramAuthResultResponse
|
||||
* @property {string} name
|
||||
* @property {string} sk_user_id
|
||||
* @property {string} token
|
||||
**/
|
||||
|
||||
/**@typedef {Object} YggdrasilProfile
|
||||
* @property {string} id
|
||||
* @property {string} name
|
||||
*/
|
||||
|
||||
/**@typedef {Object} SkirdaYggdrasilAuthResponse
|
||||
* @property {YggdrasilProfile} profile
|
||||
*/
|
||||
|
||||
class skirdaTelegramAuth {
|
||||
/**
|
||||
* @return SkirdaTelegramAuthInitResponse
|
||||
* */
|
||||
async init() {
|
||||
const resp = await fetch(`${sk_tg_auth_api_url}/telegram/init`, {})
|
||||
try {
|
||||
if (!resp.ok) {
|
||||
throw new Error(`Response status: ${resp.status}`)
|
||||
}
|
||||
|
||||
// console.log(await resp.json())
|
||||
return await resp.json()
|
||||
} catch (error) {
|
||||
console.error(error.message)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} in_sub_url
|
||||
* @return SkirdaTelegramAuthResultResponse
|
||||
* */
|
||||
async subscribe(in_sub_url) {
|
||||
const resp = await fetch(in_sub_url, {})
|
||||
try {
|
||||
if (!resp.ok) {
|
||||
throw new Error(`Response status: ${resp.status}`)
|
||||
}
|
||||
return await resp.json()
|
||||
} catch (error) {
|
||||
console.error(error.message)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} jwtToken
|
||||
* @return SkirdaYggdrasilAuthResponse
|
||||
* */
|
||||
async yggdrasilAuth(jwtToken) {
|
||||
const ygg_auth_api_url = 'https://skirda.brzezinski.ru'
|
||||
const resp = await fetch(`${ygg_auth_api_url}/yggdrasil/skirda/authenticate`, {
|
||||
headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
'Authorization': jwtToken
|
||||
}
|
||||
})
|
||||
|
||||
try {
|
||||
return await resp.json()
|
||||
} catch (error) {
|
||||
console.error(error.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function InitSkirdaTelegramAuth() {
|
||||
const auth = new skirdaTelegramAuth()
|
||||
|
||||
const initResp = await auth.init()
|
||||
if (initResp === null) {
|
||||
console.error('tg auth init failed')
|
||||
return
|
||||
}
|
||||
console.log(initResp)
|
||||
await shell.openExternal(initResp.redirect_url)
|
||||
|
||||
const authResult = await auth.subscribe(initResp.subscribe_url)
|
||||
console.log(authResult)
|
||||
|
||||
const yggResp = await auth.yggdrasilAuth(authResult.token)
|
||||
// console.log(yggResp)
|
||||
// console.log(yggResp.profile)
|
||||
|
||||
AuthManager.addSkirdaAccount(yggResp.profile.id, authResult.token, authResult.name, authResult.name, authResult.token).then((value) => {
|
||||
console.log(value)
|
||||
updateSelectedAccount(value)
|
||||
}).then((value) => {
|
||||
switchView(VIEWS.loginSkirdaTelegram, VIEWS.landing, 500, 500, async () => {
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ loginPasswordDisclaimer2 = "{appName} is not affiliated with Mojang AB."
|
||||
loginOptionsTitle = "Login Options"
|
||||
loginWithMicrosoft = "Login with Microsoft"
|
||||
loginWithMojang = "Login with Mojang"
|
||||
loginWithSkirda = "Login with Skirda"
|
||||
cancelButton = "Cancel"
|
||||
|
||||
[ejs.overlay]
|
||||
|
@ -20,7 +20,7 @@ newsErrorNoneSpan = "No News"
|
||||
mapButton = "КАРТА"
|
||||
|
||||
[ejs.login]
|
||||
loginCancelText = "Отминет"
|
||||
loginCancelText = "Отмена"
|
||||
loginSubheader = "ОФИЦИАЛЬНАЯ АВТОРИЗАЦИЯ"
|
||||
loginEmailError = "* Неправильное значение"
|
||||
loginEmailPlaceholder = "ПОЧТА ИЛИ НИКНЕЙМ"
|
||||
@ -39,7 +39,8 @@ loginPasswordDisclaimer2 = "{appName} не имеет ничего общего
|
||||
loginOptionsTitle = "Опции входа"
|
||||
loginWithMicrosoft = "Зайти с помощью Microsoft"
|
||||
loginWithMojang = "Зайти с помощью Mojang"
|
||||
cancelButton = "Отминет"
|
||||
loginWithSkirda = "Зайти с помощью Skirda"
|
||||
cancelButton = "Отмена"
|
||||
|
||||
[ejs.overlay]
|
||||
serverSelectHeader = "Доступные сервера"
|
||||
|
@ -5,87 +5,18 @@
|
||||
<div class="loginOptionActions">
|
||||
<div class="loginOptionButtonContainer">
|
||||
<button id="loginOptionSkirdaAuth" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 23 23">
|
||||
<path fill="#f35325" d="M1 1h10v10H1z" />
|
||||
<path fill="#81bc06" d="M12 1h10v10H12z" />
|
||||
<path fill="#05a6f0" d="M1 12h10v10H1z" />
|
||||
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
||||
</svg>
|
||||
<!-- FIXME -->
|
||||
<!-- <span><%- lang('loginOptions.loginWithSkirdaTelegram') %></span>-->
|
||||
<span>Skirda</span>
|
||||
<img class="fit-picture"
|
||||
src="assets/images/icons/skirda.png"
|
||||
alt="Grapefruit slice atop a pile of other slices"
|
||||
style="width: 44px; height: 44px;"/>
|
||||
<span><%- lang('loginOptions.loginWithSkirda') %></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="loginOptionButtonContainer">
|
||||
<button id="loginOptionSkirdaTelegram" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 23 23">
|
||||
<path fill="#f35325" d="M1 1h10v10H1z" />
|
||||
<path fill="#81bc06" d="M12 1h10v10H12z" />
|
||||
<path fill="#05a6f0" d="M1 12h10v10H1z" />
|
||||
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
||||
</svg>
|
||||
<!-- FIXME -->
|
||||
<!-- <span><%- lang('loginOptions.loginWithSkirdaTelegram') %></span>-->
|
||||
<span>Telegram</span>
|
||||
</button>
|
||||
<div id="loginOptionCancelContainer" style="display: none;">
|
||||
<button id="loginOptionCancelButton"><%- lang('loginOptions.cancelButton') %></button>
|
||||
</div>
|
||||
<div class="loginOptionButtonContainer" style="display: none;">
|
||||
<button id="loginOptionMicrosoft" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 23 23">
|
||||
<path fill="#f35325" d="M1 1h10v10H1z" />
|
||||
<path fill="#81bc06" d="M12 1h10v10H12z" />
|
||||
<path fill="#05a6f0" d="M1 12h10v10H1z" />
|
||||
<path fill="#ffba08" d="M12 12h10v10H12z" />
|
||||
</svg>
|
||||
<span><%- lang('loginOptions.loginWithMicrosoft') %></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="loginOptionButtonContainer" style="display: none;">
|
||||
<button id="loginOptionMojang" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 9.677 9.667">
|
||||
<path d="M-26.332-12.098h2.715c-1.357.18-2.574 1.23-2.715 2.633z" fill="#fff" />
|
||||
<path d="M2.598.022h7.07L9.665 7c-.003 1.334-1.113 2.46-2.402 2.654H0V2.542C.134 1.2 1.3.195 2.598.022z" fill="#db2331" />
|
||||
<path d="M1.54 2.844c.314-.76 1.31-.46 1.954-.528.785-.083 1.503.272 2.1.758l.164-.9c.327.345.587.756.964 1.052.28.254.655-.342.86-.013.42.864.408 1.86.54 2.795l-.788-.373C6.9 4.17 5.126 3.052 3.656 3.685c-1.294.592-1.156 2.65.06 3.255 1.354.703 2.953.51 4.405.292-.07.42-.34.87-.834.816l-4.95.002c-.5.055-.886-.413-.838-.89l.04-4.315z" fill="#fff" />
|
||||
</svg>
|
||||
<span><%- lang('loginOptions.loginWithMojang') %></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="loginOptionButtonContainer">
|
||||
<!-- <div class="loginOptionButtonContainer" style="display: none;">-->
|
||||
<button id="loginOptionOffline" class="loginOptionButton">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 9.677 9.667">
|
||||
<path d="M-26.332-12.098h2.715c-1.357.18-2.574 1.23-2.715 2.633z" fill="#fff" />
|
||||
<path d="M2.598.022h7.07L9.665 7c-.003 1.334-1.113 2.46-2.402 2.654H0V2.542C.134 1.2 1.3.195 2.598.022z" fill="#db2331" />
|
||||
<path d="M1.54 2.844c.314-.76 1.31-.46 1.954-.528.785-.083 1.503.272 2.1.758l.164-.9c.327.345.587.756.964 1.052.28.254.655-.342.86-.013.42.864.408 1.86.54 2.795l-.788-.373C6.9 4.17 5.126 3.052 3.656 3.685c-1.294.592-1.156 2.65.06 3.255 1.354.703 2.953.51 4.405.292-.07.42-.34.87-.834.816l-4.95.002c-.5.055-.886-.413-.838-.89l.04-4.315z" fill="#fff" />
|
||||
</svg>
|
||||
<!-- <span><%- lang('loginOptions.loginWithMojang') %></span> -->
|
||||
<span>Offline</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Авторизация через Discord -->
|
||||
<div class="loginOptionButtonContainer">
|
||||
<button id="loginOptionSkirdaDiscord" class="loginOptionButton">
|
||||
<svg width="22" height="22" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 11.6C2 8.23969 2 6.55953 2.65396 5.27606C3.2292 4.14708 4.14708 3.2292 5.27606 2.65396C6.55953 2 8.23969 2 11.6 2H20.4C23.7603 2 25.4405 2 26.7239 2.65396C27.8529 3.2292 28.7708 4.14708 29.346 5.27606C30 6.55953 30 8.23969 30 11.6V20.4C30 23.7603 30 25.4405 29.346 26.7239C28.7708 27.8529 27.8529 28.7708 26.7239 29.346C25.4405 30 23.7603 30 20.4 30H11.6C8.23969 30 6.55953 30 5.27606 29.346C4.14708 28.7708 3.2292 27.8529 2.65396 26.7239C2 25.4405 2 23.7603 2 20.4V11.6Z" fill="white"/>
|
||||
<path d="M23.6361 9.33998C22.212 8.71399 20.6892 8.25903 19.0973 8C18.9018 8.33209 18.6734 8.77875 18.5159 9.13408C16.8236 8.89498 15.1469 8.89498 13.4857 9.13408C13.3283 8.77875 13.0946 8.33209 12.8974 8C11.3037 8.25903 9.77927 8.71565 8.35518 9.3433C5.48276 13.4213 4.70409 17.3981 5.09342 21.3184C6.99856 22.6551 8.84487 23.467 10.66 23.9983C11.1082 23.4189 11.5079 22.8029 11.8523 22.1536C11.1964 21.9195 10.5683 21.6306 9.9748 21.2951C10.1323 21.1856 10.2863 21.071 10.4351 20.9531C14.0551 22.5438 17.9881 22.5438 21.5649 20.9531C21.7154 21.071 21.8694 21.1856 22.0251 21.2951C21.4299 21.6322 20.8 21.9211 20.1442 22.1553C20.4885 22.8029 20.8865 23.4205 21.3364 24C23.1533 23.4687 25.0013 22.6567 26.9065 21.3184C27.3633 16.7738 26.1261 12.8335 23.6361 9.33998ZM12.3454 18.9075C11.2587 18.9075 10.3676 17.9543 10.3676 16.7937C10.3676 15.6331 11.2397 14.6783 12.3454 14.6783C13.4511 14.6783 14.3422 15.6314 14.3232 16.7937C14.325 17.9543 13.4511 18.9075 12.3454 18.9075ZM19.6545 18.9075C18.5678 18.9075 17.6767 17.9543 17.6767 16.7937C17.6767 15.6331 18.5488 14.6783 19.6545 14.6783C20.7602 14.6783 21.6514 15.6314 21.6323 16.7937C21.6323 17.9543 20.7602 18.9075 19.6545 18.9075Z" fill="#5865F2"/>
|
||||
</svg>
|
||||
<span>Дискорд</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Авторизация через FIDO (неактивна) -->
|
||||
<div class="loginOptionButtonContainer">
|
||||
<button id="loginOptionSkirdaFIDO" class="loginOptionButton" style="color: gray; background: rgb(0 0 0 / 0%);cursor: not-allowed;">
|
||||
<svg width="22" height="22" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 32 32" viewBox="0 0 32 32" id="fidoalliance"><path fill="#FFF9DD" d="M26,32H6c-3.314,0-6-2.686-6-6V6c0-3.314,2.686-6,6-6h20c3.314,0,6,2.686,6,6v20C32,29.314,29.314,32,26,32z"></path><path fill="#FFD200" d="M21.845 14.904c-1.37 0-2.268.874-2.268 2.247 0 1.373.95 2.182 2.19 2.182 1.134 0 2.233-.707 2.233-2.26C23.999 15.8 23.137 14.904 21.845 14.904zM21.802 18.388L21.802 18.388c-.567-.001-.87-.542-.87-1.272 0-.622.246-1.264.87-1.264.594 0 .841.636.841 1.258C22.643 17.882 22.314 18.388 21.802 18.388zM8.817 19.235h1.31v-3.256h.817v-.962h-.817v-.51c-.001-.014-.001-.029-.001-.045 0-.168.06-.321.159-.441l-.001.001-.001.001c.014-.015.027-.029.042-.041l.001-.001.001-.001c0 0 .282-.279.947-.095h.001l.324-1.087c-.072-.025-.159-.049-.25-.067l-.012-.002-.013-.002c-.167-.039-.359-.063-.556-.063-.003 0-.006 0-.01 0 0 0 0 0-.001 0-.001 0-.002 0-.004 0-.251 0-.494.038-.724.106-.092.027-.171.06-.247.099-.173.088-.321.195-.45.321-.341.333-.514.785-.514 1.342v.481H8v.963h.817V19.235z"></path><path fill="#FFD200" d="M10.019,12.775l-0.018,0.005c0.009-0.003,0.02-0.004,0.029-0.007c0.003-0.001,0.004-0.002,0.007-0.003L10.019,12.775z"></path><polygon fill="#FFD200" points="9.778 12.874 9.771 12.877 9.783 12.872 9.786 12.87"></polygon><path fill="#FFE777" d="M13.352,14.426c0.408,0,0.739-0.329,0.74-0.736v-0.001c0-0.407-0.331-0.737-0.74-0.737c-0.408,0-0.74,0.33-0.74,0.737C12.612,14.095,12.944,14.426,13.352,14.426z"></path><polygon fill="#FFE777" points="11.37 15.98 12.698 15.98 12.698 19.236 13.178 19.236 13.178 17.386 13.525 17.386 13.525 19.236 14.009 19.236 14.009 15.017 11.37 15.017"></polygon><path fill="#FFD200" d="M16.496,14.904c-1.015,0-1.907,0.832-1.899,2.255c0,1.315,0.805,2.175,1.813,2.175c0.543,0,1.064-0.245,1.319-0.707l0.08,0.607h1.138v-6.188h-1.318l0.001,2.336h-0.015C17.418,15.098,17.026,14.904,16.496,14.904z M17.629,17.354c0,0.104-0.008,0.206-0.022,0.306c-0.075,0.361-0.391,0.627-0.77,0.627h-0.009c-0.543,0-0.899-0.448-0.899-1.17c0-0.664,0.304-1.201,0.906-1.201c0.413,0,0.697,0.297,0.776,0.643c0.01,0.061,0.016,0.132,0.016,0.204l-0.001,0.036L17.629,17.354z"></path></svg>
|
||||
<span>FIDO (сейчас недоступно)</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loginOptionCancelContainer" style="display: none;">
|
||||
<button id="loginOptionCancelButton"><%- lang('loginOptions.cancelButton') %></button>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./assets/js/scripts/loginOptions.js"></script>
|
||||
</div>
|
||||
<script src="./assets/js/scripts/loginOptions.js"></script>
|
||||
</div>
|
@ -1,42 +0,0 @@
|
||||
<div id="loginSkirdaDiscordContainer" style="display: none;" class="Centered">
|
||||
|
||||
<!--Окно открытия браузера (ожидание ответа)-->
|
||||
<div id="loginSkirdaAuthorizationWindow" >
|
||||
<div id="settingsAboutCurrentContent" class="Centered">
|
||||
<div id="settingsAboutCurrentHeadline">
|
||||
<img id="settingsAboutLogo" src="./assets/images/SealCircle.png">
|
||||
<span id="settingsAboutTitle">Authorize through Skirda Discord</span>
|
||||
</div>
|
||||
<div id="settingsAboutCurrentVersion" class="Centered">
|
||||
<span>Мы открыли браузер для дальнейшей авторизации через Discord</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsAboutButtons">
|
||||
<span id="loginSkirdaAuthorizationNote">В случае, если это не произошло, откройте его самостоятельно</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Ошибка-->
|
||||
<!-- <div id="loginSkirdaAuthorizationWindow">-->
|
||||
<!-- <div id="settingsAboutCurrentContent" class="Centered">-->
|
||||
<!-- <div id="settingsAboutCurrentHeadline">-->
|
||||
<!-- <img id="settingsAboutLogo" src="./assets/images/SealCircle.png">-->
|
||||
<!-- <span id="settingsAboutTitle">Authorize through Skirda Discord</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div id="settingsAboutCurrentVersion" class="Centered">-->
|
||||
<!-- <span>Ошибка при авторизации :(</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="settingsAboutCurrentContent">-->
|
||||
<!-- <button id="loginSkirdaAuthorizationRetryButton">Повторить</button>-->
|
||||
<!-- <button class="settingsAuthAccountLogOut" style="opacity: 100%;">Отменить</button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- <div id="settingsAboutButtons">-->
|
||||
<!-- <span id="loginSkirdaAuthorizationNote">Не получается? Обратитесь к администрации проекта за помощью</span>-->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<script src="./assets/js/scripts/loginSkirdaDiscord.js"></script>
|
@ -1,42 +0,0 @@
|
||||
<div id="loginSkirdaTelegramContainer" style="display: none;" class="Centered">
|
||||
|
||||
<!--Окно открытия браузера (ожидание ответа)-->
|
||||
<div id="loginSkirdaAuthorizationWindow">
|
||||
<div id="settingsAboutCurrentContent" class="Centered">
|
||||
<div id="settingsAboutCurrentHeadline">
|
||||
<img id="settingsAboutLogo" src="./assets/images/SealCircle.png">
|
||||
<span id="settingsAboutTitle">Authorize through Skirda Discord</span>
|
||||
</div>
|
||||
<div id="settingsAboutCurrentVersion" class="Centered">
|
||||
<span>Мы открыли браузер для дальнейшей авторизации через DiscordAAAAAAAAAAA</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settingsAboutButtons">
|
||||
<span id="loginSkirdaAuthorizationNote">В случае, если это не произошло, откройте его самостоятельно</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Ошибка-->
|
||||
<!-- <div id="loginSkirdaAuthorizationWindow">-->
|
||||
<!-- <div id="settingsAboutCurrentContent" class="Centered">-->
|
||||
<!-- <div id="settingsAboutCurrentHeadline">-->
|
||||
<!-- <img id="settingsAboutLogo" src="./assets/images/SealCircle.png">-->
|
||||
<!-- <span id="settingsAboutTitle">Authorize through Skirda Discord</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div id="settingsAboutCurrentVersion" class="Centered">-->
|
||||
<!-- <span>Ошибка при авторизации :(</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="settingsAboutCurrentContent">-->
|
||||
<!-- <button id="loginSkirdaAuthorizationRetryButton">Повторить</button>-->
|
||||
<!-- <button class="settingsAuthAccountLogOut" style="opacity: 100%;">Отменить</button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- <div id="settingsAboutButtons">-->
|
||||
<!-- <span id="loginSkirdaAuthorizationNote">Не получается? Обратитесь к администрации проекта за помощью</span>-->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<script src="./assets/js/scripts/skirda/auth/telegram.js"></script>
|
Loading…
x
Reference in New Issue
Block a user