Skip to content

Commit 8e023b0

Browse files
authored
Merge pull request #3 from hchen2020/main
Allow more customization.
2 parents 66ce702 + 273e427 commit 8e023b0

File tree

19 files changed

+79
-44
lines changed

19 files changed

+79
-44
lines changed

.env

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# Public
2-
PUBLIC_SERVICE_URL=https://botsharp.azurewebsites.net
2+
PUBLIC_SERVICE_URL=https://botsharp.azurewebsites.net
3+
PUBLIC_LOGO_URL=/images/logo.png
4+
PUBLIC_LOGIN_IMAGE=/images/profile-img.png
5+
PUBLIC_FAVICON_URL=/icons/favicon.ico
6+
PUBLIC_BRAND_NAME=BotSharp
7+
PUBLIC_ADMIN_USERNAME=admin@gmail.com
8+
PUBLIC_ADMIN_PASSWORD=123456
9+
PUBLIC_COMPANY_NAME=SciSharp STACK

src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
5+
<!--<link rel="icon" href="%sveltekit.assets%/icons/favicon.ico" />-->
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
%sveltekit.head%
88
</head>

src/lib/common/HeadTitle.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<script>
2+
import {PUBLIC_FAVICON_URL, PUBLIC_BRAND_NAME} from '$env/static/public'
23
export let title = 'Home';
34
</script>
45

56
<svelte:head>
6-
<title>{title} | BotSharp - Admin & Dashboard</title>
7+
<link rel="icon" type="image/x-icon" href={PUBLIC_FAVICON_URL}>
8+
<title>{title} | {PUBLIC_BRAND_NAME} - Admin & Dashboard</title>
79
</svelte:head>

src/lib/drawflow/drawflow.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.drawflow .drawflow-node {
2-
background: rgb(128, 0, 128);
2+
background: var(--bs-primary);
33
color: white;
44
}
55

66
.drawflow .drawflow-node.selected {
7-
background: rgb(0, 200, 50);
7+
background: var(--bs-success);
88
}

src/lib/helpers/datetime.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export function format(datetime, type = 'date') {
77
if (type == 'date') {
88
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
99
return date.toLocaleString(undefined, options);
10+
} else if (type == 'short-date') {
11+
const options = { year: 'numeric', month: 'short', day: 'numeric' };
12+
return date.toLocaleString(undefined, options);
1013
} else if (type == 'time') {
1114
const options = { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' };
1215
return date.toLocaleString(undefined, options);

src/lib/helpers/types.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
* @typedef {Object} AgentFilter
6464
* @property {boolean} [isRouter]
6565
* @property {boolean} [isEvaluator]
66+
* @property {boolean} [allowRouting]
6667
*/
6768

6869
/**
@@ -73,6 +74,7 @@
7374
* @property {string} instruction - System prompt
7475
* @property {boolean} disabled
7576
* @property {boolean} is_public
77+
* @property {boolean} is_router
7678
* @property {string} icon_url - Icon
7779
* @property {boolean} allow_routing
7880
* @property {Date} created_datetime
@@ -100,9 +102,9 @@
100102
/**
101103
* @typedef {Object} ConversationFilter
102104
* @property {Pagination} pager - Pagination
103-
* @property {string?} agentId - The agent id.
104-
* @property {string?} channel - The conversation channel.
105-
* @property {string?} status - The conversation status.
105+
* @property {string?} [agentId] - The agent id.
106+
* @property {string?} [channel] - The conversation channel.
107+
* @property {string?} [status] - The conversation status.
106108
*/
107109

108110
/**

src/routes/(authentication)/login/+page.svelte

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@
1515
import Headtitle from '$lib/common/HeadTitle.svelte';
1616
import { getToken } from '$lib/services/auth-service.js'
1717
import { goto } from '$app/navigation';
18+
import {
19+
PUBLIC_LOGO_URL,
20+
PUBLIC_LOGIN_IMAGE,
21+
PUBLIC_BRAND_NAME,
22+
PUBLIC_ADMIN_USERNAME,
23+
PUBLIC_ADMIN_PASSWORD,
24+
PUBLIC_COMPANY_NAME
25+
} from '$env/static/public';
1826
19-
let username = 'admin@gmail.com';
20-
let password = '123456';
27+
let username = PUBLIC_ADMIN_USERNAME;
28+
let password = PUBLIC_ADMIN_PASSWORD;
2129
let isOpen = false;
2230
let msg = '';
2331
let status = '';
@@ -44,11 +52,11 @@
4452
<Col class="col-7">
4553
<div class="text-primary p-4">
4654
<h5 class="text-primary">Welcome Back !</h5>
47-
<p>Sign in to continue to BotSharp.</p>
55+
<p>Sign in to continue to {PUBLIC_BRAND_NAME}.</p>
4856
</div>
4957
</Col>
5058
<Col class="col-5 align-self-end">
51-
<img src='/images/profile-img.png' alt="" class="img-fluid" />
59+
<img src={PUBLIC_LOGIN_IMAGE} alt="" class="img-fluid" />
5260
</Col>
5361
</Row>
5462
</div>
@@ -57,14 +65,14 @@
5765
<Link href="/dashboard" class="auth-logo-light">
5866
<div class="avatar-md profile-user-wid mb-4">
5967
<span class="avatar-title rounded-circle bg-light">
60-
<img src='/images/logo.png' alt="" class="rounded-circle" height="55" />
68+
<img src={PUBLIC_LOGO_URL} alt="" class="rounded-circle" height="55" />
6169
</span>
6270
</div>
6371
</Link>
6472
<Link href="/dashboard" class="auth-logo-dark">
6573
<div class="avatar-md profile-user-wid mb-4">
6674
<span class="avatar-title rounded-circle bg-light">
67-
<img src='/images/logo.png' alt="" class="rounded-circle" height="55" />
75+
<img src={PUBLIC_LOGO_URL} alt="" class="rounded-circle" height="55" />
6876
</span>
6977
</div>
7078
</Link>
@@ -149,7 +157,7 @@
149157
<Link href="/register" class="fw-medium text-primary">Signup now</Link>
150158
</p>
151159
<p>
152-
© {new Date().getFullYear()} SciSharp STACK. Crafted with
160+
© {new Date().getFullYear()} {PUBLIC_COMPANY_NAME}. Crafted with
153161
<i class="mdi mdi-heart text-danger" /> by open source community
154162
</p>
155163
</div>

src/routes/(authentication)/recoverpw/+page.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import Link from 'svelte-link';
33
import { Row, Col, CardBody, Card, Container, Form, Label, Input, Button, Alert } from '@sveltestrap/sveltestrap';
44
import Headtitle from '$lib/common/HeadTitle.svelte';
5+
import { PUBLIC_LOGO_URL, PUBLIC_COMPANY_NAME } from '$env/static/public';
56
</script>
67

78
<Headtitle title="Recover Password" />
@@ -29,7 +30,7 @@
2930
<Link href="/dashboard">
3031
<div class="avatar-md profile-user-wid mb-4">
3132
<span class="avatar-title rounded-circle bg-light">
32-
<img src='/images/logo.png' alt="" class="rounded-circle" height="34" />
33+
<img src={PUBLIC_LOGO_URL} alt="" class="rounded-circle" height="34" />
3334
</span>
3435
</div>
3536
</Link>
@@ -66,8 +67,8 @@
6667
<Link href="/login" class="fw-medium text-primary">Sign In here</Link>
6768
</p>
6869
<p>
69-
© {new Date().getFullYear()} SciSharp STACK. Crafted with
70-
<i class="mdi mdi-heart text-danger" /> by SciSharp STACK
70+
© {new Date().getFullYear()} {PUBLIC_COMPANY_NAME}. Crafted with
71+
<i class="mdi mdi-heart text-danger" /> by Open Source community
7172
</p>
7273
</div>
7374
</Col>

src/routes/(authentication)/register/+page.svelte

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { Row, Col, CardBody, Card, Container, Form, Label, Input, Button, Alert } from '@sveltestrap/sveltestrap';
44
import Headtitle from '$lib/common/HeadTitle.svelte';
55
import { goto } from '$app/navigation';
6+
import { PUBLIC_LOGO_URL, PUBLIC_COMPANY_NAME } from '$env/static/public';
67
78
let username = '';
89
let emailid = '';
@@ -65,7 +66,7 @@
6566
<Col class="col-7">
6667
<div class="text-primary p-4">
6768
<h5 class="text-primary">Free Register</h5>
68-
<p>Get your free SciSharp account now.</p>
69+
<p>Get your free account now.</p>
6970
</div>
7071
</Col>
7172
<Col class="col-5 align-self-end">
@@ -78,7 +79,7 @@
7879
<Link href="/dashboard">
7980
<div class="avatar-md profile-user-wid mb-4">
8081
<span class="avatar-title rounded-circle bg-light">
81-
<img src='/images/logo.png' alt="" class="rounded-circle" height="34" />
82+
<img src={PUBLIC_LOGO_URL} alt="" class="rounded-circle" height="34" />
8283
</span>
8384
</div>
8485
</Link>
@@ -155,7 +156,7 @@
155156

156157
<div class="mt-4 text-center">
157158
<p class="mb-0">
158-
By registering you agree to the SciSharp <Link href="#" class="text-primary"
159+
By registering you agree to the <Link href="#" class="text-primary"
159160
>Terms of Use</Link
160161
>
161162
</p>
@@ -170,8 +171,8 @@
170171
<Link href="/login" class="fw-medium text-primary">Login</Link>
171172
</p>
172173
<p>
173-
© {new Date().getFullYear()} SciSharp STACK. Crafted with
174-
<i class="mdi mdi-heart text-danger" /> by SciSharp STACK
174+
© {new Date().getFullYear()} {PUBLIC_COMPANY_NAME}. Crafted with
175+
<i class="mdi mdi-heart text-danger" /> by Open Source community
175176
</p>
176177
</div>
177178
</Col>

src/routes/(home)/+page.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
import Link from "svelte-link";
33
import { Container, Row, Col } from '@sveltestrap/sveltestrap';
44
import HeadTitle from "$lib/common/HeadTitle.svelte";
5+
import { PUBLIC_LOGO_URL, PUBLIC_BRAND_NAME } from '$env/static/public';
56
</script>
67

7-
<HeadTitle title="BotSharp Workspace" />
8+
<HeadTitle title="{PUBLIC_BRAND_NAME} Workspace" />
89

910
<div class="home-btn d-none d-sm-block">
1011
<Link href="/" class="text-dark">
1112
<img
12-
src="/images/logo.png"
13+
src={PUBLIC_LOGO_URL}
1314
alt="logo"
1415
height="50"
1516
class="auth-logo-dark mx-auto"
@@ -29,7 +30,7 @@
2930
</div>
3031
</Col>
3132
</Row>
32-
<h4 class="mt-5">Let&#39;s <a href="/login">get started</a> with BotSharp</h4>
33+
<h4 class="mt-5">Let&#39;s <a href="/login">get started</a> with {PUBLIC_BRAND_NAME}</h4>
3334
<p class="text-muted">
3435
A central workspace for building, testing and evaluating your AI Agents.
3536
</p>

0 commit comments

Comments
 (0)