refactor!: rename the project from Monitor to MoShiro [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful
ci/woodpecker/push/main-amd64-build Pipeline was successful
Namespaces, assemblies, solution, binaries, images, systemd units, config paths, environment variables, protocol methods and the Linux user are all renamed. Breaking: existing databases, node identities and installed units must be recreated.
This commit is contained in:
1 parent
27ac7fb787
commit
2e146d4da7
309 files changed
+1565
-1572
No files matched your search
@@ -685,7 +685,7 @@ export interface paths {
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/** Download a raw chunk (application/vnd.monitor.rawchunk) */
|
||||
/** Download a raw chunk (application/vnd.moshiro.rawchunk) */
|
||||
get: operations["raw_chunks_get"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* 数据源:前端默认和后端同源(Cookie 会话)。也可以指到别的后端(如本机跑前端、连线上的 `https://mo.oeo.one`):
|
||||
* 地址和令牌存在浏览器里(每个前端各存一份令牌),也可以用构建时的 `VITE_API_BASE` 给个默认地址。
|
||||
* 跨域时不带 Cookie,只用 `Authorization: Bearer <API 令牌>`;后端要在 `Monitor__CorsOrigins` 里放行这个前端的来源。
|
||||
* 跨域时不带 Cookie,只用 `Authorization: Bearer <API 令牌>`;后端要在 `MoShiro__CorsOrigins` 里放行这个前端的来源。
|
||||
*/
|
||||
|
||||
const BASE_KEY = 'monitor.api_base'
|
||||
const BASE_KEY = 'moshiro.api_base'
|
||||
|
||||
let app = 'app'
|
||||
|
||||
@@ -48,7 +48,7 @@ export interface SavedSource {
|
||||
}
|
||||
|
||||
// v2:以前保存的是手填的管理 Token,现在是登录后拿到的会话,旧的不再使用
|
||||
const listKey = () => `monitor.sources.v2.${app}`
|
||||
const listKey = () => `moshiro.sources.v2.${app}`
|
||||
|
||||
function readList(): SavedSource[] {
|
||||
try {
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ export function useTheme(): [Theme, () => void] {
|
||||
const next: Theme = theme === 'dark' ? 'light' : 'dark'
|
||||
document.documentElement.dataset.theme = next
|
||||
try {
|
||||
localStorage.setItem('monitor-theme', next)
|
||||
localStorage.setItem('moshiro-theme', next)
|
||||
} catch {
|
||||
// 存储不可用时只在本次会话生效
|
||||
}
|
||||
@@ -78,7 +78,7 @@ export function useTheme(): [Theme, () => void] {
|
||||
export function applyStoredTheme() {
|
||||
let theme: string | null = null
|
||||
try {
|
||||
theme = localStorage.getItem('monitor-theme')
|
||||
theme = localStorage.getItem('moshiro-theme')
|
||||
} catch {
|
||||
// 忽略
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ const shortHost = (base: string) => base.replace(/^https?:\/\//i, '')
|
||||
|
||||
/**
|
||||
* 数据源:默认连这个页面所在的后端(同源);也可以保存几个别的后端(比如本机跑前端、连线上的),在列表里点一下就切换。
|
||||
* 跨域时不用 Cookie,改用 API 令牌,所以每个后端各存一个令牌(只在浏览器里),后端需要放行这个页面的来源(`Monitor__CorsOrigins`)。
|
||||
* 跨域时不用 Cookie,改用 API 令牌,所以每个后端各存一个令牌(只在浏览器里),后端需要放行这个页面的来源(`MoShiro__CorsOrigins`)。
|
||||
*/
|
||||
export function SourceButton({ variant = 'icon' }: { variant?: 'icon' | 'status' }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
Reference in new issue
Block a user