mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Fix Stories navigation, sharing, and voice entry
This commit is contained in:
1 parent
5418438339
commit
9e9ce1db22
43 files changed
+744
-137
No files matched your search
@@ -22,15 +22,19 @@ const props = defineProps({
|
||||
const emit = defineEmits(['back', 'home', 'crumb', 'search']);
|
||||
const store = useStoriesStore();
|
||||
// A scene saved on this device only: a link to it opens nothing elsewhere.
|
||||
const localOnly = computed(() => !!store.byId(store.storyId)?.mine);
|
||||
const localOnly = computed(
|
||||
() =>
|
||||
!!store.byId(props.screen === 'story' ? store.storyId : store.picked)?.mine,
|
||||
);
|
||||
|
||||
async function share() {
|
||||
const what = props.screen === 'story' ? t('Story') : t('Stories');
|
||||
const url = store.controller.shareLink();
|
||||
try {
|
||||
await navigator.clipboard.writeText(store.controller.shareLink());
|
||||
await navigator.clipboard.writeText(url);
|
||||
store.flashToast(t('{what} link copied', { what }));
|
||||
} catch {
|
||||
store.flashToast(t('Copy this link: {url}', { url: location.href }), 4000);
|
||||
store.flashToast(t('Copy this link: {url}', { url }), 4000);
|
||||
}
|
||||
}
|
||||
// Long titles scroll gently so the whole name can be read.
|
||||
@@ -131,7 +135,7 @@ onBeforeUnmount(() => observer?.disconnect());
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
v-if="!(screen === 'story' && localOnly)"
|
||||
v-if="!localOnly"
|
||||
class="tbtn hide-m"
|
||||
type="button"
|
||||
:aria-label="t('Share')"
|
||||
|
||||
Reference in new issue
Block a user