Skip to content

Commit

Permalink
Merge pull request #1212 from appwrite/fix-icon-paths
Browse files Browse the repository at this point in the history
fix: icon paths
  • Loading branch information
TorstenDittmann authored Jul 18, 2024
2 parents 9a04419 + c4fc38f commit 38cbb68
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/lib/stores/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { browser } from '$app/environment';
import { base } from '$app/paths';
import { derived, writable } from 'svelte/store';

export type AppStore = {
Expand All @@ -13,7 +14,7 @@ export const app = writable<AppStore>({

export const iconPath = derived(app, ($app) => {
return (name: string, type: 'color' | 'grayscale') => {
return `/icons/${$app.themeInUse}/${type}/${name}.svg`;
return `${base}/icons/${$app.themeInUse}/${type}/${name}.svg`;
};
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import { sdk } from '$lib/stores/sdk';
import type { Models } from '@appwrite.io/console';
import { project } from '../../store';
import { base } from '$app/paths';
const projectId = $page.params.project;
let showProvider = false;
Expand Down Expand Up @@ -83,7 +84,7 @@
<img
height="20"
width="20"
src={`/icons/${$app.themeInUse}/color/${oAuthProvider.icon}.svg`}
src={`${base}/icons/${$app.themeInUse}/color/${oAuthProvider.icon}.svg`}
alt={provider.name} />
</div>
<p class="u-margin-block-start-8">{provider.name}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import type { Column } from '$lib/helpers/types';
import { oAuthProviders } from '$lib/stores/oauth-providers';
import { app } from '$lib/stores/app';
import { base } from '$app/paths';
export let columns: Column[];
export let data: PageData;
Expand Down Expand Up @@ -93,7 +94,7 @@
style="--p-text-size: 1rem"
height="20"
width="20"
src={`/icons/${$app.themeInUse}/color/${provider.icon}.svg`}
src={`${base}/icons/${$app.themeInUse}/color/${provider.icon}.svg`}
alt={provider.name} />
</div>
{provider.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<span class="u-flex u-cross-center u-gap-16">
<div class="avatar is-medium" aria-hidden="true">
<img
src={`/icons/${$app.themeInUse}/${platform.icon}.svg`}
src={`${base}/icons/${$app.themeInUse}/${platform.icon}.svg`}
alt="technology" />
</div>
<span class="text">{platform.title}</span>
Expand Down Expand Up @@ -116,7 +116,7 @@
<span class="u-flex u-cross-center u-gap-16">
<div class="avatar is-medium" aria-hidden="true">
<img
src={`/icons/${$app.themeInUse}/grayscale/code.svg`}
src={`${base}/icons/${$app.themeInUse}/grayscale/code.svg`}
alt="technology" />
</div>
<span class="text">API key</span>
Expand All @@ -135,7 +135,7 @@
<span class="u-flex u-cross-center u-gap-16">
<div class="avatar is-medium" aria-hidden="true">
<img
src={`/icons/${$app.themeInUse}/grayscale/code.svg`}
src={`${base}/icons/${$app.themeInUse}/grayscale/code.svg`}
alt="technology" />
</div>
<span class="text">Webhook</span>
Expand Down

0 comments on commit 38cbb68

Please sign in to comment.