Skip to content

Commit

Permalink
Merge branch 'overlayeddev:main' into me3di
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyr33x committed Sep 12, 2024
2 parents 29f9d9d + c64d8a8 commit cd46a5d
Show file tree
Hide file tree
Showing 9 changed files with 6,740 additions and 8,474 deletions.
3,617 changes: 1 addition & 3,616 deletions apps/desktop/src-tauri/gen/schemas/acl-manifests.json

Large diffs are not rendered by default.

34 changes: 1 addition & 33 deletions apps/desktop/src-tauri/gen/schemas/capabilities.json
Original file line number Diff line number Diff line change
@@ -1,33 +1 @@
{
"desktop-capability": {
"identifier": "desktop-capability",
"description": "",
"local": true,
"windows": ["main", "settings"],
"webviews": ["main", "settings"],
"permissions": [
"core:default",
"updater:default",
"fs:default",
{ "identifier": "fs:allow-app-write", "allow": [{ "path": "$APPCONFIG/*" }] },
"core:window:allow-set-size",
"core:window:allow-start-dragging",
"process:default",
"core:tray:default",
"core:app:default",
"core:event:default",
"shell:default",
"websocket:default",
"window-state:default",
{ "identifier": "http:default", "allow": [{ "url": "https://api.overlayed.dev" }] }
],
"platforms": ["macOS", "windows", "linux"]
},
"migrated": {
"identifier": "migrated",
"description": "permissions that were migrated from v1",
"local": true,
"windows": ["main"],
"permissions": ["core:default"]
}
}
{"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"windows":["main","settings"],"webviews":["main","settings"],"permissions":["core:default","updater:default","fs:default",{"identifier":"fs:allow-app-write","allow":[{"path":"$APPCONFIG/*"}]},"core:window:allow-set-size","core:window:allow-start-dragging","process:default","core:tray:default","core:app:default","core:event:default","shell:default","websocket:default","window-state:default",{"identifier":"http:default","allow":[{"url":"https://api.overlayed.dev"}]}],"platforms":["macOS","windows","linux"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:default"]}}
3,842 changes: 2,883 additions & 959 deletions apps/desktop/src-tauri/gen/schemas/desktop-schema.json

Large diffs are not rendered by default.

3,842 changes: 959 additions & 2,883 deletions apps/desktop/src-tauri/gen/schemas/linux-schema.json

Large diffs are not rendered by default.

3,842 changes: 2,883 additions & 959 deletions apps/desktop/src-tauri/gen/schemas/macOS-schema.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions apps/desktop/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,12 @@ fn main() {
app
.build(tauri::generate_context!())
.expect("An error occured while running the app!")
.run(|app, event| {
.run(|_app, event| {
if let tauri::RunEvent::WindowEvent {
label,
event: tauri::WindowEvent::CloseRequested { api, .. },
..
} = event
{
let win = app.get_webview_window(label.as_str()).unwrap();
api.prevent_close();
}
});
Expand Down
7 changes: 6 additions & 1 deletion apps/desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
"icons/stable/[email protected]",
"icons/stable/icon.icns",
"icons/stable/icon.ico"
]
],
"windows": {
"webviewInstallMode": {
"type": "offlineInstaller"
}
}
},
"productName": "Overlayed",
"version": "0.5.0",
Expand Down
16 changes: 0 additions & 16 deletions apps/desktop/src/views/settings/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { emit } from "@tauri-apps/api/event";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import type { VoiceUser } from "@/types";
import { useConfigValue } from "@/hooks/use-config-value";
import { Slider } from "@/components/ui/slider";
import * as shell from "@tauri-apps/plugin-shell";

export const Developer = () => {
Expand Down Expand Up @@ -126,7 +125,6 @@ export const Account = () => {
const [showQuitDialog, setShowQuitDialog] = useState(false);
const [user, setUser] = useState<VoiceUser | null>(null);
const [tokenExpires, setTokenExpires] = useState(localStorage.getItem("discord_access_token_expiry"));
const [zoom, setZoom] = useState(1);

// pull out the user data from localStorage
useEffect(() => {
Expand Down Expand Up @@ -267,20 +265,6 @@ export const Account = () => {
<Developer />
</div>
<AppInfo />
Zoom
<Slider
onValueChange={async ([val]) => {
setZoom(val as number);
console.log(val);
await invoke("zoom_window", { scaleFactor: zoom });
}}
defaultValue={[1.0]}
min={0.4}
max={1.5}
step={0.1}
className="w-[60%]"
/>
{zoom}
</div>
</div>
);
Expand Down
10 changes: 6 additions & 4 deletions apps/web/src/components/react/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Download = ({ canary = true }: { canary?: boolean }) => {
const [platformDownloads, setPlatformDownloads] = useState<{
downloads: PlatformDownload[];
latestVersion: string;
updated?: string;
updatedAt?: string;
}>({
downloads: [],
latestVersion: "",
Expand All @@ -38,14 +38,16 @@ export const Download = ({ canary = true }: { canary?: boolean }) => {
useEffect(() => {
const timerId = setInterval(() => {
setFormattedTime(
getRelativeTime(platformDownloads.updated || new Date()),
getRelativeTime(platformDownloads.updatedAt || new Date()),
);
}, 1000);

setFormattedTime(getRelativeTime(platformDownloads.updated || new Date()));
setFormattedTime(
getRelativeTime(platformDownloads.updatedAt || new Date()),
);

return () => clearInterval(timerId);
}, [platformDownloads.updated]);
}, [platformDownloads.updatedAt]);

const commitSha = platformDownloads.latestVersion.substring(0, 7);
const shortCommitSha = commitSha.substring(0, 7);
Expand Down

0 comments on commit cd46a5d

Please sign in to comment.