fix(account): avoid import.meta in AccountViewView template
Vue’s template compiler treats bindings as non-module JS, so `import.meta.env.DEV` in `v-if` broke the Capacitor/Vite build. Expose a readonly `isDev` from the script instead.
This commit is contained in:
@@ -744,7 +744,7 @@
|
||||
</router-link>
|
||||
<!-- DEV-only: never render in production (`import.meta.env.DEV` is false there). -->
|
||||
<router-link
|
||||
v-if="import.meta.env.DEV"
|
||||
v-if="isDev"
|
||||
:to="{ name: 'dev-notifications' }"
|
||||
class="block w-fit text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md mt-2"
|
||||
>
|
||||
@@ -896,6 +896,7 @@ export default class AccountViewView extends Vue {
|
||||
readonly DEFAULT_IMAGE_API_SERVER: string = DEFAULT_IMAGE_API_SERVER;
|
||||
readonly DEFAULT_PARTNER_API_SERVER: string = DEFAULT_PARTNER_API_SERVER;
|
||||
readonly PASSKEYS_ENABLED: boolean = PASSKEYS_ENABLED;
|
||||
readonly isDev: boolean = import.meta.env.DEV;
|
||||
|
||||
// Identity and settings properties
|
||||
activeDid: string = "";
|
||||
|
||||
Reference in New Issue
Block a user