Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Nov 5, 2023
1 parent 720cc64 commit 5854bb3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ jobs:
version: 8
- name: install frontend dependencies
run: pnpm install
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build tauri app
run: pnpm tauri build --ci -v --target universal-apple-darwin
- uses: actions/upload-artifact@v2
with:
name: "overlayed-unstable-mac"
Expand All @@ -39,9 +38,8 @@ jobs:
version: 8
- name: install frontend dependencies
run: pnpm install
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build tauri app
run: pnpm tauri build --ci -v --target x86_64-pc-windows-msvc
- uses: actions/upload-artifact@v2
with:
name: "overlayed-unstable-windows"
Expand Down
Binary file added public/img/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions src/components/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const User = ({ item }: { item: OverlayedUser }) => {

const avatarUrl = avatarHash
? `https://cdn.discordapp.com/avatars/${id}/${avatarHash}.jpg`
: "./img/default.png";
: "/img/default.png";

const talkingClass = talking ? "border-green-500" : "border-zinc-800";
const mutedClass = selfMuted ? "text-zinc-400" : "";
Expand All @@ -17,7 +17,17 @@ export const User = ({ item }: { item: OverlayedUser }) => {
<div
className={`pointer-events-none rounded-full w-8 h-8 border-2 mr-2 ${talkingClass}`}
>
<img src={avatarUrl} alt="avatar" className="rounded-full" />
<img
onError={(e) => {
// @ts-ignore
e.target.onerror = null;
// @ts-ignore
e.target.src = "/img/default.png";
}}
src={avatarUrl}
alt="avatar"
className="rounded-full"
/>
</div>

<div
Expand Down
10 changes: 7 additions & 3 deletions src/views/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { useNavigate } from "react-router-dom";

export const Settings = () => {
const navigate = useNavigate();
return (
<div
<div
style={{ height: "calc(100vh - 48px)" }}
className="bg-zinc-800 p-4 pt-4 pb-4">
className="bg-zinc-800 p-4 pt-4 pb-4"
>
<h1 className="text-xl font-bold">Settings</h1>
<div>
<button
onClick={() => {
localStorage.removeItem("discord_access_token");
window.location.reload();
navigate("/");
}}
className="bg-blue-800 p-2 rounded-md"
>
Expand Down

0 comments on commit 5854bb3

Please sign in to comment.