Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 6 additions & 49 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Python Linting and Formatting
on: [push]

jobs:
pylint:
name: Pylint
ruff:
name: Ruff (Linting & Formatting)
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -22,52 +22,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r test_requirements.txt
- name: Analysing the code with pylint
- name: Run ruff linter
run: |
pylint $(git ls-files '*.py') --output-format github

black:
name: Black
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r test_requirements.txt
- name: Check code formatting with black
run: |
black --check $(git ls-files '*.py')

isort:
name: isort
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r test_requirements.txt
- name: Check import sorting with isort
ruff check $(git ls-files '*.py') --output-format github
- name: Run ruff formatter
run: |
isort --check $(git ls-files '*.py') --profile=black
ruff format --check $(git ls-files '*.py')
10 changes: 5 additions & 5 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "0.18.0",
"version": "0.18.1",
"private": true,
"scripts": {
"build": "vite build",
Expand Down
3 changes: 1 addition & 2 deletions client/src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';

Vue.use(VueRouter);

const routes = [
{
path: '/',
name: 'home',
component: HomeView,
component: () => import('../views/HomeView.vue'),
meta: { requiresAuth: false },
},
{
Expand Down
7 changes: 6 additions & 1 deletion client/src/vue_components/show/config/cues/CueEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,14 @@ export default {
DATA: {},
});
},
decrPage() {
async decrPage() {
if (this.currentEditPage > 1) {
const targetPage = this.currentEditPage - 1;
// Load target page from backend
await this.LOAD_SCRIPT_PAGE(targetPage);
this.currentEditPage--;
// Pre-load previous page
await this.LOAD_SCRIPT_PAGE(this.currentEditPage - 1);
}
},
async incrPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
>
<i
class="viewable-line"
:class="{'cut-line-part': linePartCuts.indexOf(line.line_parts[0].id) !== -1}"
:style="stageDirectionStyling"
>
<template
Expand Down Expand Up @@ -159,6 +160,7 @@
>
<i
class="viewable-line"
:class="{'cut-line-part': linePartCuts.indexOf(line.line_parts[0].id) !== -1}"
:style="stageDirectionStyling"
>
<template
Expand Down
7 changes: 5 additions & 2 deletions client/src/vue_components/show/config/script/ScriptEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,11 @@ export default {
},
async decrPage() {
if (this.currentEditPage > 1) {
if (!Object.keys(this.TMP_SCRIPT).includes((this.currentEditPage - 1).toString())) {
this.ADD_BLANK_PAGE(this.currentEditPage - 1);
const targetPage = this.currentEditPage - 1;
// Load from backend if not in buffer
if (!Object.keys(this.TMP_SCRIPT).includes(targetPage.toString())) {
await this.LOAD_SCRIPT_PAGE(targetPage);
this.ADD_BLANK_PAGE(targetPage);
}
if (this.TMP_SCRIPT[this.currentEditPageKey].length === 0) {
this.REMOVE_PAGE(this.currentEditPage);
Expand Down
29 changes: 29 additions & 0 deletions client/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@ export default defineConfig({
outDir: '../server/static/',
assetsDir: './assets',
emptyOutDir: true,
rollupOptions: {
output: {
manualChunks(id) {
// Only chunk node_modules, ignore CommonJS entry points
if (id.includes('node_modules') && !id.includes('?commonjs-entry')) {
// Bootstrap and its dependencies
if (id.includes('bootstrap-vue') || id.includes('/bootstrap/')) {
return 'bootstrap-vendor';
}
// Core Vue ecosystem
if (id.includes('/vue/') || id.includes('vue-router') ||
id.includes('/vuex/') || id.includes('vuex-persistedstate')) {
return 'vue-vendor';
}
// Utilities (lodash uses specific imports)
if (id.includes('/lodash/') || id.includes('loglevel') ||
id.includes('deep-object-diff') || id.includes('contrast-color')) {
return 'utils-vendor';
}
// WebSocket
if (id.includes('vue-native-websocket')) {
return 'websocket-vendor';
}
// Everything else from node_modules goes to a general vendor chunk
return 'vendor';
}
},
},
},
},
resolve: {
alias: [
Expand Down
1 change: 0 additions & 1 deletion server/controllers/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

@ApiRoute("auth/create", ApiVersion.V1)
class UserCreateController(BaseAPIController):

async def post(self):
data = escape.json_decode(self.request.body)

Expand Down
3 changes: 0 additions & 3 deletions server/controllers/api/rbac.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ async def get(self):

@ApiRoute("rbac/user/roles", ApiVersion.V1)
class RBACUserRolesHandler(BaseAPIController):

@api_authenticated
async def get(self):
with self.make_session() as session:
Expand All @@ -117,7 +116,6 @@ async def get(self):

@ApiRoute("rbac/user/roles/grant", ApiVersion.V1)
class RBACRolesGrantHandler(BaseAPIController):

@api_authenticated
@require_admin
async def post(self):
Expand Down Expand Up @@ -175,7 +173,6 @@ async def post(self):

@ApiRoute("rbac/user/roles/revoke", ApiVersion.V1)
class RBACRolesRevokeHandler(BaseAPIController):

@api_authenticated
@require_admin
async def post(self):
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/api/show/acts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

@ApiRoute("show/act", ApiVersion.V1)
class ActController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down Expand Up @@ -212,7 +211,6 @@ async def delete(self):

@ApiRoute("show/act/first_scene", ApiVersion.V1)
class FirstSceneController(BaseAPIController):

@requires_show
@no_live_session
async def post(self):
Expand Down
1 change: 0 additions & 1 deletion server/controllers/api/show/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@ApiRoute("show/cast", ApiVersion.V1)
class CastController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/api/show/characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@ApiRoute("show/character", ApiVersion.V1)
class CharacterController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down Expand Up @@ -222,7 +221,6 @@ async def get(self):

@ApiRoute("show/character/group", ApiVersion.V1)
class CharacterGroupController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/api/show/cues.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

@ApiRoute("show/cues/types", ApiVersion.V1)
class CueTypesController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down Expand Up @@ -165,7 +164,6 @@ async def delete(self):

@ApiRoute("show/cues", ApiVersion.V1)
class CueController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/api/show/microphones.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@ApiRoute("show/microphones", ApiVersion.V1)
class MicrophoneController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down Expand Up @@ -181,7 +180,6 @@ async def delete(self):

@ApiRoute("show/microphones/allocations", ApiVersion.V1)
class MicrophoneAllocationsController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down
1 change: 0 additions & 1 deletion server/controllers/api/show/scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

@ApiRoute("show/scene", ApiVersion.V1)
class SceneController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down
2 changes: 0 additions & 2 deletions server/controllers/api/show/script/revisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

@ApiRoute("show/script/revisions", ApiVersion.V1)
class ScriptRevisionsController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down Expand Up @@ -244,7 +243,6 @@ async def delete(self):

@ApiRoute("show/script/revisions/current", ApiVersion.V1)
class ScriptCurrentRevisionController(BaseAPIController):

@requires_show
def get(self):
current_show = self.get_current_show()
Expand Down
Loading
Loading