Skip to content

Commit

Permalink
Develop (#8)
Browse files Browse the repository at this point in the history
* chore: Add GitHub link to HelloWorld.vue component

* feat: Add GitHub Actions workflow to build and deploy frontend

* chore: Remove unnecessary pull_request trigger in build_backend.yml

* chore: Update build_frontend.yml to remove unnecessary pull_request trigger

* chore: Update build_frontend.yml to include environment variables for server IP, username, and password

* chore: Update build_frontend.yml to include environment variables for server IP, username, and password

* chore: Update build_frontend.yml to include environment variables for server IP, username, and password

* chore: Update build_frontend.yml to include pull_request trigger for the "build_frontend" branch

* chore: Update build_frontend.yml to include "develop" branch in push trigger

* chore: Update build_frontend.yml to fix directory path in SSH command

* chore: Update build_frontend.yml to fix directory path in SSH command

* chore: Update build_frontend.yml to fix directory path in SSH command

* chore: Update build_frontend.yml to fix directory path in SSH command

* refactor: Update HelloWorld.vue component to improve layout and styling

* refactor: Improve layout and styling of HelloWorld.vue component

* refactor: Remove console.log statement in HelloWorld.vue component

* refactor: Add loading indicator to password check in HelloWorld.vue component
  • Loading branch information
nilgaar authored Jul 28, 2024
1 parent b45d92f commit 72d9fe4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions frontend/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
<v-btn color="primary" class="mt-3" type="submit">Check Password</v-btn>
</v-form>

<v-overlay opacity=".12" scrim="primary" :value="true"></v-overlay>
<v-overlay :value="loading">
<v-progress-circular indeterminate color="primary"></v-progress-circular>
</v-overlay>
</v-card>
</v-col>

Expand All @@ -48,30 +50,31 @@
</v-container>
</template>


<script setup lang="ts">
import { ref } from "vue";
import { sha3_512 } from "js-sha3";
const password = ref("");
const files = ref([]);
const loading = ref(false);
async function hashPassword() {
loading.value = true;
const hashedPassword = sha3_512(password.value);
console.log(hashedPassword);
fetch("https://api.checker.pops.cafe?hash=" + hashedPassword)
.then((response) => response.json())
.then((data) => {
files.value = data.data.split(', ').sort().map((file: string) => file.trim());
loading.value = false;
})
.catch((error) => {
console.error("Error:", error);
loading.value = false;
});
}
</script>

<style scoped>
/* Base text styling for white appearance */
.text-caption,
.headline,
p,
Expand All @@ -85,7 +88,7 @@ h2,
margin-top: 12px;
}
/* Responsive settings for better readability */
@media (max-width: 600px) {
.headline,
Expand All @@ -94,4 +97,4 @@ h2,
font-size: smaller;
}
}
</style>
</style>

0 comments on commit 72d9fe4

Please sign in to comment.