forked from trent_larson/crowd-funder-for-time-pwa
fix linting
This commit is contained in:
@@ -40,10 +40,7 @@
|
||||
/>
|
||||
|
||||
<div>
|
||||
<h3
|
||||
v-if="record.issuer.known"
|
||||
class="font-semibold leading-tight"
|
||||
>
|
||||
<h3 v-if="record.issuer.known" class="font-semibold leading-tight">
|
||||
{{ record.issuer.displayName }}
|
||||
</h3>
|
||||
<p class="ms-auto text-xs text-slate-500 italic">
|
||||
@@ -97,7 +94,9 @@
|
||||
<div v-if="record.providerPlanName">
|
||||
<router-link
|
||||
:to="{
|
||||
path: '/project/' + encodeURIComponent(record.providerPlanHandleId || ''),
|
||||
path:
|
||||
'/project/' +
|
||||
encodeURIComponent(record.providerPlanHandleId || ''),
|
||||
}"
|
||||
title="View project details"
|
||||
>
|
||||
@@ -125,17 +124,17 @@
|
||||
</router-link>
|
||||
<font-awesome
|
||||
v-else
|
||||
@click="notifyHiddenPerson"
|
||||
icon="eye-slash"
|
||||
class="text-slate-300 !size-[3rem] sm:!size-[4rem]"
|
||||
@click="notifyHiddenPerson"
|
||||
/>
|
||||
</div>
|
||||
<!-- Unknown Person -->
|
||||
<div v-else>
|
||||
<font-awesome
|
||||
@click="notifyUnknownPerson"
|
||||
icon="person-circle-question"
|
||||
class="text-slate-300 text-[3rem] sm:text-[4rem]"
|
||||
@click="notifyUnknownPerson"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,7 +155,9 @@
|
||||
<div
|
||||
class="absolute inset-x-[7rem] sm:inset-x-[12rem] mx-2 top-1/2 -translate-y-1/2"
|
||||
>
|
||||
<div class="text-sm text-center leading-none font-semibold pe-2 sm:pe-4">
|
||||
<div
|
||||
class="text-sm text-center leading-none font-semibold pe-2 sm:pe-4"
|
||||
>
|
||||
{{ fetchAmount }}
|
||||
</div>
|
||||
|
||||
@@ -181,7 +182,9 @@
|
||||
<div v-if="record.recipientProjectName">
|
||||
<router-link
|
||||
:to="{
|
||||
path: '/project/' + encodeURIComponent(record.fulfillsPlanHandleId || ''),
|
||||
path:
|
||||
'/project/' +
|
||||
encodeURIComponent(record.fulfillsPlanHandleId || ''),
|
||||
}"
|
||||
title="View project details"
|
||||
>
|
||||
@@ -209,17 +212,17 @@
|
||||
</router-link>
|
||||
<font-awesome
|
||||
v-else
|
||||
@click="notifyHiddenPerson"
|
||||
icon="eye-slash"
|
||||
class="text-slate-300 !size-[3rem] sm:!size-[4rem]"
|
||||
@click="notifyHiddenPerson"
|
||||
/>
|
||||
</div>
|
||||
<!-- Unknown Person -->
|
||||
<div v-else>
|
||||
<font-awesome
|
||||
@click="notifyUnknownPerson"
|
||||
icon="person-circle-question"
|
||||
class="text-slate-300 text-[3rem] sm:text-[4rem]"
|
||||
@click="notifyUnknownPerson"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,7 +276,7 @@ export default class ActivityListItem extends Vue {
|
||||
title: "Person Outside Your Network",
|
||||
text: "This person is not visible to you.",
|
||||
},
|
||||
3000
|
||||
3000,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -285,7 +288,7 @@ export default class ActivityListItem extends Vue {
|
||||
title: "Unidentified Person",
|
||||
text: "Nobody specific was recognized.",
|
||||
},
|
||||
3000
|
||||
3000,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<div class="text-lg text-center font-bold relative">
|
||||
<h1 id="ViewHeading" class="text-center font-bold">
|
||||
<span v-if="uploading">Uploading Image…</span>
|
||||
<span v-else-if="blob">{{ crop ? 'Crop Image' : 'Preview Image' }}</span>
|
||||
<span v-else-if="blob">{{
|
||||
crop ? "Crop Image" : "Preview Image"
|
||||
}}</span>
|
||||
<span v-else-if="showCameraPreview">Upload Image</span>
|
||||
<span v-else>Add Photo</span>
|
||||
</h1>
|
||||
@@ -119,7 +121,9 @@
|
||||
playsinline
|
||||
muted
|
||||
></video>
|
||||
<div class="absolute bottom-4 inset-x-0 flex items-center justify-center gap-4">
|
||||
<div
|
||||
class="absolute bottom-4 inset-x-0 flex items-center justify-center gap-4"
|
||||
>
|
||||
<button
|
||||
class="bg-white text-slate-800 p-3 rounded-full text-2xl leading-none"
|
||||
@click="capturePhoto"
|
||||
@@ -278,9 +282,9 @@ const inputImageFileNameRef = ref<Blob>();
|
||||
},
|
||||
defaultCameraMode: {
|
||||
type: String,
|
||||
default: 'environment',
|
||||
validator: (value: string) => ['environment', 'user'].includes(value)
|
||||
}
|
||||
default: "environment",
|
||||
validator: (value: string) => ["environment", "user"].includes(value),
|
||||
},
|
||||
},
|
||||
})
|
||||
export default class ImageMethodDialog extends Vue {
|
||||
@@ -323,7 +327,7 @@ export default class ImageMethodDialog extends Vue {
|
||||
private cameraStream: MediaStream | null = null;
|
||||
|
||||
/** Current camera facing mode */
|
||||
private currentFacingMode: 'environment' | 'user' = 'environment';
|
||||
private currentFacingMode: "environment" | "user" = "environment";
|
||||
|
||||
private platformService = PlatformServiceFactory.getInstance();
|
||||
URL = window.URL || window.webkitURL;
|
||||
@@ -391,7 +395,7 @@ export default class ImageMethodDialog extends Vue {
|
||||
this.crop = !!crop;
|
||||
this.imageCallback = setImageFn;
|
||||
this.visible = true;
|
||||
this.currentFacingMode = this.defaultCameraMode as 'environment' | 'user';
|
||||
this.currentFacingMode = this.defaultCameraMode as "environment" | "user";
|
||||
|
||||
// Start camera preview immediately
|
||||
logger.debug("Starting camera preview from open()");
|
||||
@@ -465,7 +469,10 @@ export default class ImageMethodDialog extends Vue {
|
||||
logger.debug("Current showCameraPreview state:", this.showCameraPreview);
|
||||
logger.debug("Platform capabilities:", this.platformCapabilities);
|
||||
logger.debug("MediaDevices available:", !!navigator.mediaDevices);
|
||||
logger.debug("getUserMedia available:", !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia));
|
||||
logger.debug(
|
||||
"getUserMedia available:",
|
||||
!!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia),
|
||||
);
|
||||
|
||||
try {
|
||||
this.cameraState = "initializing";
|
||||
@@ -492,13 +499,16 @@ export default class ImageMethodDialog extends Vue {
|
||||
videoElement.srcObject = stream;
|
||||
await new Promise((resolve) => {
|
||||
videoElement.onloadedmetadata = () => {
|
||||
videoElement.play().then(() => {
|
||||
logger.debug("Video element started playing");
|
||||
resolve(true);
|
||||
}).catch(error => {
|
||||
logger.error("Error playing video:", error);
|
||||
throw error;
|
||||
});
|
||||
videoElement
|
||||
.play()
|
||||
.then(() => {
|
||||
logger.debug("Video element started playing");
|
||||
resolve(true);
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.error("Error playing video:", error);
|
||||
throw error;
|
||||
});
|
||||
};
|
||||
});
|
||||
} else {
|
||||
@@ -510,17 +520,16 @@ export default class ImageMethodDialog extends Vue {
|
||||
let errorMessage =
|
||||
error instanceof Error ? error.message : "Failed to access camera";
|
||||
if (
|
||||
error instanceof Error && (
|
||||
error.name === "NotReadableError" ||
|
||||
error.name === "TrackStartError"
|
||||
)) {
|
||||
error instanceof Error &&
|
||||
(error.name === "NotReadableError" || error.name === "TrackStartError")
|
||||
) {
|
||||
errorMessage =
|
||||
"Camera is in use by another application. Please close any other apps or browser tabs using the camera and try again.";
|
||||
} else if (
|
||||
error instanceof Error && (
|
||||
error.name === "NotAllowedError" ||
|
||||
error.name === "PermissionDeniedError"
|
||||
)) {
|
||||
error instanceof Error &&
|
||||
(error.name === "NotAllowedError" ||
|
||||
error.name === "PermissionDeniedError")
|
||||
) {
|
||||
errorMessage =
|
||||
"Camera access was denied. Please allow camera access in your browser settings.";
|
||||
}
|
||||
@@ -590,11 +599,12 @@ export default class ImageMethodDialog extends Vue {
|
||||
|
||||
async rotateCamera() {
|
||||
// Toggle between front and back cameras
|
||||
this.currentFacingMode = this.currentFacingMode === 'environment' ? 'user' : 'environment';
|
||||
|
||||
this.currentFacingMode =
|
||||
this.currentFacingMode === "environment" ? "user" : "environment";
|
||||
|
||||
// Stop current stream
|
||||
if (this.cameraStream) {
|
||||
this.cameraStream.getTracks().forEach(track => track.stop());
|
||||
this.cameraStream.getTracks().forEach((track) => track.stop());
|
||||
this.cameraStream = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,10 +96,7 @@ db.on("populate", async () => {
|
||||
try {
|
||||
await db.settings.add(DEFAULT_SETTINGS);
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
"Error populating the database with default settings:",
|
||||
error,
|
||||
);
|
||||
logger.error("Error populating the database with default settings:", error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Filesystem, Directory, Encoding } from "@capacitor/filesystem";
|
||||
import { Camera, CameraResultType, CameraSource, CameraDirection } from "@capacitor/camera";
|
||||
import {
|
||||
Camera,
|
||||
CameraResultType,
|
||||
CameraSource,
|
||||
CameraDirection,
|
||||
} from "@capacitor/camera";
|
||||
import { Share } from "@capacitor/share";
|
||||
import {
|
||||
SQLiteConnection,
|
||||
@@ -696,7 +701,7 @@ export class CapacitorPlatformService implements PlatformService {
|
||||
* @returns Promise that resolves when the camera is rotated
|
||||
*/
|
||||
async rotateCamera(): Promise<void> {
|
||||
this.currentDirection = this.currentDirection === 'BACK' ? 'FRONT' : 'BACK';
|
||||
this.currentDirection = this.currentDirection === "BACK" ? "FRONT" : "BACK";
|
||||
logger.debug(`Camera rotated to ${this.currentDirection} camera`);
|
||||
}
|
||||
|
||||
|
||||
@@ -593,9 +593,7 @@
|
||||
</router-link>
|
||||
|
||||
<div id="sectionImportContactsSettings" class="mt-4">
|
||||
<h2 class="text-slate-500 text-sm font-bold">
|
||||
Import Contacts
|
||||
</h2>
|
||||
<h2 class="text-slate-500 text-sm font-bold">Import Contacts</h2>
|
||||
|
||||
<div class="ml-4 mt-2">
|
||||
<input type="file" class="ml-2" @change="uploadImportFile" />
|
||||
|
||||
@@ -983,7 +983,8 @@ export default class ContactQRScanShow extends Vue {
|
||||
) as HTMLVideoElement;
|
||||
if (videoElement) {
|
||||
// Mirror if it's desktop or front camera on mobile
|
||||
const shouldMirror = this.isDesktop || (this.isFrontCamera && !this.isDesktop);
|
||||
const shouldMirror =
|
||||
this.isDesktop || (this.isFrontCamera && !this.isDesktop);
|
||||
videoElement.style.transform = shouldMirror ? "scaleX(-1)" : "none";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<font-awesome
|
||||
icon="chair"
|
||||
class="fa-fw text-2xl"
|
||||
@click="this.$router.push({ name: 'onboard-meeting-list' })"
|
||||
@click="$router.push({ name: 'onboard-meeting-list' })"
|
||||
/>
|
||||
</span>
|
||||
</span>
|
||||
@@ -193,7 +193,9 @@
|
||||
"
|
||||
/>
|
||||
|
||||
<div class="flex-shrink-0 w-12 h-12 flex items-center justify-center">
|
||||
<div
|
||||
class="flex-shrink-0 w-12 h-12 flex items-center justify-center"
|
||||
>
|
||||
<EntityIcon
|
||||
:contact="contact"
|
||||
:icon-size="48"
|
||||
@@ -230,7 +232,10 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="showGiveNumbers && contact.did != activeDid" class="flex gap-2 items-center">
|
||||
<div
|
||||
v-if="showGiveNumbers && contact.did != activeDid"
|
||||
class="flex gap-2 items-center"
|
||||
>
|
||||
<button
|
||||
class="text-sm bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-1.5 rounded-l-md"
|
||||
:title="givenToMeDescriptions[contact.did] || ''"
|
||||
|
||||
@@ -162,12 +162,12 @@
|
||||
<div class="mt-6 h-96 w-full mx-auto">
|
||||
<l-map
|
||||
ref="projectMap"
|
||||
class="z-40"
|
||||
@ready="onMapReady"
|
||||
@moveend="onMoveEnd"
|
||||
@movestart="onMoveStart"
|
||||
@zoomend="onZoomEnd"
|
||||
@zoomstart="onZoomStart"
|
||||
class="z-40"
|
||||
>
|
||||
<l-tile-layer
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
@@ -198,17 +198,18 @@
|
||||
-->
|
||||
</span>
|
||||
<span v-else-if="isAnywhereActive"
|
||||
>No {{ isProjectsActive ? 'projects' : 'people' }} were found with that search.</span
|
||||
>No {{ isProjectsActive ? "projects" : "people" }} were found with
|
||||
that search.</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Results List -->
|
||||
<InfiniteScroll @reached-bottom="loadMoreData">
|
||||
<ul
|
||||
id="listDiscoverResults"
|
||||
class="border-t border-slate-300 mt-6"
|
||||
<ul
|
||||
v-if="projects.length > 0 || userProfiles.length > 0"
|
||||
id="listDiscoverResults"
|
||||
class="border-t border-slate-300 mt-6"
|
||||
>
|
||||
<!-- Projects List -->
|
||||
<template v-if="isProjectsActive">
|
||||
|
||||
@@ -152,7 +152,7 @@ export default class OnboardMeetingMembersView extends Vue {
|
||||
// Fetch the meeting details to get the project link
|
||||
const meetingResponse = await this.axios.get(
|
||||
`${this.apiServer}/api/partner/groupOnboard/${this.groupId}`,
|
||||
{ headers }
|
||||
{ headers },
|
||||
);
|
||||
if (meetingResponse.data?.data?.projectLink) {
|
||||
this.projectLink = meetingResponse.data.data.projectLink;
|
||||
|
||||
@@ -93,7 +93,8 @@
|
||||
v-if="
|
||||
!isLoading &&
|
||||
isInEditOrCreateMode() &&
|
||||
newOrUpdatedMeetingInputs != null /* duplicate check is for typechecks */
|
||||
newOrUpdatedMeetingInputs !=
|
||||
null /* duplicate check is for typechecks */
|
||||
"
|
||||
class="mt-8"
|
||||
>
|
||||
@@ -169,7 +170,9 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="projectLink" class="block text-sm font-medium text-gray-700"
|
||||
<label
|
||||
for="projectLink"
|
||||
class="block text-sm font-medium text-gray-700"
|
||||
>Project Link</label
|
||||
>
|
||||
<input
|
||||
@@ -217,8 +220,8 @@
|
||||
</div>
|
||||
<div
|
||||
class="flex items-center gap-2 cursor-pointer text-blue-600"
|
||||
@click="copyMembersLinkToClipboard"
|
||||
title="Click to copy link for members"
|
||||
@click="copyMembersLinkToClipboard"
|
||||
>
|
||||
<span>
|
||||
• Page for Members
|
||||
@@ -344,7 +347,9 @@ export default class OnboardMeetingView extends Vue {
|
||||
}
|
||||
|
||||
isInCreateMode(): boolean {
|
||||
return this.newOrUpdatedMeetingInputs != null && this.currentMeeting == null;
|
||||
return (
|
||||
this.newOrUpdatedMeetingInputs != null && this.currentMeeting == null
|
||||
);
|
||||
}
|
||||
|
||||
isInEditOrCreateMode(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user