Skip to content

Commit

Permalink
fix sharing in link mobile apps, add more padding bottom to the botto…
Browse files Browse the repository at this point in the history
…m sheet
  • Loading branch information
canbax committed Jan 27, 2025
1 parent 63bd0ea commit 2be6c28
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default [

{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', 'ios/**', 'android/**'],
},

...pluginVue.configs['flat/essential'],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"make-badges": "istanbul-badges-readme",
"make-badges:ci": "npm run make-badges -- --ci",
"checks": "npm run format && npm run lint && npm run test && npm run test-e2e && npm run build",
"sync-apps": "npx cap sync",
"build-android": "npx cap add android",
"build-ios": "npx cap add ios"
},
Expand Down Expand Up @@ -79,4 +80,4 @@
"eslint --max-warnings=0"
]
}
}
}
8 changes: 3 additions & 5 deletions src/components/IframeEditor.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useBrowserLocation, useClipboard } from '@vueuse/core';
import { useClipboard } from '@vueuse/core';
import { computed, getCurrentInstance, nextTick, ref } from 'vue';
import DateFormatSelector from '@/components/DateFormatSelector.vue';
import TimeFormatSelector from '@/components/TimeFormatSelector.vue';
Expand All @@ -9,11 +9,9 @@ import ThemeSelector from '@/components/ThemeSelector.vue';
import { VTextarea } from 'vuetify/components/VTextarea';
import { useSettings } from '@/composables/settings';
import { useUIState } from '@/composables/userInterfaceState';
import { encodeParamsForIframe } from '@/composables/urlParams';
import { encodeParamsForIframe, WEB_BASE_URL } from '@/composables/urlParams';
import { getTranslateFn } from '@/util/i18n';
const browserLocation = useBrowserLocation();
const {
currentPlace,
currentLanguage,
Expand Down Expand Up @@ -41,7 +39,7 @@ const madhab = ref(calculatorMadhab.value);
const $t = getTranslateFn(getCurrentInstance());
const baseUrl = computed<string>(() => browserLocation.value.origin + '/widget');
const baseUrl = computed<string>(() => WEB_BASE_URL + '/widget');
const iframeSrc = computed<string>(() => {
const params = encodeParamsForIframe({
Expand Down
9 changes: 4 additions & 5 deletions src/components/ShareTimes.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<script setup lang="ts">
import { computed, getCurrentInstance, ref } from 'vue';
import ShareWidget from '@/components/ShareWidget.vue';
import { useShare, useClipboard, useBrowserLocation } from '@vueuse/core';
import { useUrlParams } from '@/composables/urlParams';
import { useShare, useClipboard } from '@vueuse/core';
import { useUrlParams, WEB_BASE_URL } from '@/composables/urlParams';
import { getTranslateFn } from '@/util/i18n';
const { encodeSettingsToUrlParams } = useUrlParams();
const source = ref('');
const { copy, copied, isSupported: isClipboardSupported } = useClipboard({ source, legacy: true });
const browserLocation = useBrowserLocation();
const { share, isSupported: isShareSupported } = useShare();
const $t = getTranslateFn(getCurrentInstance());
const shareUrl = computed<string>(() => {
return browserLocation.value.origin + '/share?' + encodeSettingsToUrlParams();
return WEB_BASE_URL + '/share?' + encodeSettingsToUrlParams();
});
async function startShare() {
Expand Down Expand Up @@ -46,7 +45,7 @@ async function copyLinkClicked() {
/>
</template>

<v-sheet>
<v-sheet class="pb-10">
<v-list>
<v-list-subheader>{{ $t('shareTimes') }}</v-list-subheader>

Expand Down
2 changes: 2 additions & 0 deletions src/composables/urlParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,5 @@ export function useUrlParams() {
encodeSettingsToUrlParams,
};
}

export const WEB_BASE_URL = 'https://www.vakitapp.com' as const;

0 comments on commit 2be6c28

Please sign in to comment.