mirror of
https://github.com/XFox111/TabsAsideExtension.git
synced 2026-07-02 19:52:47 +03:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c8cfa1583 | |||
| e844a68f49 | |||
| 794f6e3af0 | |||
| d85d10dc58 | |||
| 213cc84602 | |||
| 9675b65e81 | |||
| 6bce330a8f | |||
| 405f9163f2 |
@@ -0,0 +1,2 @@
|
||||
* @XFox111
|
||||
locales/pt_BR.yml @maisondasilva @XFox111
|
||||
@@ -12,9 +12,7 @@ updates:
|
||||
directory: "/" # Location of package manifests
|
||||
target-branch: "next"
|
||||
assignees:
|
||||
- "xfox111"
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
- "XFox111"
|
||||
schedule:
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
@@ -24,9 +22,7 @@ updates:
|
||||
directory: "/"
|
||||
target-branch: "next"
|
||||
assignees:
|
||||
- "xfox111"
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
- "XFox111"
|
||||
schedule:
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
@@ -36,9 +32,7 @@ updates:
|
||||
directory: "/"
|
||||
target-branch: "next"
|
||||
assignees:
|
||||
- "xfox111"
|
||||
reviewers:
|
||||
- "xfox111"
|
||||
- "XFox111"
|
||||
schedule:
|
||||
interval: monthly
|
||||
rebase-strategy: disabled
|
||||
|
||||
@@ -257,7 +257,7 @@ export default defineBackground(() =>
|
||||
|
||||
for (const openWindow of openWindows)
|
||||
{
|
||||
if (openWindow.incognito)
|
||||
if (openWindow.incognito || openWindow.type !== "normal")
|
||||
continue;
|
||||
|
||||
const activeTabs: Tabs.Tab[] = openWindow.tabs!.filter(tab =>
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useStyles_CollectionView = makeStyles({
|
||||
},
|
||||
verticalRoot:
|
||||
{
|
||||
height: "560px"
|
||||
maxHeight: "560px"
|
||||
},
|
||||
empty:
|
||||
{
|
||||
@@ -84,11 +84,15 @@ export const useStyles_CollectionView = makeStyles({
|
||||
"& > div":
|
||||
{
|
||||
pointerEvents: "none"
|
||||
}
|
||||
},
|
||||
height: "54px",
|
||||
overflow: "hidden"
|
||||
},
|
||||
sorting:
|
||||
{
|
||||
pointerEvents: "none"
|
||||
pointerEvents: "none",
|
||||
height: "54px",
|
||||
overflow: "hidden"
|
||||
},
|
||||
dragging:
|
||||
{
|
||||
|
||||
@@ -58,8 +58,6 @@ export const useStyles_TabView = makeStyles({
|
||||
display: "grid",
|
||||
gridTemplateColumns: "auto 1fr auto",
|
||||
alignItems: "center",
|
||||
gap: tokens.spacingHorizontalSNudge,
|
||||
paddingLeft: tokens.spacingHorizontalS,
|
||||
|
||||
borderBottomLeftRadius: tokens.borderRadiusMedium,
|
||||
borderBottomRightRadius: tokens.borderRadiusMedium,
|
||||
@@ -72,6 +70,9 @@ export const useStyles_TabView = makeStyles({
|
||||
icon:
|
||||
{
|
||||
cursor: "grab",
|
||||
padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalSNudge}`,
|
||||
height: "32px",
|
||||
boxSizing: "border-box",
|
||||
|
||||
"&:active":
|
||||
{
|
||||
|
||||
@@ -83,7 +83,6 @@ export default function TabView({ tab, indices, dragOverlay }: TabViewProps): Re
|
||||
ref={ setActivatorNodeRef } { ...activatorProps }
|
||||
src={ graphics[tab.url]?.icon ?? faviconPlaceholder }
|
||||
onError={ e => e.currentTarget.src = faviconPlaceholder }
|
||||
height={ 20 } width={ 20 }
|
||||
className={ cls.icon } draggable={ false } />
|
||||
|
||||
<Tooltip relationship="description" content={ tab.title ?? tab.url }>
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function CollectionListView(): ReactElement
|
||||
const [active, setActive] = useState<DndItem | null>(null);
|
||||
|
||||
const sensors = useSensors(
|
||||
useSensor(MouseSensor, { activationConstraint: { delay: 100, tolerance: 0 } }),
|
||||
useSensor(MouseSensor, { activationConstraint: { delay: 10, tolerance: 20 } }),
|
||||
useSensor(TouchSensor, { activationConstraint: { delay: 300, tolerance: 20 } })
|
||||
);
|
||||
|
||||
|
||||
@@ -68,13 +68,10 @@ async function createGroup(group: GroupItem, windowId: number, discard?: boolean
|
||||
createProperties: { windowId }
|
||||
});
|
||||
|
||||
// Grouping support came in 138, tabGroups is expected to be in 139
|
||||
// TODO: Remove this check once the API is available
|
||||
if (!import.meta.env.FIREFOX)
|
||||
await chrome.tabGroups.update(groupId, {
|
||||
title: group.title,
|
||||
color: group.color
|
||||
});
|
||||
await chrome.tabGroups.update(groupId, {
|
||||
title: group.title,
|
||||
color: group.color
|
||||
});
|
||||
}
|
||||
|
||||
async function manageWindow(handle: (windowId: number) => Promise<void>, windowProps?: Windows.CreateCreateDataType): Promise<void>
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ options_page:
|
||||
icon_action:
|
||||
title: "Po kliknięciu ikony rozszerzenia:"
|
||||
options:
|
||||
action: "Wykonaj domyślną akcję"
|
||||
action: "Zapisz karty (domyślna akcja)"
|
||||
context: "Pokaż menu kontekstowe"
|
||||
open: "Otwórz listę kolekcji"
|
||||
change_shortcuts: "Zmień skróty klawiszowe"
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ options_page:
|
||||
icon_action:
|
||||
title: "При нажатии на иконку расширения:"
|
||||
options:
|
||||
action: "Выполнить действие по умолчанию"
|
||||
action: "Сохранить вкладки (действие по умолчанию)"
|
||||
context: "Показать контекстное меню"
|
||||
open: "Открыть список коллекций"
|
||||
change_shortcuts: "Изменить горячие клавиши"
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ options_page:
|
||||
icon_action:
|
||||
title: "При натисканні на іконку розширення:"
|
||||
options:
|
||||
action: "Виконати дію за замовчуванням"
|
||||
action: "Зберегти вкладки (дія за замовчуванням)"
|
||||
context: "Показати контекстне меню"
|
||||
open: "Відкрити список колекцій"
|
||||
change_shortcuts: "Змінити гарячі клавіші"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tabs-aside",
|
||||
"private": true,
|
||||
"version": "3.0.0-rc4",
|
||||
"version": "3.0.0-rc6",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "wxt",
|
||||
|
||||
@@ -88,17 +88,9 @@ async function createCollectionFromTabs(tabs: Tabs.Tab[]): Promise<[CollectionIt
|
||||
tabs.every(i => i.groupId === tabs[0].groupId)
|
||||
)
|
||||
{
|
||||
// TODO: Remove the check when Firefox 139 is out
|
||||
if (!import.meta.env.FIREFOX)
|
||||
{
|
||||
const group = await browser.tabGroups!.get(tabs[0].groupId);
|
||||
collection.title = group.title;
|
||||
collection.color = group.color;
|
||||
}
|
||||
else
|
||||
{
|
||||
collection.color = "blue";
|
||||
}
|
||||
const group = await chrome.tabGroups.get(tabs[0].groupId);
|
||||
collection.title = group.title;
|
||||
collection.color = group.color;
|
||||
|
||||
tabs.forEach(i =>
|
||||
collection.items.push({ type: "tab", url: i.url!, title: i.title })
|
||||
@@ -123,27 +115,14 @@ async function createCollectionFromTabs(tabs: Tabs.Tab[]): Promise<[CollectionIt
|
||||
if (!activeGroup || activeGroup !== tab.groupId)
|
||||
{
|
||||
activeGroup = tab.groupId;
|
||||
const group = await chrome.tabGroups.get(activeGroup);
|
||||
|
||||
// TODO: Remove the check when Firefox 139 is out
|
||||
if (import.meta.env.FIREFOX)
|
||||
{
|
||||
collection.items.push({
|
||||
type: "group",
|
||||
color: "blue",
|
||||
items: []
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
const group = await browser.tabGroups!.get(activeGroup);
|
||||
|
||||
collection.items.push({
|
||||
type: "group",
|
||||
color: group.color,
|
||||
title: group.title,
|
||||
items: []
|
||||
});
|
||||
}
|
||||
collection.items.push({
|
||||
type: "group",
|
||||
color: group.color,
|
||||
title: group.title,
|
||||
items: []
|
||||
});
|
||||
}
|
||||
|
||||
(collection.items[collection.items.length - 1] as GroupItem).items.push({
|
||||
|
||||
+5
-7
@@ -24,7 +24,8 @@ export default defineConfig({
|
||||
description: "__MSG_manifest_description__",
|
||||
homepage_url: "https://github.com/xfox111/TabsAsideExtension/",
|
||||
|
||||
action: {
|
||||
action:
|
||||
{
|
||||
default_title: "__MSG_manifest_name__"
|
||||
},
|
||||
|
||||
@@ -36,7 +37,8 @@ export default defineConfig({
|
||||
"tabs",
|
||||
"notifications",
|
||||
"contextMenus",
|
||||
"bookmarks"
|
||||
"bookmarks",
|
||||
"tabGroups"
|
||||
],
|
||||
|
||||
commands:
|
||||
@@ -78,17 +80,13 @@ export default defineConfig({
|
||||
gecko:
|
||||
{
|
||||
id: "tabsaside@xfox111.net",
|
||||
strict_min_version: "138.0"
|
||||
strict_min_version: "139.0"
|
||||
}
|
||||
};
|
||||
|
||||
// @ts-expect-error author key in Firefox has a different format
|
||||
manifest.author = "__MSG_manifest_author__";
|
||||
}
|
||||
else
|
||||
{
|
||||
manifest.permissions!.push("tabGroups");
|
||||
}
|
||||
|
||||
return manifest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user