Skip to content

Commit

Permalink
Started working on matching algorythm
Browse files Browse the repository at this point in the history
  • Loading branch information
RedcodesDev committed Jun 8, 2024
1 parent 524e5a1 commit b1794b6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions static/profile/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,26 @@ function save(button, tab) {
username: username.value
}
break;

case "preference":
var pronouns = document.querySelector('#pronouns');

if (pronouns.value === '') {
pronouns.classList.add('is-danger');
button.classList.remove('is-loading');
button.classList.remove('is-warning');
return;
}

console.log(getPossibleMatches('Männlich', 'Asexuell'));



updateJson = {
pronouns: pronouns.value
}
break;

}

var xhr = new XMLHttpRequest();
Expand Down
6 changes: 4 additions & 2 deletions static/profile/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bulma-switch.min.css">

<script defer src="/profile/client.js"></script>
<script defer src="/utils/matchingUtils.js"></script>
</head>
<body>

Expand Down Expand Up @@ -158,7 +159,7 @@ <h1 class="title is-3 has-text-centered is-uppercase is-family-hobbylos">Einstel
<div class="control">
<div class="select is-skeleton">
<select class="is-skeleton" name="" id="sexuality">
<option>Asexual</option>
<option>Asexuell</option>
<option>Androsexuell</option>
<option>Bisexuell</option>
<option>Demisexuell</option>
Expand All @@ -168,6 +169,7 @@ <h1 class="title is-3 has-text-centered is-uppercase is-family-hobbylos">Einstel
<option>Pansexuell</option>
<option>Polysexuell</option>
<option>Nomasexuell</option>
<option>Nowomasexuell</option>
<option>Unlabled</option>
<option>Skoliosexuell</option>
</select>
Expand All @@ -177,7 +179,7 @@ <h1 class="title is-3 has-text-centered is-uppercase is-family-hobbylos">Einstel

<div class="field is-grouped">
<div class="control">
<button class="button is-success is-uppercase is-family-hobbylos is-skeleton">Speichern</button>
<button class="button is-success is-uppercase is-family-hobbylos is-skeleton" onclick="save(this, 'preference')">Speichern</button>
</div>
</div>
</div>
Expand Down

0 comments on commit b1794b6

Please sign in to comment.