From a9fb4075769bb47b006cacc99dcfbf5f5f122a83 Mon Sep 17 00:00:00 2001 From: Mateusz Rybczonek Date: Fri, 3 Nov 2023 11:36:56 +0100 Subject: [PATCH 1/5] feat(unhost-happ): add modal content --- src/components/StopHostingModal.vue | 171 ++++++++++-------- .../hAppDetails/HAppDetailsContent.vue | 27 +-- .../hAppDetails/HAppDetailsStopHosting.vue | 60 +++--- src/components/icons/BigCheckIcon.vue | 8 +- src/locales/en.ts | 17 ++ 5 files changed, 157 insertions(+), 126 deletions(-) diff --git a/src/components/StopHostingModal.vue b/src/components/StopHostingModal.vue index 7e7c0593..3459e741 100644 --- a/src/components/StopHostingModal.vue +++ b/src/components/StopHostingModal.vue @@ -1,110 +1,121 @@ + + - - - diff --git a/src/components/hAppDetails/HAppDetailsContent.vue b/src/components/hAppDetails/HAppDetailsContent.vue index 4b6c3b90..d0a98e16 100644 --- a/src/components/hAppDetails/HAppDetailsContent.vue +++ b/src/components/hAppDetails/HAppDetailsContent.vue @@ -69,9 +69,16 @@ const props = defineProps<{ -

- {{ props.hApp.name }} -

+
+

+ {{ props.hApp.name }} +

+ + +
- - - - - @@ -159,6 +161,11 @@ const props = defineProps<{ flex-direction: column; } + &-header { + display: flex; + justify-content: space-between; + } + &-name { margin: 0 0 40px 0; color: var(--grey-dark-color); @@ -179,10 +186,6 @@ const props = defineProps<{ &-usage { margin-top: 32px; } - - &-stop-hosting { - margin-top: 32px; - } } } diff --git a/src/components/hAppDetails/HAppDetailsStopHosting.vue b/src/components/hAppDetails/HAppDetailsStopHosting.vue index 09e28cf5..0527e83c 100644 --- a/src/components/hAppDetails/HAppDetailsStopHosting.vue +++ b/src/components/hAppDetails/HAppDetailsStopHosting.vue @@ -1,6 +1,9 @@ @@ -58,32 +67,23 @@ function stopHostingHApp(): void { align-items: center; } - &__label { - font-weight: 800; - font-size: 12px; - line-height: 16px; - text-decoration-line: underline; - color: var(--grey-dark-color); - margin-right: 10px; - cursor: pointer; - flex-shrink: 0; - } - &__warning { display: flex; + position: relative; align-items: flex-start; - background: #f3f5f8; border-radius: 4px; color: var(--grey-dark-color); font-size: 12px; font-weight: 400; padding: 4px 12px; - } -} -.alert-circle-icon { - flex-shrink: 0; - margin-right: 12px; + &-tooltip { + position: absolute; + top: 30px; + right: 8px; + width: 204px; + } + } } @media screen and (max-width: 1050px) { diff --git a/src/components/icons/BigCheckIcon.vue b/src/components/icons/BigCheckIcon.vue index f94afa22..9feb15d0 100644 --- a/src/components/icons/BigCheckIcon.vue +++ b/src/components/icons/BigCheckIcon.vue @@ -8,12 +8,12 @@ import Icon from '@/components/icons/Icon.vue' viewBox="0 0 66 66" > diff --git a/src/locales/en.ts b/src/locales/en.ts index bf6c09bd..21c664a4 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -42,6 +42,23 @@ export default { weekly_earnings: 'Weekly Earnings' }, happ_details: { + disable_hosting: 'Disable Hosting', + disable_hosting_warning: + 'Disabling hosting of a hApp will remove it and all associated data from your HoloPort.', + disable_hosting_modal: { + success: { + title: 'This hApp has been removed from hosting.', + description: + 'Please note it may take some time for the hApp to be fully removed from your HoloPort. Any hosting provided for storage during that time will be billed to the manager.' + }, + confirmation_button: 'Yes, disable', + description_one: + 'It will be removed from your HoloPort and will not be available for you to host again for 30 days.', + description_two: + 'All invoices, logs and payments associated with this hApp will remain available to you.', + title: 'Are you sure you want to disable this hApp?' + }, + enable_hosting: 'Enable Hosting', earnings: { total: 'Total Earnings', last_7_days: 'Earned in last 7 days', From 174f23be45a4bdf593bc753283843548784c0ec0 Mon Sep 17 00:00:00 2001 From: Mateusz Rybczonek Date: Fri, 3 Nov 2023 14:46:39 +0100 Subject: [PATCH 2/5] feat(unhost-happ): add host variant --- src/components/ErrorModal.vue | 1 + src/components/StopHostingModal.vue | 72 +++++++++++++++---- .../hAppDetails/HAppDetailsStopHosting.vue | 6 +- src/locales/en.ts | 11 +++ 4 files changed, 73 insertions(+), 17 deletions(-) diff --git a/src/components/ErrorModal.vue b/src/components/ErrorModal.vue index 66ffa380..3d074382 100644 --- a/src/components/ErrorModal.vue +++ b/src/components/ErrorModal.vue @@ -43,6 +43,7 @@ function close() { &__title { display: flex; align-items: center; + justify-content: center; margin-top: 6px; font-size: 26px; font-weight: 600; diff --git a/src/components/StopHostingModal.vue b/src/components/StopHostingModal.vue index 3459e741..08728337 100644 --- a/src/components/StopHostingModal.vue +++ b/src/components/StopHostingModal.vue @@ -1,15 +1,19 @@