2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-11-27 10:51:33 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2018-11-05 15:26:18 +00:00
|
|
|
<template>
|
2020-09-23 14:50:05 +01:00
|
|
|
<div id="app">
|
2021-08-10 14:14:37 +01:00
|
|
|
<router-view />
|
2018-12-18 14:43:23 +00:00
|
|
|
<!-- Area for displaying notification -->
|
2021-08-10 14:14:37 +01:00
|
|
|
<NotificationArea />
|
2018-12-18 14:43:23 +00:00
|
|
|
</div>
|
2018-11-05 15:26:18 +00:00
|
|
|
</template>
|
|
|
|
|
2018-12-12 13:44:01 +00:00
|
|
|
<script lang="ts">
|
2019-09-09 11:33:39 +01:00
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
|
|
|
|
import NotificationArea from '@/components/notifications/NotificationArea.vue';
|
|
|
|
|
2022-04-07 12:04:24 +01:00
|
|
|
import { PartneredSatellite } from '@/types/common';
|
2019-09-09 11:33:39 +01:00
|
|
|
import { APP_STATE_ACTIONS } from '@/utils/constants/actionNames';
|
2019-11-18 11:38:43 +00:00
|
|
|
import { MetaUtils } from '@/utils/meta';
|
2019-09-09 11:33:39 +01:00
|
|
|
|
2021-08-31 14:49:45 +01:00
|
|
|
// @vue/component
|
2019-09-09 11:33:39 +01:00
|
|
|
@Component({
|
|
|
|
components: {
|
2019-09-13 15:58:18 +01:00
|
|
|
NotificationArea,
|
2019-09-09 11:33:39 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class App extends Vue {
|
2020-02-14 15:35:10 +00:00
|
|
|
/**
|
|
|
|
* Lifecycle hook after initial render.
|
|
|
|
* Sets up variables from meta tags from config such satellite name, etc.
|
|
|
|
*/
|
2019-11-06 12:27:26 +00:00
|
|
|
public mounted(): void {
|
2019-11-18 11:38:43 +00:00
|
|
|
const satelliteName = MetaUtils.getMetaContent('satellite-name');
|
2021-09-08 10:23:50 +01:00
|
|
|
const partneredSatellitesData = MetaUtils.getMetaContent('partnered-satellites');
|
2022-06-28 17:12:43 +01:00
|
|
|
let partneredSatellitesJSON = [];
|
2021-09-29 13:20:20 +01:00
|
|
|
if (partneredSatellitesData) {
|
2022-06-28 17:12:43 +01:00
|
|
|
partneredSatellitesJSON = JSON.parse(partneredSatellitesData);
|
2021-09-08 10:23:50 +01:00
|
|
|
}
|
2021-02-23 17:26:24 +00:00
|
|
|
const isBetaSatellite = MetaUtils.getMetaContent('is-beta-satellite');
|
2021-06-22 01:09:56 +01:00
|
|
|
const couponCodeBillingUIEnabled = MetaUtils.getMetaContent('coupon-code-billing-ui-enabled');
|
|
|
|
const couponCodeSignupUIEnabled = MetaUtils.getMetaContent('coupon-code-signup-ui-enabled');
|
2021-11-03 12:16:18 +00:00
|
|
|
const isNewProjectDashboard = MetaUtils.getMetaContent('new-project-dashboard');
|
2021-11-02 13:36:28 +00:00
|
|
|
const isNewObjectsFlow = MetaUtils.getMetaContent('new-objects-flow');
|
2019-11-06 12:27:26 +00:00
|
|
|
|
|
|
|
if (satelliteName) {
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_SATELLITE_NAME, satelliteName);
|
2021-04-23 15:22:20 +01:00
|
|
|
|
2022-06-28 17:12:43 +01:00
|
|
|
if (partneredSatellitesJSON.length) {
|
2021-04-23 15:22:20 +01:00
|
|
|
const partneredSatellites: PartneredSatellite[] = [];
|
2022-06-28 17:12:43 +01:00
|
|
|
partneredSatellitesJSON.forEach((sat: PartneredSatellite) => {
|
2021-04-23 15:22:20 +01:00
|
|
|
// skip current satellite
|
2022-06-28 17:12:43 +01:00
|
|
|
if (sat.name !== satelliteName) {
|
|
|
|
partneredSatellites.push(sat);
|
2021-04-23 15:22:20 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_PARTNERED_SATELLITES, partneredSatellites);
|
|
|
|
}
|
2019-11-06 12:27:26 +00:00
|
|
|
}
|
2019-11-27 16:57:59 +00:00
|
|
|
|
2021-02-23 17:26:24 +00:00
|
|
|
if (isBetaSatellite) {
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_SATELLITE_STATUS, isBetaSatellite === 'true');
|
|
|
|
}
|
|
|
|
|
2021-06-22 01:09:56 +01:00
|
|
|
if (couponCodeBillingUIEnabled) {
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_COUPON_CODE_BILLING_UI_STATUS, couponCodeBillingUIEnabled === 'true');
|
|
|
|
}
|
2021-09-22 21:10:15 +01:00
|
|
|
|
2021-06-22 01:09:56 +01:00
|
|
|
if (couponCodeSignupUIEnabled) {
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_COUPON_CODE_SIGNUP_UI_STATUS, couponCodeSignupUIEnabled === 'true');
|
2021-02-24 22:35:24 +00:00
|
|
|
}
|
2021-09-22 21:10:15 +01:00
|
|
|
|
2021-11-03 12:16:18 +00:00
|
|
|
if (isNewProjectDashboard) {
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_PROJECT_DASHBOARD_STATUS, isNewProjectDashboard === 'true');
|
|
|
|
}
|
|
|
|
|
2021-11-02 13:36:28 +00:00
|
|
|
if (isNewObjectsFlow) {
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SET_OBJECTS_FLOW_STATUS, isNewObjectsFlow === 'true');
|
|
|
|
}
|
2019-11-06 12:27:26 +00:00
|
|
|
}
|
2019-09-09 11:33:39 +01:00
|
|
|
}
|
2018-12-12 13:44:01 +00:00
|
|
|
</script>
|
|
|
|
|
2018-11-05 15:26:18 +00:00
|
|
|
<style lang="scss">
|
2020-09-09 19:25:59 +01:00
|
|
|
html {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2019-07-30 11:13:24 +01:00
|
|
|
body {
|
2019-09-23 12:31:42 +01:00
|
|
|
margin: 0 !important;
|
2019-07-30 11:13:24 +01:00
|
|
|
height: 100vh;
|
|
|
|
zoom: 100%;
|
2020-09-09 19:25:59 +01:00
|
|
|
overflow: hidden;
|
2019-07-30 11:13:24 +01:00
|
|
|
}
|
|
|
|
|
2019-09-26 14:36:12 +01:00
|
|
|
img,
|
|
|
|
a {
|
|
|
|
-webkit-user-drag: none;
|
|
|
|
}
|
|
|
|
|
2021-10-11 15:23:41 +01:00
|
|
|
#app {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2018-12-18 14:43:23 +00:00
|
|
|
@font-face {
|
2019-10-28 15:59:19 +00:00
|
|
|
font-family: 'font_regular';
|
2021-06-22 11:16:06 +01:00
|
|
|
font-style: normal;
|
|
|
|
font-weight: 400;
|
2019-09-12 12:53:43 +01:00
|
|
|
font-display: swap;
|
2021-08-02 19:17:49 +01:00
|
|
|
src:
|
|
|
|
local(''),
|
2021-06-22 11:16:06 +01:00
|
|
|
url('../static/fonts/inter-v3-latin-regular.woff2') format('woff2'),
|
|
|
|
url('../static/fonts/inter-v3-latin-regular.woff') format('woff'),
|
|
|
|
url('../static/fonts/inter-v3-latin-regular.ttf') format('truetype');
|
2018-12-18 14:43:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
2019-10-28 15:59:19 +00:00
|
|
|
font-family: 'font_medium';
|
2021-06-22 11:16:06 +01:00
|
|
|
font-style: normal;
|
|
|
|
font-weight: 600;
|
2019-09-12 12:53:43 +01:00
|
|
|
font-display: swap;
|
2021-08-02 19:17:49 +01:00
|
|
|
src:
|
|
|
|
local(''),
|
2021-06-22 11:16:06 +01:00
|
|
|
url('../static/fonts/inter-v3-latin-600.woff2') format('woff2'),
|
|
|
|
url('../static/fonts/inter-v3-latin-600.woff') format('woff'),
|
|
|
|
url('../static/fonts/inter-v3-latin-600.ttf') format('truetype');
|
2018-12-18 14:43:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
2019-10-28 15:59:19 +00:00
|
|
|
font-family: 'font_bold';
|
2021-06-22 11:16:06 +01:00
|
|
|
font-style: normal;
|
|
|
|
font-weight: 800;
|
2019-09-12 12:53:43 +01:00
|
|
|
font-display: swap;
|
2021-08-02 19:17:49 +01:00
|
|
|
src:
|
|
|
|
local(''),
|
2021-06-22 11:16:06 +01:00
|
|
|
url('../static/fonts/inter-v3-latin-800.woff2') format('woff2'),
|
|
|
|
url('../static/fonts/inter-v3-latin-800.woff') format('woff'),
|
|
|
|
url('../static/fonts/inter-v3-latin-800.ttf') format('truetype');
|
2018-12-18 14:43:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
2020-09-09 19:25:59 +01:00
|
|
|
text-decoration: none;
|
|
|
|
outline: none;
|
2018-12-18 14:43:23 +00:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
input,
|
|
|
|
textarea {
|
|
|
|
font-family: inherit;
|
2022-05-05 09:21:47 +01:00
|
|
|
border: 1px solid rgb(56 75 101 / 40%);
|
2019-01-14 15:39:21 +00:00
|
|
|
color: #354049;
|
2019-10-28 15:59:19 +00:00
|
|
|
caret-color: #2683ff;
|
2018-12-18 14:43:23 +00:00
|
|
|
}
|
2019-05-29 17:22:16 +01:00
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
box-shadow: inset 0 0 5px #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
2019-10-28 15:59:19 +00:00
|
|
|
background: #afb7c1;
|
2019-05-29 17:22:16 +01:00
|
|
|
border-radius: 6px;
|
|
|
|
height: 5px;
|
|
|
|
}
|
2018-11-05 15:26:18 +00:00
|
|
|
</style>
|