Skip to content

Commit

Permalink
dealt with commented WIP ("bookmark<N>" code
Browse files Browse the repository at this point in the history
  • Loading branch information
papandrk committed Jan 7, 2025
1 parent 79b7fd4 commit cf899c8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="row px-0 mb-3">
<div class="col-12">
<label for="projectSelect" class="form-label mb-0"
>Select a Project to view the problems</label
>Select a project to view the problems</label
>
<div :class="{ 'spinner-border text-primary ml-5': true, hidden: !loading }"></div>
<select
Expand All @@ -20,7 +20,7 @@
v-model="selectedProjectId"
@change="getProjectProblems"
>
<option value="" disabled selected>Select a Project</option>
<option value="" disabled selected>Select a project</option>
<option v-for="project in projects" :key="project.id" :value="project.id">
{{ project.default_translation.name }}
</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="row px-0 mb-3">
<div class="col-12">
<label for="projectSelect" class="form-label mb-0"
>Select a Project to view the Solutions</label
>Select a project to view the solutions</label
>
<div :class="{ 'spinner-border text-primary ml-5': true, hidden: !projectsLoading }"></div>
<select
Expand All @@ -20,7 +20,7 @@
v-model="selectedProjectId"
@change="getProblemsForFiltering"
>
<option value="" disabled selected>Select a Project</option>
<option value="" disabled selected>Select a project</option>
<option v-for="project in projects" :key="project.id" :value="project.id">
{{ project.default_translation.name }}
</option>
Expand All @@ -30,7 +30,7 @@
<div :class="['row px-0 mb-3', selectedProjectId ? '' : 'hidden']">
<div class="col-12">
<label for="problemSelect" class="form-label mb-0"
>Select a Problem to further filter the Solutions</label
>Select a problem to further filter the solutions</label
>
<div :class="{ 'spinner-border text-primary ml-5': true, hidden: !problemsLoading }"></div>
<select
Expand All @@ -39,10 +39,8 @@
v-model="selectedProblemId"
@change="getFilteredSolutions"
>
<option value="" disabled selected>Select a Problem</option>
<!-- /* bookmark4 - what goes here? */ -->
<option value="all">View all Project's Solutions</option>
<!-- /* bookmark4 - what goes here? */ -->
<option value="" disabled selected>Select a problem</option>
<option value="all">View all project's solutions</option>
<option v-for="problem in problems" :key="problem.id" :value="problem.id">
{{ problem.default_translation.title }}
</option>
Expand Down Expand Up @@ -81,7 +79,7 @@
</div>
<div class="row px-0">
<div class="col" :class="[fetched && !solutions.length ? '' : 'hidden']">
<div class="alert alert-warning">No Solutions found for the selected Filters</div>
<div class="alert alert-warning">No solutions found for the selected filters</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -325,7 +323,6 @@ export default {
.then((response) => {
this.problems = response.data;
this.problemsFetched = true;
// this.updateProblems(); // bookmark4
})
.catch((error) => {
this.showErrorMessage(error);
Expand Down
16 changes: 0 additions & 16 deletions resources/assets/js/vue-components/common/HeartCircleButton.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<template>
<button class="heart-circle-btn" @click="upvote">
<div v-if="false"><!-- bookmark4 - this div was created to "comment out" the encapsulated content without it being visible in the final markup-->
<svg width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.4998 5.66785L15.021 4.14779C11.5498 0.579663 5.18491 1.81098 2.88728 6.29691C1.8086 8.40685 1.56522 11.4532 3.53491 15.341C5.43241 19.0844 9.38003 23.5683 16.4998 28.4523C23.6195 23.5683 27.5651 19.0844 29.4647 15.341C31.4343 11.4511 31.193 8.40685 30.1123 6.29691C27.8147 1.81098 21.4498 0.5776 17.9786 4.14573L16.4998 5.66785ZM16.4998 30.9376C-15.1245 10.0403 6.76272 -6.2699 16.1368 2.35754C16.2605 2.47166 16.3815 2.58923 16.4998 2.71023C16.616 2.58846 16.7371 2.47149 16.8628 2.3596C26.2348 -6.27402 48.1241 10.0383 16.4998 30.9376Z" fill="#F5BA16"/>
</svg>
</div>
<svg v-if="isFilled" width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="22" cy="22" r="22" :fill="getIconColor()" opacity="0.8" />
<path style="transform: translate(0.35em, 0.5em);"
Expand Down Expand Up @@ -32,10 +27,6 @@ export default {
type: Boolean,
required: true,
},
solutionId: { // bookmark4 - perhaps not needed...???
type: Number,
required: true,
},
iconColorTheme: {
type: String,
default: "light",
Expand All @@ -45,13 +36,6 @@ export default {
getIconColor() {
return this.iconColorTheme === "light" ? "#ffffff" : "#212529";
},
upvote() {
try {
// bookmark4 - needs to be implemented
} catch (error) {
// bookmark4 - needs to be implemented
}
},
},
};
</script>
Expand Down
1 change: 0 additions & 1 deletion resources/assets/js/vue-components/solution/Solutions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
</div>
<HeartCircleButton
:is-filled="solution.upvoted_by_current_user"
:solution-id="solution.id"
:icon-color-theme="buttonTextColorTheme"
@click="(event) => heartClicked(event, solution.id)"
></HeartCircleButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,12 @@ class="form-control {{ $errors->has('problem-slug') ? 'is-invalid' : '' }}"
<div class="form-row js-image-input-container">
<div class="col-sm-12">
<div class="form-group input-file-wrapper">
<label for="problem-image">Problem Image (max-size: 2MB)</label></label>
<br><small>In order to update the currently selected image, please choose a new image by
clicking the button below.</small><br> {{-- bookmark3 - fix spacing --}}
<label for="problem-image">Problem Image (max-size: 2MB)
<span class="text-sm explanation-text">
In order to update the currently selected image, please choose a new image by
clicking the button below.
</span>
</label>
<input type="file"
id="problem-image"
name="problem-image"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ class="form-control {{ $errors->has('solution-slug') ? 'is-invalid' : '' }}"
<div class="form-row js-image-input-container">
<div class="col-sm-12">
<div class="form-group input-file-wrapper">
<label for="solution-image">Solution Image (max-size: 2MB)</label></label>
<br><small>In order to update the currently selected image, please choose a new image by
clicking the button below.</small><br> {{-- bookmark3 - fix spacing --}}
<label for="solution-image">Solution Image (max-size: 2MB)
<span class="text-sm explanation-text">
In order to update the currently selected image, please choose a new image by
clicking the button below.
</span>
</label>
<input type="file"
id="solution-image"
name="solution-image"
Expand Down

0 comments on commit cf899c8

Please sign in to comment.