mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 22:53:08 +08:00
v0.2.1
client: fix APP_URL usage
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "client",
|
||||
"private": true,
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
|
||||
@@ -19,7 +19,6 @@ import { getAppUrl } from "@/lib/config.ts";
|
||||
import { extractPageSlugId } from "@/lib";
|
||||
import { treeApiAtom } from "@/features/page/tree/atoms/tree-api-atom.ts";
|
||||
import { useDeletePageModal } from "@/features/page/hooks/use-delete-page-modal.tsx";
|
||||
import { boolean } from "zod";
|
||||
|
||||
interface PageHeaderMenuProps {
|
||||
readOnly?: boolean;
|
||||
|
||||
@@ -7,13 +7,11 @@ declare global {
|
||||
export function getAppUrl(): string {
|
||||
let appUrl = window.CONFIG?.APP_URL || process.env.APP_URL;
|
||||
|
||||
if (!appUrl) {
|
||||
appUrl = import.meta.env.DEV
|
||||
? "http://localhost:3000"
|
||||
: window.location.protocol + "//" + window.location.host;
|
||||
if (import.meta.env.DEV) {
|
||||
return appUrl || "http://localhost:3000";
|
||||
}
|
||||
|
||||
return appUrl;
|
||||
return `${window.location.protocol}//${window.location.host}`;
|
||||
}
|
||||
|
||||
export function getBackendUrl(): string {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "server",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "docmost",
|
||||
"homepage": "https://docmost.com",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nx run-many -t build",
|
||||
|
||||
Reference in New Issue
Block a user