Make request GET method and fix fullscreen
This commit is contained in:
@@ -26,6 +26,7 @@ body{
|
|||||||
--risu-theme-textcolor2: #64748b;
|
--risu-theme-textcolor2: #64748b;
|
||||||
--risu-theme-darkborderc: #4b5563;
|
--risu-theme-darkborderc: #4b5563;
|
||||||
--risu-theme-darkbutton: #374151;
|
--risu-theme-darkbutton: #374151;
|
||||||
|
--risu-height-size: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ body{
|
|||||||
}
|
}
|
||||||
|
|
||||||
html, body{
|
html, body{
|
||||||
height: 100%
|
height: var(--risu-height-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
.chattext p{
|
.chattext p{
|
||||||
|
|||||||
@@ -169,12 +169,7 @@ export async function characterURLImport() {
|
|||||||
url.searchParams.delete('realm');
|
url.searchParams.delete('realm');
|
||||||
window.history.pushState(null, '', url.toString());
|
window.history.pushState(null, '', url.toString());
|
||||||
|
|
||||||
const res = await fetch(`${hubURL}/hub/info`,{
|
const res = await fetch(`${hubURL}/hub/info/${realmPath}`)
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify({
|
|
||||||
id: realmPath
|
|
||||||
})
|
|
||||||
})
|
|
||||||
if(res.status !== 200){
|
if(res.status !== 200){
|
||||||
alertError(await res.text())
|
alertError(await res.text())
|
||||||
return
|
return
|
||||||
@@ -826,13 +821,7 @@ export async function downloadRisuHub(id:string) {
|
|||||||
type: "wait",
|
type: "wait",
|
||||||
msg: "Downloading..."
|
msg: "Downloading..."
|
||||||
})
|
})
|
||||||
const res = await fetch(hubURL + '/hub/get', {
|
const res = await fetch(hubURL + '/hub/get/' + id)
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify({
|
|
||||||
id: id,
|
|
||||||
apiver: 3
|
|
||||||
})
|
|
||||||
})
|
|
||||||
if(res.status !== 200){
|
if(res.status !== 200){
|
||||||
alertError(await res.text())
|
alertError(await res.text())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ export function setDatabase(data:Database){
|
|||||||
data.modules ??= []
|
data.modules ??= []
|
||||||
data.enabledModules ??= []
|
data.enabledModules ??= []
|
||||||
data.additionalParams ??= []
|
data.additionalParams ??= []
|
||||||
|
data.heightMode ??= 0
|
||||||
|
|
||||||
changeLanguage(data.language)
|
changeLanguage(data.language)
|
||||||
DataBase.set(data)
|
DataBase.set(data)
|
||||||
@@ -602,6 +603,7 @@ export interface Database{
|
|||||||
sideMenuRerollButton?:boolean
|
sideMenuRerollButton?:boolean
|
||||||
requestInfoInsideChat?:boolean
|
requestInfoInsideChat?:boolean
|
||||||
additionalParams:[string, string][]
|
additionalParams:[string, string][]
|
||||||
|
heightMode:number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface customscript{
|
export interface customscript{
|
||||||
|
|||||||
@@ -1560,13 +1560,9 @@ export function textifyReadableStream(stream:ReadableStream<Uint8Array>){
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function toggleFullscreen(){
|
export function toggleFullscreen(){
|
||||||
// @ts-ignore
|
|
||||||
const requestFullscreen = document.documentElement.requestFullscreen ?? document.documentElement.webkitRequestFullscreen as typeof document.documentElement.requestFullscreen
|
const fullscreenElement = document.fullscreenElement
|
||||||
// @ts-ignore
|
fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen({
|
||||||
const exitFullscreen = document.exitFullscreen ?? document.webkitExitFullscreen as typeof document.exitFullscreen
|
|
||||||
// @ts-ignore
|
|
||||||
const fullscreenElement = document.fullscreenElement ?? document.webkitFullscreenElement as typeof document.fullscreenElement
|
|
||||||
fullscreenElement ? exitFullscreen() : requestFullscreen({
|
|
||||||
navigationUI: "hide"
|
navigationUI: "hide"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user