改进 首次加载动画

This commit is contained in:
Twilight 2024-09-10 16:47:03 +08:00
parent 295f14e9f4
commit 3f5cfd34a8
4 changed files with 70 additions and 18 deletions

View File

@ -1,13 +1,69 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>amber-wails</title>
</head>
<body>
<div id="app"></div>
<script src="./src/main.ts" type="module"></script>
</body>
<style>
#default-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
</style>
</head>
<body>
<div id="app">
<div id="default-loader">
<div>
<svg
style="margin: 0 auto"
version="1.1"
id="first-loader"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
width="40px"
height="40px"
viewBox="0 0 40 40"
enable-background="new 0 0 40 40"
xml:space="preserve"
>
<path
opacity="0.2"
fill="#000"
d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634
c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"
/>
<path
fill="#000"
d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
C22.32,8.481,24.301,9.057,26.013,10.047z"
>
<animateTransform
attributeType="xml"
attributeName="transform"
type="rotate"
from="0 20 20"
to="360 20 20"
dur="0.5s"
repeatCount="indefinite"
/>
</path>
</svg>
<p>Amber AI</p>
</div>
</div>
</div>
<script src="./src/main.ts" type="module"></script>
</body>
</html>

View File

@ -2,8 +2,8 @@ const config = {
app_name: "Amber",
oauth_discovery_url:
"https://auth.leaflow.cn/.well-known/openid-configuration",
oauth_client_id: "90020",
oauth_callback_url: "amber-desktop://auth_callback",
oauth_client_id: "60021",
oauth_callback_url: "http://localhost:5173/auth/callback",
oauth_storage_key: "code_verifier",
oauth_scope: "openid profile",
backend: "http://localhost:8080",

View File

@ -2,7 +2,6 @@ const meta = document.createElement("meta");
meta.name = "naive-ui-style";
document.head.appendChild(meta);
import "./style.css";
import { createApp } from "vue";
@ -14,12 +13,9 @@ import "vfonts/Lato.css";
// 等宽字体
import "vfonts/FiraCode.css";
import App from "./App.vue";
import router from "./plugins/router";
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

View File

@ -1,9 +1,9 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import { createRouter, createWebHistory } from "vue-router";
import { routes } from 'vue-router/auto-routes'
import { setupLayouts } from 'virtual:generated-layouts'
const router = createRouter({
history: createWebHashHistory(),
history: createWebHistory(),
routes: setupLayouts(routes)
})