Remote Access: 1y default expiry (#29404)

This commit is contained in:
Michael Geers 2026-04-26 16:37:14 +02:00 • committed by GitHub
parent 48f9c74e3b
commit 170226d6c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,10 @@ import { defineComponent } from "vue";
import FormRow from "../FormRow.vue";
import formatter from "@/mixins/formatter";
const HOUR = 60 * 60;
const DAY = 24 * HOUR;
const YEAR = 365 * DAY;
export default defineComponent({
name: "RemoteClientCreate",
components: { FormRow },
@ -68,18 +72,17 @@ export default defineComponent({
data() {
return {
username: "",
expiresIn: 0,
expiresIn: YEAR,
};
},
computed: {
expirationOptions() {
const HOUR = 60 * 60;
const DAY = 24 * HOUR;
return [
{ value: 0, name: this.$t("config.remote.expirationNone") },
{ value: HOUR, name: this.fmtDurationParts({ hours: 1 }) },
{ value: DAY, name: this.fmtDurationParts({ days: 1 }) },
{ value: 7 * DAY, name: this.fmtDurationParts({ weeks: 1 }) },
{ value: YEAR, name: this.fmtDurationParts({ years: 1 }) },
{ value: 0, name: this.$t("config.remote.expirationNone") },
];
},
},