Skip to content

Commit

Permalink
fix: linkout not working with links that open in the same tab, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Dec 10, 2023
1 parent 3b35536 commit b593650
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/linkout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ function go() {
location.href = remoteUrl as string;
}
async function back() {
if (!window.history.state.back) {
function back() {
if (window.opener != null || window.history.length === 1) {
window.close(); // close tab
} else {
await router.back();
router.back();
}
}
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/types/generated/icons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,59 @@ declare module "vue" {
IconMdiAccountPlus: typeof import("~icons/mdi/account-plus")["default"];
IconMdiAlert: typeof import("~icons/mdi/alert")["default"];
IconMdiAlertBox: typeof import("~icons/mdi/alert-box")["default"];
IconMdiAlertDecagram: typeof import("~icons/mdi/alert-decagram")["default"];
IconMdiAlertOutline: typeof import("~icons/mdi/alert-outline")["default"];
IconMdiBell: typeof import("~icons/mdi/bell")["default"];
IconMdiBellBadge: typeof import("~icons/mdi/bell-badge")["default"];
IconMdiBellOutline: typeof import("~icons/mdi/bell-outline")["default"];
IconMdiBin: typeof import("~icons/mdi/bin")["default"];
IconMdiBookshelf: typeof import("~icons/mdi/bookshelf")["default"];
IconMdiCached: typeof import("~icons/mdi/cached")["default"];
IconMdiCalendar: typeof import("~icons/mdi/calendar")["default"];
IconMdiCancel: typeof import("~icons/mdi/cancel")["default"];
IconMdiCashMultiple: typeof import("~icons/mdi/cash-multiple")["default"];
IconMdiChat: typeof import("~icons/mdi/chat")["default"];
IconMdiCheck: typeof import("~icons/mdi/check")["default"];
IconMdiCheckBold: typeof import("~icons/mdi/check-bold")["default"];
IconMdiCheckboxMarkedCircle: typeof import("~icons/mdi/checkbox-marked-circle")["default"];
IconMdiChevronDown: typeof import("~icons/mdi/chevron-down")["default"];
IconMdiCircle: typeof import("~icons/mdi/circle")["default"];
IconMdiClipboardOutline: typeof import("~icons/mdi/clipboard-outline")["default"];
IconMdiClose: typeof import("~icons/mdi/close")["default"];
IconMdiCloseCircle: typeof import("~icons/mdi/close-circle")["default"];
IconMdiCodeBracesBox: typeof import("~icons/mdi/code-braces-box")["default"];
IconMdiCogTransfer: typeof import("~icons/mdi/cog-transfer")["default"];
IconMdiContentCopy: typeof import("~icons/mdi/content-copy")["default"];
IconMdiContentSave: typeof import("~icons/mdi/content-save")["default"];
IconMdiController: typeof import("~icons/mdi/controller")["default"];
IconMdiDelete: typeof import("~icons/mdi/delete")["default"];
IconMdiDeleteAlert: typeof import("~icons/mdi/delete-alert")["default"];
IconMdiDownload: typeof import("~icons/mdi/download")["default"];
IconMdiDownloadOutline: typeof import("~icons/mdi/download-outline")["default"];
IconMdiEarth: typeof import("~icons/mdi/earth")["default"];
IconMdiEye: typeof import("~icons/mdi/eye")["default"];
IconMdiEyeOff: typeof import("~icons/mdi/eye-off")["default"];
IconMdiFileDocument: typeof import("~icons/mdi/file-document")["default"];
IconMdiFlag: typeof import("~icons/mdi/flag")["default"];
IconMdiFormatListNumbered: typeof import("~icons/mdi/format-list-numbered")["default"];
IconMdiGamepadRoundLeft: typeof import("~icons/mdi/gamepad-round-left")["default"];
IconMdiHelpCircleOutline: typeof import("~icons/mdi/help-circle-outline")["default"];
IconMdiHome: typeof import("~icons/mdi/home")["default"];
IconMdiHorseVariant: typeof import("~icons/mdi/horse-variant")["default"];
IconMdiInformation: typeof import("~icons/mdi/information")["default"];
IconMdiKeyOutline: typeof import("~icons/mdi/key-outline")["default"];
IconMdiLeaf: typeof import("~icons/mdi/leaf")["default"];
IconMdiListStatus: typeof import("~icons/mdi/list-status")["default"];
IconMdiLockOpenOutline: typeof import("~icons/mdi/lock-open-outline")["default"];
IconMdiLockOutline: typeof import("~icons/mdi/lock-outline")["default"];
IconMdiMenu: typeof import("~icons/mdi/menu")["default"];
IconMdiMenuDown: typeof import("~icons/mdi/menu-down")["default"];
IconMdiOpenInNew: typeof import("~icons/mdi/open-in-new")["default"];
IconMdiPencil: typeof import("~icons/mdi/pencil")["default"];
IconMdiPin: typeof import("~icons/mdi/pin")["default"];
IconMdiPinOff: typeof import("~icons/mdi/pin-off")["default"];
IconMdiPinOutline: typeof import("~icons/mdi/pin-outline")["default"];
IconMdiPlay: typeof import("~icons/mdi/play")["default"];
IconMdiPlus: typeof import("~icons/mdi/plus")["default"];
IconMdiProgressQuestion: typeof import("~icons/mdi/progress-question")["default"];
IconMdiPuzzleOutline: typeof import("~icons/mdi/puzzle-outline")["default"];
Expand All @@ -61,8 +75,11 @@ declare module "vue" {
IconMdiSortVariant: typeof import("~icons/mdi/sort-variant")["default"];
IconMdiStar: typeof import("~icons/mdi/star")["default"];
IconMdiStarOutline: typeof import("~icons/mdi/star-outline")["default"];
IconMdiSubdirectoryArrowLeft: typeof import("~icons/mdi/subdirectory-arrow-left")["default"];
IconMdiTag: typeof import("~icons/mdi/tag")["default"];
IconMdiTools: typeof import("~icons/mdi/tools")["default"];
IconMdiTrophy: typeof import("~icons/mdi/trophy")["default"];
IconMdiUpload: typeof import("~icons/mdi/upload")["default"];
IconMdiWeatherNight: typeof import("~icons/mdi/weather-night")["default"];
IconMdiWhiteBalanceSunny: typeof import("~icons/mdi/white-balance-sunny")["default"];
RouterLink: typeof import("vue-router")["RouterLink"];
Expand Down

0 comments on commit b593650

Please sign in to comment.