Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run multiple world at same time #246

Merged
merged 17 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5c63899
use the same ico with eventyay-talk
lcduong Jul 23, 2024
dea7ac3
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Jul 23, 2024
233ff24
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Jul 24, 2024
559f164
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Jul 26, 2024
d0f8839
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Jul 27, 2024
112ea46
Merge branch 'development' of github.com:lcduong/eventyay-video into …
odkhang Sep 17, 2024
ec412bf
update base path for webapp using basePath from config file
lcduong Sep 17, 2024
cf15dfd
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Sep 18, 2024
5c1d37f
Merge branch 'development' of github.com:odkhang/eventyay-video into …
lcduong Sep 23, 2024
5e8d586
Merge branch 'development' of github.com:odkhang/eventyay-video into …
lcduong Sep 25, 2024
4a48997
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Sep 26, 2024
4e161c7
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Oct 4, 2024
8aecb37
Merge branch 'development' of github.com:lcduong/eventyay-video into …
lcduong Oct 4, 2024
d8aba6e
update route to run multiple world at ssame time
lcduong Oct 7, 2024
016791f
fix upload avatar, default theme
lcduong Oct 7, 2024
1a53e72
correct link when click to logo
lcduong Oct 9, 2024
c9d3674
fix code style/lint/black/flake8
lcduong Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion server/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def _clear_db():


@pytest.fixture(autouse=True)
@pytest.mark.django_db
async def clear_database(request):
if "django_db" not in request.keywords: # pragma: no cover
return
Expand Down
3 changes: 1 addition & 2 deletions server/venueless/control/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class WorldAdminToken(AdminBase, DetailView):
success_url = "/control/worlds/"

def get(self, request, *args, **kwargs):
base_path = settings.BASE_PATH
world = self.get_object()
jwt_config = world.config["JWT_secrets"][0]
secret = jwt_config["secret"]
Expand All @@ -205,7 +204,7 @@ def get(self, request, *args, **kwargs):
action_type="world.adminaccess",
data={},
)
return redirect(f"https://{world.domain}{base_path}/#token={token}")
return redirect(f"https://{world.domain}#token={token}")


class FormsetMixin:
Expand Down
4 changes: 2 additions & 2 deletions server/venueless/storage/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from . import views

urlpatterns = [
path("upload/", views.UploadView.as_view(), name="upload"),
path("<str:world_id>/upload/", views.UploadView.as_view(), name="upload"),
path(
"schedule_import/",
"<str:world_id>/schedule_import/",
views.ScheduleImportView.as_view(),
name="schedule_import",
),
Expand Down
5 changes: 2 additions & 3 deletions server/venueless/storage/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import re
from io import BytesIO

from asgiref.sync import async_to_sync
Expand Down Expand Up @@ -34,8 +33,8 @@ def dispatch(self, request, *args, **kwargs):

@cached_property
def world(self):
world_domain = re.sub(r":\d+$", "", self.request.get_host())
return get_object_or_404(World, domain=world_domain)
world_id = self.kwargs.get("world_id", None)
return get_object_or_404(World, id=world_id)

@cached_property
def user(self):
Expand Down
11 changes: 7 additions & 4 deletions webapp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ if (ENV_DEVELOPMENT || !window.venueless) {
const hostname = window.location.hostname
const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
const httpProtocol = window.location.protocol
// Extract the world name from the URL path
const pathSegments = window.location.pathname.split('/')
const worldName = pathSegments.length > 2 ? pathSegments[2] : 'sample'
config = {
api: {
base: `${httpProtocol}//${hostname}:8443/api/v1/worlds/sample/`,
socket: `${wsProtocol}://${hostname}:8443/ws/world/sample/`,
upload: `${httpProtocol}//${hostname}:8443/storage/upload/`,
scheduleImport: `${httpProtocol}//${hostname}:8443/storage/schedule_import/`,
base: `${httpProtocol}//${hostname}:8443/api/v1/worlds/${worldName}/`,
socket: `${wsProtocol}://${hostname}:8443/ws/world/${worldName}/`,
upload: `${httpProtocol}//${hostname}:8443/storage/${worldName}/upload/`,
scheduleImport: `${httpProtocol}//${hostname}:8443/storage/${worldName}/schedule_import/`,
feedback: `${httpProtocol}//${hostname}:8443/_feedback/`,
},
defaultLocale: 'en',
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/AppBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template lang="pug">
.c-app-bar
bunt-icon-button(v-if="showActions", @click="$emit('toggleSidebar')", @touchend.native="$emit('toggleSidebar')") menu
router-link.logo(to="/", :class="{anonymous: isAnonymous}")
router-link.logo(:to="{name: 'home'}", :class="{anonymous: isAnonymous}")
img(:src="theme.logo.url", :alt="world.title")
.user(v-if="showUser")
p(v-if="isAnonymous") {{ $t('AppBar:user-anonymous') }}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/RoomsSidebar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template lang="pug">
transition(name="sidebar")
.c-rooms-sidebar(v-show="show && !snapBack", :style="style", role="navigation", @pointerdown="onPointerdown", @pointermove="onPointermove", @pointerup="onPointerup", @pointercancel="onPointercancel")
router-link.logo(to="/", v-if="$mq.above['m']", :class="{'fit-to-width': theme.logo.fitToWidth}")
router-link.logo(:to="{name: 'home'}", v-if="$mq.above['m']", :class="{'fit-to-width': theme.logo.fitToWidth}")
img(:src="theme.logo.url", :alt="world.title")
bunt-icon-button#btn-close-sidebar(v-else, @click="$emit('close')") menu
scrollbars(y)
Expand Down
Loading
Loading