Remove checkOldDomain function
This commit is contained in:
@@ -7,7 +7,7 @@ import { get } from "svelte/store";
|
||||
import {open} from '@tauri-apps/api/shell'
|
||||
import { DataBase, loadedStore, setDatabase, type Database, defaultSdDataFunc } from "./database";
|
||||
import { appWindow } from "@tauri-apps/api/window";
|
||||
import { checkOldDomain, checkUpdate } from "../update";
|
||||
import { checkUpdate } from "../update";
|
||||
import { botMakerMode, selectedCharID } from "../stores";
|
||||
import { Body, ResponseType, fetch as TauriFetch } from "@tauri-apps/api/http";
|
||||
import { loadPlugins } from "../plugins/plugins";
|
||||
@@ -453,7 +453,6 @@ export async function loadData() {
|
||||
else{
|
||||
usingSw = false
|
||||
}
|
||||
checkOldDomain()
|
||||
if(get(DataBase).didFirstSetup){
|
||||
characterURLImport()
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import { language } from "../lang";
|
||||
import { get } from "svelte/store";
|
||||
import {open} from '@tauri-apps/api/shell'
|
||||
|
||||
const isOldDomain = location.hostname.includes('pages.dev')
|
||||
|
||||
export async function checkUpdate(){
|
||||
try {
|
||||
let db = get(DataBase)
|
||||
@@ -50,32 +48,4 @@ function versionStringToNumber(versionString:string):number {
|
||||
.map((component) => component.padStart(4, "0"))
|
||||
.join("")
|
||||
);
|
||||
}
|
||||
|
||||
export function checkOldDomain(){
|
||||
let db = get(DataBase)
|
||||
if(isOldDomain){
|
||||
if(!db.didFirstSetup){
|
||||
location.href = 'https://risuai.xyz'
|
||||
alertMd("Redirecting...")
|
||||
return
|
||||
}
|
||||
if(db.language === 'ko'){
|
||||
alertMd("# 웹 버전 RisuAI의 도메인이 **risuai.xyz**로 변경되었습니다"
|
||||
+ "\n\nRisuAI의 현재 도메인 risu.pages.dev는 클라우드플레어의 기본 도메인으로, 뭔가를 하기 힘든 구조입니다. 그래서 도메인을 옮기기로 했습니다."
|
||||
+ "\n\n현재 도메인인 risu.pages.dev은 언젠가 셧다운됩니다."
|
||||
+ "\n\n**브라우저는 교차 도메인 저장소를 허용하지 않으므로 설정에서 Google 드라이브에 백업/로드해서 데이터를 옮기거나 새 도메인으로 수동으로 옮겨야합니다. 그렇지 않은 경우 이 도메인이 셧다운 될 때, 데이터는 영원히 사라집니다.**"
|
||||
+ "\n\n[새로운 도메인 링크](https://risuai.xyz/)."
|
||||
)
|
||||
}
|
||||
else{
|
||||
alertMd("# Web version RisuAI's domain has transfered to **risuai.xyz**"
|
||||
+ "\n\nRisuAI's domain risu.pages.dev is cloudflare's default domain name, which we can't do something freely. so we decided to move to another domain."
|
||||
+ "\n\nThe current domain risu.pages.dev will be shut downed eventually."
|
||||
+ "\n\n**Browsers doesn't allow cross-domain storage so you should migrate datas by backuping/loading to google drive in settings or migrate manually to new domain. if not, when this domain shuts down: YOUR DATA WILL BE GONE FOREVER.**"
|
||||
+ "\n\n[Link to new domain](https://risuai.xyz/)."
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user