mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-26 06:06:15 +02:00
Add vscode @component comment to every svelte file, remove unused js exports
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
<!--
|
||||
@component Admin settings wrapper
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Row, Col } from "@sveltestrap/sveltestrap";
|
||||
import { onMount } from "svelte";
|
||||
|
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
@component User settings wrapper
|
||||
|
||||
Properties:
|
||||
- `username String!`: Empty string if auth. is disabled, otherwise the username as string
|
||||
- `isApi Bool!`: Is currently logged in user api authority
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { getContext } from "svelte";
|
||||
import UserOptions from "./user/UserOptions.svelte";
|
||||
@@ -41,6 +49,6 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<UserOptions config={ccconfig} {username} {isApi} bind:message bind:displayMessage on:update={(e) => handleSettingSubmit(e)}/>
|
||||
<PlotRenderOptions config={ccconfig} bind:message bind:displayMessage on:update={(e) => handleSettingSubmit(e)}/>
|
||||
<PlotColorScheme config={ccconfig} bind:message bind:displayMessage on:update={(e) => handleSettingSubmit(e)}/>
|
||||
<UserOptions config={ccconfig} {username} {isApi} bind:message bind:displayMessage on:update-config={(e) => handleSettingSubmit(e)}/>
|
||||
<PlotRenderOptions config={ccconfig} bind:message bind:displayMessage on:update-config={(e) => handleSettingSubmit(e)}/>
|
||||
<PlotColorScheme config={ccconfig} bind:message bind:displayMessage on:update-config={(e) => handleSettingSubmit(e)}/>
|
||||
|
@@ -1,4 +1,14 @@
|
||||
<script>
|
||||
<!--
|
||||
@component User creation form card
|
||||
|
||||
Properties:
|
||||
- `roles [String]!`: List of roles used in app as strings
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list after user creation
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Button, Card, CardTitle } from "@sveltestrap/sveltestrap";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { fade } from "svelte/transition";
|
||||
@@ -8,7 +18,7 @@
|
||||
let message = { msg: "", color: "#d63384" };
|
||||
let displayMessage = false;
|
||||
|
||||
export let roles = [];
|
||||
export let roles;
|
||||
|
||||
async function handleUserSubmit() {
|
||||
let form = document.querySelector("#create-user-form");
|
||||
|
@@ -1,3 +1,10 @@
|
||||
<!--
|
||||
@component User managed project edit form card
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list after project update
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Card, CardTitle, CardBody } from "@sveltestrap/sveltestrap";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
@@ -1,3 +1,13 @@
|
||||
<!--
|
||||
@component User role edit form card
|
||||
|
||||
Properties:
|
||||
- `roles [String]!`: List of roles used in app as strings
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list after role edit
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Card, CardTitle, CardBody } from "@sveltestrap/sveltestrap";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
@@ -8,7 +18,7 @@
|
||||
let message = { msg: "", color: "#d63384" };
|
||||
let displayMessage = false;
|
||||
|
||||
export let roles = [];
|
||||
export let roles;
|
||||
|
||||
async function handleAddRole() {
|
||||
const username = document.querySelector("#role-username").value;
|
||||
|
@@ -1,3 +1,7 @@
|
||||
<!--
|
||||
@component Admin option select card
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { onMount } from "svelte";
|
||||
import { Card, CardBody, CardTitle } from "@sveltestrap/sveltestrap";
|
||||
|
@@ -1,3 +1,13 @@
|
||||
<!--
|
||||
@component User management table
|
||||
|
||||
Properties:
|
||||
- `users [Object]?`: List of users
|
||||
|
||||
Events:
|
||||
- `reload`: Trigger upstream reload of user list
|
||||
-->
|
||||
|
||||
<script>
|
||||
import {
|
||||
Button,
|
||||
|
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
@component User data row for table
|
||||
|
||||
Properties:
|
||||
- `user Object!`: User Object
|
||||
- {username: String, name: String, roles: [String], projects: String, email: String}
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { Button } from "@sveltestrap/sveltestrap";
|
||||
import { fetchJwt } from "../../utils.js"
|
||||
|
@@ -1,3 +1,15 @@
|
||||
<!--
|
||||
@component Plot color scheme selection for users
|
||||
|
||||
Properties:
|
||||
- `config Object`: Current cc-config
|
||||
- `message Object`: Message to display on success or error
|
||||
- `displayMessage Bool`: If to display message content
|
||||
|
||||
Events:
|
||||
- `update-config, {selector: String, target: String}`: Trigger upstream update of the config option
|
||||
-->
|
||||
|
||||
<script>
|
||||
import {
|
||||
Table,
|
||||
@@ -15,7 +27,7 @@
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
function updateSetting(selector, target) {
|
||||
dispatch('update', {
|
||||
dispatch('update-config', {
|
||||
selector: selector,
|
||||
target: target
|
||||
});
|
||||
|
@@ -1,4 +1,16 @@
|
||||
<script>
|
||||
<!--
|
||||
@component Plot render option selection for users
|
||||
|
||||
Properties:
|
||||
- `config Object`: Current cc-config
|
||||
- `message Object`: Message to display on success or error
|
||||
- `displayMessage Bool`: If to display message content
|
||||
|
||||
Events:
|
||||
- `update-config, {selector: String, target: String}`: Trigger upstream update of the config option
|
||||
-->
|
||||
|
||||
<script>
|
||||
import {
|
||||
Button,
|
||||
Row,
|
||||
@@ -15,7 +27,7 @@
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
function updateSetting(selector, target) {
|
||||
dispatch('update', {
|
||||
dispatch('update-config', {
|
||||
selector: selector,
|
||||
target: target
|
||||
});
|
||||
|
@@ -1,3 +1,17 @@
|
||||
<!--
|
||||
@component General option selection for users
|
||||
|
||||
Properties:
|
||||
- `config Object`: Current cc-config
|
||||
- `message Object`: Message to display on success or error
|
||||
- `displayMessage Bool`: If to display message content
|
||||
- `username String!`: Empty string if auth. is disabled, otherwise the username as string
|
||||
- `isApi Bool!`: Is currently logged in user api authority
|
||||
|
||||
Events:
|
||||
- `update-config, {selector: String, target: String}`: Trigger upstream update of the config option
|
||||
-->
|
||||
|
||||
<script>
|
||||
import {
|
||||
Button,
|
||||
@@ -37,7 +51,7 @@
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
function updateSetting(selector, target) {
|
||||
dispatch('update', {
|
||||
dispatch('update-config', {
|
||||
selector: selector,
|
||||
target: target
|
||||
});
|
||||
|
Reference in New Issue
Block a user