Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 2285489
  • /
  • VMessage.vue
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:322ad37d09458d5c73046d3de279c7c0ead36bec
directory badge Iframe embedding
swh:1:dir:22854890bacf341dc104eb129425e04c4690e5c9

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
VMessage.vue
<script setup lang="ts">
import { promiseTimeout } from '@vueuse/core'
import { MessageType } from '~/stores/message'
import type { Message } from '~/stores/message'

const props = defineProps({
  message: {
    type: Object as PropType<Message>,
    required: true,
  },
})
const emit = defineEmits<{
  (e: 'close'): void
}>()

const { message } = toRefs(props)
const show = ref(true)

onMounted(async () => {
  if (message.value.timeout === Number.POSITIVE_INFINITY) return
  await promiseTimeout(message.value.timeout)
  show.value = false
})
watch(show, (d) => {
  if (d === false) emit('close')
})
</script>

<template>
  <div
    class="flex gap-2 items-center w-full max-w-xs p-2 rounded shadow"
    bg="white dark:gray-800"
    text="gray-500 dark:gray-400"
  >
    <div
      v-if="message.type === MessageType.Success"
      class="inline-flex items-center justify-center w-8 h-8 rounded"
      bg="green-100 dark:green-800"
      text="green-500 dark:green-200"
    >
      <div class="i-fa6-solid:check" />
    </div>
    <div
      v-if="message.type === MessageType.Error"
      class="inline-flex items-center justify-center w-8 h-8 rounded"
      bg="orange-100 dark:orange-700"
      text="orange-500 dark:orange-200"
    >
      <div class="i-fa6-solid:triangle-exclamation" />
    </div>
    <div class="text-sm">
      {{ message.content }}
    </div>
    <button
      icon-btn
      class="ml-auto"
      title="Close"
      @click="show = false"
    >
      <div class="i-fa6-solid:xmark" />
    </button>
  </div>
</template>

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API