-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
249 additions
and
85 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!-- | ||
Copyright 2024 ODK Central Developers | ||
See the NOTICE file at the top-level directory of this distribution and at | ||
https://github.com/getodk/central-frontend/blob/master/NOTICE. | ||
|
||
This file is part of ODK Central. It is subject to the license terms in | ||
the LICENSE file found in the top-level directory of this distribution and at | ||
https://www.apache.org/licenses/LICENSE-2.0. No part of ODK Central, | ||
including this file, may be copied, modified, propagated, or distributed | ||
except according to the terms contained in the LICENSE file. | ||
--> | ||
<template> | ||
<div class="entity-upload-warning"> | ||
<span class="label label-warning"> | ||
<span class="icon-warning"></span>{{ $t('common.warning') }} | ||
</span> | ||
<slot></slot> | ||
<template v-if="ranges != null"> | ||
<span> </span> | ||
<i18n-list v-slot="{ value: [start, end] }" :list="ranges"> | ||
<a v-if="!Number.isNaN(start)" href="#" | ||
@click.prevent="$emit('rows', [start - 1, end - 1])"> | ||
{{ formatRange(start, end) }} | ||
</a> | ||
<template v-else>…</template> | ||
</i18n-list> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import I18nList from '../../i18n/list.vue'; | ||
|
||
import { useI18nUtils } from '../../../util/i18n'; | ||
|
||
defineOptions({ | ||
name: 'EntityUploadWarning' | ||
}); | ||
defineProps({ | ||
ranges: Array, | ||
overflow: Boolean | ||
}); | ||
defineEmits(['rows']); | ||
|
||
const { formatRange } = useI18nUtils(); | ||
</script> | ||
|
||
<style lang="scss"> | ||
.entity-upload-warning { | ||
background-color: #fff; | ||
font-weight: bold; | ||
padding: 4px 3px; | ||
|
||
.label { | ||
font-size: inherit; | ||
margin-right: 10px; | ||
} | ||
|
||
.i18n-list { | ||
font-weight: normal; | ||
margin-left: 3px; | ||
} | ||
|
||
+ .entity-upload-warning { margin-top: 2px; } | ||
|
||
$border-radius: 5px; | ||
&:first-child { | ||
border-top-left-radius: $border-radius; | ||
border-top-right-radius: $border-radius; | ||
} | ||
&:last-child { | ||
border-bottom-left-radius: $border-radius; | ||
border-bottom-right-radius: $border-radius; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.