adds profile sharing
This commit is contained in:
@@ -3,12 +3,16 @@
|
||||
import { page } from "$app/stores";
|
||||
import Button from "$lib/components/base/button.svelte";
|
||||
import type { SelectItem } from "$lib/components/base/select.svelte";
|
||||
import ProfileShareModal from "$lib/components/profile/profile_share_modal.svelte";
|
||||
import { follows_create, follows_delete } from "$lib/stores/follow_store";
|
||||
import { currentUser } from "$lib/stores/user_store";
|
||||
import { getFileURL } from "$lib/util/file_util";
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
export let data;
|
||||
|
||||
let openShareModal: () => void;
|
||||
|
||||
let followLoading: boolean = false;
|
||||
|
||||
const profileLinks: SelectItem[] = [
|
||||
@@ -115,9 +119,18 @@
|
||||
</div>
|
||||
{#if data.isOwnProfile}
|
||||
<div class="px-6 mb-4 flex flex-col gap-2">
|
||||
<button class="btn-secondary basis-full">Share profile</button>
|
||||
<a class="btn-secondary text-center basis-full" href="/settings/profile">{$_("settings")}</a>
|
||||
<button
|
||||
class="btn-secondary basis-full"
|
||||
on:click={() => openShareModal()}
|
||||
>{$_("share-profile")}</button
|
||||
>
|
||||
<a
|
||||
class="btn-secondary text-center basis-full"
|
||||
href="/settings/profile">{$_("settings")}</a
|
||||
>
|
||||
</div>
|
||||
<ProfileShareModal bind:openModal={openShareModal}
|
||||
></ProfileShareModal>
|
||||
{/if}
|
||||
</div>
|
||||
<slot></slot>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { goto } from "$app/navigation";
|
||||
import { page } from "$app/stores";
|
||||
import { type RadioItem } from "$lib/components/base/radio_group.svelte";
|
||||
import { type SearchItem } from "$lib/components/base/search.svelte";
|
||||
import { type SelectItem } from "$lib/components/base/select.svelte";
|
||||
import ConfirmModal from "$lib/components/confirm_modal.svelte";
|
||||
import EmailModal from "$lib/components/settings/email_modal.svelte";
|
||||
import PasswordModal from "$lib/components/settings/password_modal.svelte";
|
||||
@@ -14,26 +11,14 @@
|
||||
users_delete,
|
||||
users_update,
|
||||
} from "$lib/stores/user_store";
|
||||
import { country_codes } from "$lib/util/country_code_util";
|
||||
import { onMount } from "svelte";
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
const settings = $page.data.settings;
|
||||
|
||||
const mapFocus: SelectItem[] = [
|
||||
{ text: $_("trail", { values: { n: 2 } }), value: "trails" },
|
||||
{ text: $_("location"), value: "location" },
|
||||
];
|
||||
|
||||
const units: RadioItem[] = [
|
||||
{ text: $_("metric"), value: "metric" },
|
||||
{ text: $_("imperial"), value: "imperial" },
|
||||
];
|
||||
|
||||
let selectedLanguage = "en";
|
||||
let selectedMapFocus = "trails";
|
||||
|
||||
let searchDropdownItems: SearchItem[] = [];
|
||||
let citySearchQuery: string = "";
|
||||
|
||||
let openConfirmModal: () => void;
|
||||
|
||||
Reference in New Issue
Block a user