Skip to content

Commit

Permalink
Merge pull request #39 from maidsafe/main
Browse files Browse the repository at this point in the history
v0.0.6
  • Loading branch information
beckthetech authored Jan 10, 2025
2 parents 8a43749 + 0d4cfc1 commit 4853692
Show file tree
Hide file tree
Showing 18 changed files with 347 additions and 70 deletions.
42 changes: 36 additions & 6 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,36 @@ createAppKit({
networks,
projectId,
metadata: {
name: 'AppKit Vue Example',
description: 'AppKit Vue Example',
name: 'Autonomi',
description: 'Autonomi',
url: 'https://reown.com/appkit',
icons: ['https://avatars.githubusercontent.com/u/179229932?s=200&v=4'],
},
features: {
email: false,
socials: false,
},
includeWalletIds: [
'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // Metamask
'4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', // Trust wallet
'971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709', // OKX Wallet
'8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4', // Binance Wallet
'38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662', // Bitget Wallet
'0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150', // SafePal
'c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a', // Uniswap Wallet
'15c8b91ade1a4e58f3ce4e7a0dd7f42b47db0c8df7e0d84f63eb39bcb96c4e0f', // Bybit Wallet
'20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66', // Token Pocket
'19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927', // Ledger Live
'1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', // Rainbow
'f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d', // Crypto.com
'ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18', // Zerion
'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef', // imToken
'c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576', // 1inch Wallet
'18450873727504ae9315a084fa7624b5297d2fe5880f0982979c17345a138277', // Kraken Wallet
'225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f', // Safe
'344d0e58b139eb1b6da0c29ea71d52a8eace8b57897c6098cb9b46012665c193', // Timeless X
'541d5dcd4ede02f3afaf75bf8e3e4c4f1fb09edb5fa6c4377ebf31c2785d9adf', // Ronin Wallet
]
});
const classesLinks = `w-full h-[64px] text-lg flex items-center justify-start text-autonomi-text-primary hover:text-autonomi-text-secondary gap-3 transition-all duration-300 cursor-pointer`;
Expand All @@ -30,6 +55,7 @@ const { openConnectWallet, openDisconnectWallet, wallet } =
const notifyType = ref<'info' | 'warning'>('info');
const notifyTitle = ref('');
const notifyDetails = ref('');
const notifyCancelEnabled = ref(false);
const showNotification = ref(false);
const isFadeOut = ref(false);
const removeSplashScreen = ref(false);
Expand All @@ -56,13 +82,15 @@ const handleShowNotification = (payload: any) => {
notifyType.value = payload.notifyType || 'info';
notifyTitle.value = payload.title || '';
notifyDetails.value = payload.details;
notifyCancelEnabled.value = payload.enabledCancel || false;
showNotification.value = true;
};
const handleHideNotification = () => {
console.log('>>> Notification closed');
showNotification.value = false;
pendingFilesSignature.value = false;
notifyCancelEnabled.value = false;
};
watchEffect(() => {
Expand All @@ -71,7 +99,8 @@ watchEffect(() => {
notifyType: 'info',
title: 'Sign file request',
details:
'To view your files please sign the file request in your wallet.',
'To view your files please sign the file request in your mobile wallet.',
enabledCancel: true,
});
} else {
handleHideNotification();
Expand Down Expand Up @@ -135,7 +164,7 @@ onMounted(async () => {

<NuxtLink :class="`${classesLinks}`" to="/settings">
<IconSettings class="w-6 h-6" />
Support
About us
</NuxtLink>
</div>
</div>
Expand Down Expand Up @@ -165,7 +194,8 @@ onMounted(async () => {
:notify-type="notifyType"
:title="notifyTitle"
:details="notifyDetails"
@close-notification="handleHideNotification"
:can-cancel="notifyCancelEnabled"
@close-notify="handleHideNotification"
/>

<PaymentDrawer
Expand Down
9 changes: 1 addition & 8 deletions components/DialogConnectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ const handleLogIn = async () => {
console.log(">>> Response", response);
if (response.success) {
toast.add({
severity: "success",
summary: "Success",
detail: "TEST: Logged in successfully",
life: 3000,
});
if (callbackConnectWallet.value) {
callbackConnectWallet.value();
}
Expand Down Expand Up @@ -82,7 +75,7 @@ const handleLogIn = async () => {
Cancel
</CommonButton>
<CommonButton variant="primary" size="large" @click="handleLogIn">
<i class="pi pi-wallet" /> Connect Your Wallet
<i class="pi pi-wallet" /> Connect Your Mobile Wallet
</CommonButton>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions components/DialogDisconnectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ const handleDisconnectWallet = async () => {
toast.add({
severity: "success",
summary: "Success",
detail: "Wallet disconnected successfully",
detail: "Mobile wallet disconnected successfully",
life: 3000,
});
navigateTo("/");
} else {
throw new Error("Failed to disconnect wallet");
throw new Error("Failed to disconnect mobile wallet");
}
} catch (error) {
toast.add({
Expand Down Expand Up @@ -80,7 +80,7 @@ const handleDisconnectWallet = async () => {
size="large"
@click="handleDisconnectWallet"
>
<i class="pi pi-times-circle" />Disconnect Your Wallet
<i class="pi pi-times-circle" />Disconnect Your Mobile Wallet
</CommonButton>
</div>
</div>
Expand Down
16 changes: 16 additions & 0 deletions components/DialogNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const props = defineProps<{
notifyType: 'info' | 'warning';
title: string;
details: string;
canCancel?: boolean;
}>();
const emit = defineEmits(["close-notify"]);
Expand All @@ -20,6 +21,10 @@ const { visible } = props;
// const handleCancelDisconnect = () => {
// emit("close-disconnect-wallet");
// };
const handleCancelNotify = () => {
emit("close-notify");
};
</script>

<template>
Expand All @@ -43,6 +48,17 @@ const { visible } = props;
>
<span>{{ details }}</span>
</div>

<div v-if="props.canCancel" class="mt-4">
<CommonButton
variant="secondary"
size="small"
@click="handleCancelNotify"
class="flex"
>
<span aria-label="Cancel">Cancel</span>
</CommonButton>
</div>
</div>
</template>
</Dialog>
Expand Down
6 changes: 3 additions & 3 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ onBeforeUnmount(() => {
<div class="flex items-center gap-3">
<div
v-tooltip.bottom="
wallet.isConnected ? 'Disconnect Wallet' : 'Connect Wallet'
wallet.isConnected ? 'Disconnect Mobile Wallet' : 'Connect Mobile Wallet'
"
class="w-10 h-10 rounded-full bg-autonomi-blue-800 flex items-center justify-center cursor-pointer"
@click="handleClickWallet"
Expand Down Expand Up @@ -246,7 +246,7 @@ onBeforeUnmount(() => {
>
<div
class="w-10 h-10 bg-autonomi-blue-800 flex items-center justify-center rounded-full cursor-pointer"
v-tooltip.bottom="'Disconnect Wallet'"
v-tooltip.bottom="'Disconnect Mobile Wallet'"
@click="handleClickWallet"
>
<i class="pi pi-wallet text-white" />
Expand Down Expand Up @@ -305,7 +305,7 @@ onBeforeUnmount(() => {
>
<div>
<div class="text-2xl font-semibold text-autonomi-header-text">
Support
About us
</div>
<!-- <div class="text-xs font-semibold text-autonomi-gray-500">
Current: Default
Expand Down
2 changes: 1 addition & 1 deletion components/PaymentDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ watchEffect(() => {
if (signPaymentPending.value) {
emit("show-notify", {
title: "Payment request",
details: "Please sign the payment request in your wallet app.",
details: "Please sign the payment request in your mobile wallet app.",
notifyType: "info",
});
} else {
Expand Down
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const handleGetStarted = () => {
</h1>
<p class="mt-4 text-autonomi-text-primary">
Welcome to the Autonomi vault. This is a secure private data store
linked to your wallet, accessible from anywhere. You will need to link a
linked to your mobile wallet, accessible from anywhere. You will need to link a
wallet in order to pay for the upload and gas fees. Once you have linked
your wallet, you will be able to see any files associated with it. You
your mobile wallet, you will be able to see any files associated with it. You
can also upload new files from here. To get started, press the button
below.
</p>
Expand Down
33 changes: 19 additions & 14 deletions pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,28 @@ const navButtons = ref([
const supportLinks = ref([
{
name: "Quick start guides",
link: "#",
icon: "pi pi-file-pdf",
name: "Autonomi.com",
link: "http://autonomi.com",
icon: "pi pi-link",
target: "_blank",
},
{
name: "Direct Support",
link: "#",
icon: "pi pi-envelope",
name: "Discord",
link: "https://discord.com/invite/autonomi",
target: "_blank",
icon: "pi pi-discord",
},
{
name: "Rewards programme",
link: "#",
icon: "pi pi-star",
name: "Forum",
link: "https://forum.autonomi.community/",
icon: "pi pi-link",
target: "_blank",
},
{
name: "Download the latest launchpad",
link: "#",
icon: "pi pi-download",
name: "Follow on X",
link: "https://forum.autonomi.community/",
target: "_blank",
icon: "pi pi-twitter",
},
]);
Expand Down Expand Up @@ -576,13 +580,14 @@ onMounted(async () => {
<!-- Help & Support -->
<div class="pr-[66px] pl-[110px] mt-12">
<h3 class="text-2xl text-autonomi-header-text-dark font-semibold">
Help and support
About us
</h3>

<div class="grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 mt-7">
<NuxtLink
v-for="link in supportLinks"
to="#"
:to="link.link"
:target="link.target"
class="text-autonomi-text-primary font-semibold flex flex-col items-center justify-center border-autonomi-text-primary/50 border rounded-lg h-24 bg-white/30 text-center gap-2 hover:bg-white transition-all duration-300 hover:border-autonomi-text-primary px-3"
>
<i :class="`${link.icon} text-autonomi-blue-600 mr-1`" />
Expand Down
2 changes: 1 addition & 1 deletion pages/upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const openPickerAndUploadFiles = async () => {
emit("show-notify", {
notifyType: "info",
title: "Sign upload required",
details: "Please sign the upload request in your wallet.",
details: "Please sign the upload request in your mobile wallet.",
});
let vaultKeySignature = await walletStore.getVaultKeySignature();
Expand Down
40 changes: 40 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ tauri-plugin-dialog = "2"
thiserror = "2.0.8"
toml = "0.8.19"
tokio = { version = "1.42.0", features = ["fs"] }
fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" }

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-updater = "2"
Loading

0 comments on commit 4853692

Please sign in to comment.