Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Move more towards composition API, fix Docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDewes committed May 13, 2022
1 parent 3fe5486 commit 5925005
Show file tree
Hide file tree
Showing 32 changed files with 252 additions and 512 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Dockerfile
node_modules
.git
.github
.yarn/cache
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ FROM node:${NODE_VERSION}-alpine@sha256:469ee26d9e00547ea91202a34ff2542f984c2c60

# DEVELOPMENT
FROM node-builder AS development

RUN apk add git

# Create app directory
WORKDIR /app
# NOTE: Using project files from mounted volumes
Expand All @@ -21,22 +24,29 @@ CMD yarn install && yarn dev

# DEPENDENCIES (production)
FROM node-builder AS dependencies
RUN apk add git

# Create app directory
WORKDIR /app

# Copy dependency management files
COPY .yarnrc.yml package.json yarn.lock ./
# Ignore yarn.lock for now because it breaks with bootstrap-vue
COPY .yarnrc.yml package.json ./
COPY .yarn/releases/yarn-3.2.0.cjs /app/.yarn/releases/yarn-3.2.0.cjs
# Install dependencies
RUN yarn install


# BUILD (production)
FROM dependencies AS builder

WORKDIR /app

# Copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .

# Build app for production
RUN yarn build
RUN ./node_modules/.bin/vite build


# PRODUCTION
Expand Down
33 changes: 11 additions & 22 deletions src/components/ConnectWallet/ConnectionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,23 @@
</card-widget>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import {PropType} from 'vue';
import useBitcoinStore from '../../store/bitcoin';
import CardWidget from '../CardWidget.vue';
export default defineComponent({
components: {
CardWidget,
},
props: {
name: {
type: String,
required: true,
},
requires: {
type: String,
default: '', //electrum, bitcoin-core, lnd, or empty if no specific protocol required
},
},
setup() {
const bitcoinStore = useBitcoinStore();
return {bitcoinStore};
defineProps({
name: {
type: String,
required: true,
},
data() {
return {};
requires: {
type: String as PropType<'' | 'electrum' | 'bitcoind' | 'lnd'>,
default: '',
},
methods: {},
});
const bitcoinStore = useBitcoinStore();
</script>

<style lang="scss" scoped></style>
6 changes: 0 additions & 6 deletions src/components/ConnectWallet/Step.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@
<slot></slot>
</li>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
export default defineComponent({});
</script>
6 changes: 0 additions & 6 deletions src/components/ConnectWallet/StepList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@
<slot></slot>
</ol>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
export default defineComponent({});
</script>
26 changes: 8 additions & 18 deletions src/components/ConnectWallet/Wallets/BitBoxApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,19 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import StepList from '../StepList.vue';
import Step from '../Step.vue';
import TorSetup from '../TorSetup.vue';
import InputCopy from '../../Utility/InputCopy.vue';
import TorSetup from '../TorSetup.vue';
export default defineComponent({
components: {
ConnectionDetails,
StepList,
Step,
InputCopy,
TorSetup,
defineProps({
urls: {
type: Object,
required: true,
},
props: {
urls: {
type: Object,
required: true,
},
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
22 changes: 7 additions & 15 deletions src/components/ConnectWallet/Wallets/BitcoinCoreRPC.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,17 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import InputCopy from '../../Utility/InputCopy.vue';
import QrCode from '../../Utility/QrCode.vue';
export default defineComponent({
components: {
ConnectionDetails,
InputCopy,
QrCode,
},
props: {
urls: {
type: Object,
required: true,
},
defineProps({
urls: {
type: Object,
required: true,
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
23 changes: 7 additions & 16 deletions src/components/ConnectWallet/Wallets/BlockstreamGreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,18 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import StepList from '../StepList.vue';
import Step from '../Step.vue';
import QrCode from '../../Utility/QrCode.vue';
export default defineComponent({
components: {
ConnectionDetails,
StepList,
Step,
QrCode,
},
props: {
urls: {
type: Object,
required: true,
},
defineProps({
urls: {
type: Object,
required: true,
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
23 changes: 7 additions & 16 deletions src/components/ConnectWallet/Wallets/BlueWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,18 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import StepList from '../StepList.vue';
import Step from '../Step.vue';
import QrCode from '../../Utility/QrCode.vue';
export default defineComponent({
components: {
ConnectionDetails,
StepList,
Step,
QrCode,
},
props: {
urls: {
type: Object,
required: true,
},
defineProps({
urls: {
type: Object,
required: true,
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
23 changes: 7 additions & 16 deletions src/components/ConnectWallet/Wallets/ElectrumAndroid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,18 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import StepList from '../StepList.vue';
import Step from '../Step.vue';
import InputCopy from '../../Utility/InputCopy.vue';
export default defineComponent({
components: {
ConnectionDetails,
StepList,
Step,
InputCopy,
},
props: {
urls: {
type: Object,
required: true,
},
defineProps({
urls: {
type: Object,
required: true,
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
26 changes: 8 additions & 18 deletions src/components/ConnectWallet/Wallets/ElectrumDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,19 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import StepList from '../StepList.vue';
import Step from '../Step.vue';
import TorSetup from '../TorSetup.vue';
import InputCopy from '../../Utility/InputCopy.vue';
import TorSetup from '../TorSetup.vue';
export default defineComponent({
components: {
ConnectionDetails,
StepList,
Step,
InputCopy,
TorSetup,
defineProps({
urls: {
type: Object,
required: true,
},
props: {
urls: {
type: Object,
required: true,
},
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
22 changes: 7 additions & 15 deletions src/components/ConnectWallet/Wallets/ElectrumServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,17 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import InputCopy from '../../Utility/InputCopy.vue';
import QrCode from '../../Utility/QrCode.vue';
export default defineComponent({
components: {
ConnectionDetails,
InputCopy,
QrCode,
},
props: {
urls: {
type: Object,
required: true,
},
defineProps({
urls: {
type: Object,
required: true,
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
24 changes: 7 additions & 17 deletions src/components/ConnectWallet/Wallets/FullyNoded.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,19 @@
</connection-details>
</template>

<script lang="ts">
import {defineComponent} from 'vue';
<script lang="ts" setup>
import ConnectionDetails from '../ConnectionDetails.vue';
import StepList from '../StepList.vue';
import Step from '../Step.vue';
import InputCopy from '../../Utility/InputCopy.vue';
import QrCode from '../../Utility/QrCode.vue';
export default defineComponent({
components: {
ConnectionDetails,
StepList,
Step,
InputCopy,
QrCode,
},
props: {
urls: {
type: Object,
required: true,
},
defineProps({
urls: {
type: Object,
required: true,
},
emits: ['showQrModal'],
});
defineEmits(['showQrModal']);
</script>
Loading

0 comments on commit 5925005

Please sign in to comment.