semantic cleanup
This commit is contained in:
@@ -33,6 +33,11 @@
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
// [DEF:onMount:Function]
|
||||
/**
|
||||
* @purpose Load branches when component is mounted.
|
||||
* @pre Component is initialized.
|
||||
* @post loadBranches is called.
|
||||
*/
|
||||
onMount(async () => {
|
||||
await loadBranches();
|
||||
});
|
||||
@@ -41,6 +46,7 @@
|
||||
// [DEF:loadBranches:Function]
|
||||
/**
|
||||
* @purpose Загружает список веток для дашборда.
|
||||
* @pre dashboardId is provided.
|
||||
* @post branches обновлен.
|
||||
*/
|
||||
async function loadBranches() {
|
||||
@@ -59,6 +65,11 @@
|
||||
// [/DEF:loadBranches:Function]
|
||||
|
||||
// [DEF:handleSelect:Function]
|
||||
/**
|
||||
* @purpose Handles branch selection from dropdown.
|
||||
* @pre event contains branch name.
|
||||
* @post handleCheckout is called with selected branch.
|
||||
*/
|
||||
function handleSelect(event) {
|
||||
handleCheckout(event.target.value);
|
||||
}
|
||||
@@ -88,7 +99,8 @@
|
||||
// [DEF:handleCreate:Function]
|
||||
/**
|
||||
* @purpose Создает новую ветку.
|
||||
* @post Новая ветка создана и загружена.
|
||||
* @pre newBranchName is not empty.
|
||||
* @post Новая ветка создана и загружена; showCreate reset.
|
||||
*/
|
||||
async function handleCreate() {
|
||||
if (!newBranchName) return;
|
||||
|
||||
Reference in New Issue
Block a user