mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-24 23:39:30 +01:00
Compare commits
2 Commits
main
...
macos_lsre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42e41d2890 | ||
|
|
bc20635e00 |
@@ -13,6 +13,8 @@ Information about release notes of Coco App is provided here.
|
||||
|
||||
### 🚀 Features
|
||||
|
||||
- feat: support app search even if Spotlight is disabled #1028
|
||||
|
||||
### 🐛 Bug fix
|
||||
|
||||
### ✈️ Improvements
|
||||
|
||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -332,7 +332,7 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
|
||||
[[package]]
|
||||
name = "applications"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/infinilabs/applications-rs?rev=b5fac4034a40d42e72f727f1aa1cc1f19fe86653#b5fac4034a40d42e72f727f1aa1cc1f19fe86653"
|
||||
source = "git+https://github.com/infinilabs/applications-rs?rev=ec174b7761bfa5eb7af0a93218b014e2d1505643#ec174b7761bfa5eb7af0a93218b014e2d1505643"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"core-foundation 0.9.4",
|
||||
|
||||
@@ -62,7 +62,7 @@ tauri-plugin-drag = "2"
|
||||
tauri-plugin-macos-permissions = "2"
|
||||
tauri-plugin-fs-pro = "2"
|
||||
tauri-plugin-screenshots = "2"
|
||||
applications = { git = "https://github.com/infinilabs/applications-rs", rev = "b5fac4034a40d42e72f727f1aa1cc1f19fe86653" }
|
||||
applications = { git = "https://github.com/infinilabs/applications-rs", rev = "ec174b7761bfa5eb7af0a93218b014e2d1505643" }
|
||||
tokio-native-tls = "0.3" # For wss connections
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = { version = "0.20", features = ["native-tls"] }
|
||||
|
||||
@@ -6,7 +6,6 @@ import { formatter } from "@/utils/index";
|
||||
import CommonIcon from "@/components/Common/Icons/CommonIcon";
|
||||
import defaultThumbnail from "@/assets/coconut-tree.png";
|
||||
import { RichCategories } from "./ListRight";
|
||||
import { formatDateToLocal } from "@/utils/date";
|
||||
|
||||
interface DocumentDetailProps {
|
||||
document: any;
|
||||
@@ -149,7 +148,7 @@ export const DocumentDetail: React.FC<DocumentDetailProps> = ({ document }) => {
|
||||
{document?.created && (
|
||||
<DetailItem
|
||||
label={t("search.document.createdAt")}
|
||||
value={formatDateToLocal(document.created)}
|
||||
value={document.created}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -181,7 +180,7 @@ export const DocumentDetail: React.FC<DocumentDetailProps> = ({ document }) => {
|
||||
{document?.updated && (
|
||||
<DetailItem
|
||||
label={t("search.document.updatedAt")}
|
||||
value={formatDateToLocal(document.updated)}
|
||||
value={document?.updated || "-"}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Button } from "@/components/ui/button";
|
||||
import dayjs from "dayjs";
|
||||
import {
|
||||
CircleCheck,
|
||||
Download,
|
||||
@@ -16,7 +17,6 @@ import { useSearchStore } from "@/stores/searchStore";
|
||||
import DeleteDialog from "../Common/DeleteDialog";
|
||||
import PreviewImage from "../Common/PreviewImage";
|
||||
import platformAdapter from "@/utils/platformAdapter";
|
||||
import { formatDateToLocal } from "@/utils/date";
|
||||
|
||||
interface ExtensionDetailProps {
|
||||
onInstall: () => void;
|
||||
@@ -226,7 +226,7 @@ const ExtensionDetail: FC<ExtensionDetailProps> = (props) => {
|
||||
{t("extensionDetail.label.lastUpdate")}
|
||||
</div>
|
||||
<p>
|
||||
{formatDateToLocal(selectedExtension.updated)}
|
||||
{dayjs(selectedExtension.updated).format("YYYY-MM-DD HH:mm:ss")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { useContext, useMemo, useState } from "react";
|
||||
import dayjs from "dayjs";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAsyncEffect } from "ahooks";
|
||||
|
||||
import platformAdapter from "@/utils/platformAdapter";
|
||||
import { ExtensionsContext } from "../../../index";
|
||||
import { filesize } from "@/utils";
|
||||
import { formatDateToLocal } from "@/utils/date";
|
||||
|
||||
interface Metadata {
|
||||
name: string;
|
||||
@@ -62,15 +62,15 @@ const App = () => {
|
||||
},
|
||||
{
|
||||
label: t("settings.extensions.application.details.created"),
|
||||
value: formatDateToLocal(created),
|
||||
value: dayjs(created).format("YYYY/MM/DD HH:mm:ss"),
|
||||
},
|
||||
{
|
||||
label: t("settings.extensions.application.details.modified"),
|
||||
value: formatDateToLocal(modified),
|
||||
value: dayjs(modified).format("YYYY/MM/DD HH:mm:ss"),
|
||||
},
|
||||
{
|
||||
label: t("settings.extensions.application.details.lastOpened"),
|
||||
value: formatDateToLocal(lastOpened),
|
||||
value: dayjs(lastOpened).format("YYYY/MM/DD HH:mm:ss"),
|
||||
},
|
||||
];
|
||||
}, [appMetadata]);
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import dayjs from "dayjs";
|
||||
import type { ConfigType } from "dayjs";
|
||||
|
||||
// Format "date" to local time. Fall back to "-" if it is invalid.
|
||||
export const formatDateToLocal = (date?: ConfigType) => {
|
||||
const fallback = "-";
|
||||
|
||||
// Fall back if it is null/undefined/emptystr
|
||||
if (date === null || date === undefined || date === "") return fallback;
|
||||
|
||||
const d = dayjs(date);
|
||||
|
||||
// Fall back if it is invalid
|
||||
if (!d.isValid()) {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
return d.format("YYYY/MM/DD HH:mm:ss");
|
||||
};
|
||||
Reference in New Issue
Block a user