1 line
No EOL
3 KiB
Text
1 line
No EOL
3 KiB
Text
{"version":3,"file":"CommitBody-BtqSndsK.js","sources":["../../src/lib/components/atoms/CommitBody.svelte"],"sourcesContent":["<!--\nCommitBody atom.\nCopyright (C) 2024 André Jaenisch\nSPDX-FileCopyrightText: 2024 André Jaenisch\nSPDX-License-Identifier: AGPL-3.0-or-later\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<script>\n\timport { _, date } from 'svelte-i18n';\n\timport { Copy16, FileDirectory16 } from 'svelte-octicons';\n\n\t/**\n\t * The commit to display.\n\t */\n\texport let commit = {\n\t\tname: ''\n\t};\n\n\tconst i18n = {\n\t\tactions: {\n\t\t\tbrowse: 'page.profile.history.activities.commits.actions.browse',\n\t\t\tcopy: 'page.profile.history.activities.commits.actions.copy'\n\t\t},\n\t\trelative_time: 'page.profile.history.activities.commits.relative_time'\n\t};\n</script>\n\n<div class=\"flex w-full justify-between gap-4 border border-surface-100-800-token\">\n\t<!-- Detail text -->\n\t<div class=\"flex flex-col flex-1\">\n\t\t<span class=\"text-surface-500-400-token\">{commit.name}</span>\n\t\t<span class=\"text-surface-400-500-token\"\n\t\t\t>{$_(i18n.relative_time, {\n\t\t\t\tvalues: { relativeTime: $date(new Date(commit.committed)) }\n\t\t\t})}</span\n\t\t>\n\t</div>\n\t<!-- SHA -->\n\t<div class=\"flex\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"btn-icon border border-surface-100-800-token rounded bg-white dark:bg-black self-start\"\n\t\t>\n\t\t\t<Copy16 fill=\"currentColor\" />\n\t\t\t<span class=\"sr-only\">{$_(i18n.actions.copy)}</span>\n\t\t</button>\n\t\t<!-- Since I cannot successfully define font-mono here, enforce a minimum width for equally sized buttons -->\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"btn border border-surface-100-800-token rounded bg-white dark:bg-black min-w-32 self-start\"\n\t\t>\n\t\t\t{commit.hash.slice(0, 8)}\n\t\t</button>\n\t</div>\n\t<!-- Browse -->\n\t<div>\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclass=\"btn-icon border border-surface-100-800-token rounded bg-white dark:bg-black\"\n\t\t>\n\t\t\t<FileDirectory16 fill=\"currentColor\" />\n\t\t\t<span class=\"sr-only\">{$_(i18n.actions.browse)}</span>\n\t\t</button>\n\t</div>\n</div>\n"],"names":["values","relativeTime","ctx","Date","committed","div0","span1","cov_1gn0to8ohr","s"],"mappings":"29vBAsCKA,OAAA,CAAAC,aAAEC,EAAA,CAAA,EAAA,IAAAC,KAAKD,EAAc,CAAA,EAAAE,SAAA,ohGACZC,EAAAC,CAAA,EAAAC,EAAA,EAAAC,EAAA,EAAA,ooBADTR,OAAA,CAAAC,aAAEC,EAAA,CAAA,EAAA,IAAAC,KAAKD,EAAc,CAAA,EAAAE,SAAA,0tCAxBhB"} |