Added desktop site warning
This commit is contained in:
parent
97040b67d3
commit
5fca572263
2 changed files with 46 additions and 3 deletions
|
|
@ -10,14 +10,15 @@ from apps.knowledge.models import RoleRagDocument
|
||||||
from apps.onboarding.models import OnboardingSession
|
from apps.onboarding.models import OnboardingSession
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
mcp_meta_value = 'mcp_tool_meta'
|
||||||
|
|
||||||
def mcp_tool(name, description, input_schema):
|
def mcp_tool(name, description, input_schema):
|
||||||
def decorator(func):
|
def decorator(func):
|
||||||
func._mcp_tool_meta = {
|
setattr(func, mcp_meta_value, {
|
||||||
'name': name,
|
'name': name,
|
||||||
'description': description,
|
'description': description,
|
||||||
'inputSchema': input_schema,
|
'inputSchema': input_schema,
|
||||||
}
|
})
|
||||||
return func
|
return func
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
|
@ -26,7 +27,7 @@ def mcp_tool(name, description, input_schema):
|
||||||
def _collect_tools(class_namespace):
|
def _collect_tools(class_namespace):
|
||||||
tools = []
|
tools = []
|
||||||
for method_name, value in class_namespace.items():
|
for method_name, value in class_namespace.items():
|
||||||
metadata = getattr(value, '_mcp_tool_meta', None)
|
metadata = getattr(value, mcp_meta_value, None)
|
||||||
if not metadata:
|
if not metadata:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,14 @@ const user = userStore
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="mobile-block">
|
||||||
|
<div class="mobile-block__icon">🖥️</div>
|
||||||
|
<h2 class="mobile-block__title">Desktop only</h2>
|
||||||
|
<p class="mobile-block__body">
|
||||||
|
Dynavera is designed for desktop and laptop browsers. Please open this page on a larger screen.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Layout class="shell">
|
<Layout class="shell">
|
||||||
<Layout.Header class="shell-header">
|
<Layout.Header class="shell-header">
|
||||||
<div class="brand" @click="route.path !== '/' && router.push('/')">Dynavera</div>
|
<div class="brand" @click="route.path !== '/' && router.push('/')">Dynavera</div>
|
||||||
|
|
@ -353,4 +361,38 @@ const user = userStore
|
||||||
color: #1f2937;
|
color: #1f2937;
|
||||||
padding: 0 0.5rem;
|
padding: 0 0.5rem;
|
||||||
}
|
}
|
||||||
|
.mobile-block {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
background: #f5f7fb;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
.mobile-block__icon {
|
||||||
|
font-size: 3rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.mobile-block__title {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #1f2937;
|
||||||
|
margin: 0 0 0.75rem;
|
||||||
|
}
|
||||||
|
.mobile-block__body {
|
||||||
|
color: #6b7280;
|
||||||
|
font-size: 1rem;
|
||||||
|
max-width: 320px;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.mobile-block {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue