I firmly believe in free software. The application I'm making here have capabilities that I've not seen in any system. It presents itself as an opportunity to collaborate on a tool that serves the people rather than corporations. Whose incentives are to help people rather, not make the most money. And whose terms ensure that these freedoms and incentives cannot be taken back or subverted. I license this software under the AGPL.
52 lines
872 B
Vue
52 lines
872 B
Vue
<!--
|
|
SPDX-FileCopyrightText: © 2025 Hornwitser <code@hornwitser.no>
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
-->
|
|
<template>
|
|
<div
|
|
v-if="entries.length"
|
|
class="diffEntry"
|
|
>
|
|
<div class="title">
|
|
{{ title }}:
|
|
</div>
|
|
<div
|
|
v-for="[type, text], index in entries"
|
|
:key="index"
|
|
:class="type"
|
|
>
|
|
{{ text }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
defineProps<{
|
|
title: string,
|
|
entries: (["removed" | "added", string][]);
|
|
}>();
|
|
</script>
|
|
|
|
<style scoped>
|
|
.diffEntry {
|
|
display: grid;
|
|
grid-template-columns: 5rem 1fr;
|
|
column-gap: 1rem;
|
|
}
|
|
.removed {
|
|
grid-column: 2 / 2;
|
|
color: color-mix(in srgb, CanvasText, red 40%);
|
|
}
|
|
.removed::before {
|
|
content: "- ";
|
|
font-family: monospace;
|
|
}
|
|
.added {
|
|
grid-column: 2 / 2;
|
|
color: color-mix(in srgb, CanvasText, green 40%);
|
|
}
|
|
.added::before {
|
|
content: "+ ";
|
|
font-family: monospace;
|
|
}
|
|
</style>
|