Skip to content

Commit

Permalink
use preview buttons as redirect to static URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
fariss committed Aug 19, 2024
1 parent 5c6faae commit 1593779
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions web/explorer/src/components/UploadOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
</Divider>

<div class="flex-grow-1 flex align-items-center justify-content-center">
<Button label="Preview Static" @click="$emit('load-demo-static')" class="p-button" />
<Button
label="Preview Static"
@click="router.push({ path: '/', query: { rdoc: staticURL } })"
/>
</div>

<Divider layout="vertical" class="hidden-mobile">
Expand All @@ -48,7 +51,10 @@
<b>OR</b>
</Divider>
<div class="flex-grow-1 flex align-items-center justify-content-center">
<Button label="Preview Dynamic" @click="$emit('load-demo-dynamic')" class="p-button" />
<Button
label="Preview Static"
@click="router.push({ path: '/', query: { rdoc: dynamicURL } })"
/>
</div>
</template>
</div>
Expand All @@ -65,10 +71,17 @@ import FloatLabel from "primevue/floatlabel";
import InputText from "primevue/inputtext";
import Button from "primevue/button";
import { useRouter } from "vue-router";
const router = useRouter();
const loadURL = ref("");
const isBundle = import.meta.env.MODE === "bundle";
defineEmits(["load-from-local", "load-from-url", "load-demo-static", "load-demo-dynamic"]);
defineEmits(["load-from-local", "load-from-url"]);
const dynamicURL =
"https://raw.githubusercontent.com/mandiant/capa-testfiles/master/rd/0000a65749f5902c4d82ffa701198038f0b4870b00a27cfca109f8f933476d82.json";
const staticURL = "https://raw.githubusercontent.com/mandiant/capa-testfiles/master/rd/al-khaser_x64.exe_.json";
</script>

<style scoped>
Expand Down

0 comments on commit 1593779

Please sign in to comment.