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

Refactor AdminSettings #14132

Open
3 of 20 tasks
Antreesy opened this issue Jan 15, 2025 · 2 comments
Open
3 of 20 tasks

Refactor AdminSettings #14132

Antreesy opened this issue Jan 15, 2025 · 2 comments
Assignees

Comments

@Antreesy
Copy link
Contributor

Antreesy commented Jan 15, 2025

Currently components in AdminSettings do not have a shared state, and data exchange could only be done with EventBus:

success: () => {
showSuccess(t('spreed', 'High-performance backend settings saved'))
EventBus.emit('signaling-servers-updated', this.servers)
this.loading = false
this.toggleSave()
},

Expected behaviour

  • 🍍 Shared Pinia store and gradual migrate of useful data to it (currently HPB settings, SIP settings) currently an overkill
  • Move shared state to the AdminSettings.vue:
    • signaling settings
    • signaling features
    • sip settings
  • 📘 Additionaly migrate to `<script setup lang="ts">
    • AdminSettings.vue (1 usage found)
    • AllowedGroups.vue (1 usage found)
    • BotsSettings.vue (1 usage found)
    • Federation.vue (1 usage found)
    • GeneralSettings.vue (1 usage found)
    • HostedSignalingServer.vue (1 usage found)
    • MatterbridgeIntegration.vue (1 usage found)
    • RecordingServer.vue (1 usage found)
    • RecordingServers.vue (1 usage found)
    • SignalingServer.vue (1 usage found)
    • SignalingServers.vue (1 usage found)
    • SIPBridge.vue (1 usage found)
    • StunServer.vue (1 usage found)
    • StunServers.vue (1 usage found)
    • TurnServer.vue (1 usage found)
    • TurnServers.vue (1 usage found)
    • WebServerSetupChecks.vue (1 usage found)
@Antreesy Antreesy added this to the 🌿 Next Beta (31) milestone Jan 15, 2025
@Antreesy Antreesy self-assigned this Jan 15, 2025
@ShGKme
Copy link
Contributor

ShGKme commented Jan 15, 2025

Admin settings is a simple single page with low-height component tree depth. Let's not introduce a global app-level state here (we have it more than should already).

If I'm not wrong, the only shared state here is the signaling servers. And it is only used in direct children of AdminSettings.

We can store it in the AdminSettings as a single source of common admin settings data, and directly pass it to children via props, updating via events.

@nickvergessen
Copy link
Member

Also sipbridge is referenced by another setting (soon, PR is there and awaiting merge)

@Antreesy Antreesy changed the title Migrate AdminSettings to Pinia Refactor AdminSettings Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants