Skip to content
This repository was archived by the owner on Jul 20, 2024. It is now read-only.

Commit 80206a7

Browse files
committed
move assets to root, add new features to botway ui app
1 parent fde3bb1 commit 80206a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1469
-846
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
cd ./installer
3333
cargo build --release
3434
cp $LINUX_TARGET_PATH/botway-installer ./installer-linux
35-
cp ./installer-linux ./assets/static/installers
35+
cp ./installer-linux ../assets/static/installers
3636
3737
# Build Botway OSX Installer
3838
git clone https://github.com/abdfnx/osxcross-alpine osxcross
@@ -48,7 +48,7 @@ jobs:
4848
LIBZ_SYS_STATIC=1 \
4949
cargo build --release --target x86_64-apple-darwin && \
5050
cp $DARWIN_TARGET_PATH/botway-installer ./installer-macos && \
51-
cp ./installer-macos ./assets/static/installers
51+
cp ./installer-macos ../assets/static/installers
5252
5353
- name: Upload to Deno Deploy
5454
uses: denoland/deployctl@v1

app/api/constants.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ export const ValidateProps = {
44
name: { type: "string", minLength: 1, maxLength: 50 },
55
password: { type: "string", minLength: 8 },
66
email: { type: "string", minLength: 1 },
7-
githubApiToken: { type: "string", minLength: 0, maxLength: 40 },
8-
railwayApiToken: { type: "string", minLength: 0, maxLength: 36 },
9-
renderApiToken: { type: "string", minLength: 0, maxLength: 32 },
10-
renderUserEmail: { type: "string", minLength: 0 },
7+
githubApiToken: { type: "string", maxLength: 40 },
8+
railwayApiToken: { type: "string", maxLength: 36 },
9+
renderApiToken: { type: "string", maxLength: 32 },
1110
isAdmin: { type: "boolean" },
1211
projects: { type: "array" },
1312
},
@@ -23,12 +22,14 @@ export const ValidateProps = {
2322
lang: { type: "string", minLength: 1, maxLength: 50 },
2423
packageManager: { type: "string", minLength: 1, maxLength: 50 },
2524
hostService: { type: "string", minLength: 1, maxLength: 50 },
26-
botToken: { type: "string", minLength: 0, maxLength: 100 },
27-
botAppToken: { type: "string", minLength: 0, maxLength: 100 },
28-
botSecretToken: { type: "string", minLength: 0, maxLength: 100 },
29-
railwayProjectId: { type: "string", minLength: 0, maxLength: 38 },
30-
railwayServiceId: { type: "string", minLength: 0, maxLength: 38 },
31-
railwayEnvId: { type: "string", minLength: 0, maxLength: 38 },
32-
renderProjectId: { type: "string", minLength: 0, maxLength: 24 },
25+
botToken: { type: "string", maxLength: 100 },
26+
botAppToken: { type: "string", maxLength: 100 },
27+
botSecretToken: { type: "string", maxLength: 100 },
28+
railwayProjectId: { type: "string", maxLength: 38 },
29+
railwayServiceId: { type: "string", maxLength: 38 },
30+
railwayEnvId: { type: "string", maxLength: 38 },
31+
renderServiceId: { type: "string", maxLength: 24 },
32+
repoBranch: { type: "string" },
33+
pullRequestPreviewsEnabled: { type: "string", maxLength: 3 },
3334
},
3435
};

app/api/db/project.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ export async function insertProject(
1818
railwayProjectId,
1919
railwayServiceId,
2020
railwayEnvId,
21-
renderProjectId,
21+
renderServiceId,
2222
icon,
2323
buildCommand,
2424
startCommand,
2525
rootDirectory,
26+
repoBranch,
27+
pullRequestPreviewsEnabled,
2628
}: any
2729
) {
2830
const project: any = {
@@ -40,11 +42,13 @@ export async function insertProject(
4042
railwayProjectId,
4143
railwayServiceId,
4244
railwayEnvId,
43-
renderProjectId,
45+
renderServiceId,
4446
icon,
4547
buildCommand,
4648
startCommand,
4749
rootDirectory,
50+
repoBranch,
51+
pullRequestPreviewsEnabled,
4852
createdAt: new Date(),
4953
};
5054

app/api/db/user.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export async function insertUser(
7070
githubApiToken,
7171
railwayApiToken,
7272
renderApiToken,
73-
renderUserEmail,
7473
}: any
7574
) {
7675
let user: any = {
@@ -82,7 +81,6 @@ export async function insertUser(
8281
githubApiToken,
8382
railwayApiToken,
8483
renderApiToken,
85-
renderUserEmail,
8684
projects: [],
8785
};
8886

app/components/Project/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const Project = ({ project, mutate, user }: any) => {
66
const [isOpen, setIsOpen] = useState(false);
77

88
const closeModal = () => {
9+
mutate();
910
setIsOpen(false);
1011
};
1112

0 commit comments

Comments
 (0)