more stuff

This commit is contained in:
Guy Sandler 2026-10-25 16:35:44 -07:00
parent 27dba082cb
commit 6b06321687
16 changed files with 124 additions and 18 deletions

View File

@ -1416,7 +1416,7 @@
"message": "Funktionen suchen..."
},
"search_hint": {
"message": "Beginne zu tippen, um deine Module und Aufgaben zu durchsuchen. Verwende @kursname, um einen bestimmten Kurs zu durchsuchen, oder @grades, um die Notenseite eines Kurses zu öffnen."
"message": "Beginne zu tippen, um deine Module und Aufgaben zu durchsuchen. Verwende @kursname, um einen bestimmten Kurs zu durchsuchen, oder @grades, um die Notenseite eines Kurses zu öffnen, oder @home, um zu deinem Dashboard zu springen."
},
"search_navigate": {
"message": "navigieren"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "Datei"
},
"search_type_home": {
"message": "Startseite"
},
"search_type_item": {
"message": "Element"
},

View File

@ -1440,7 +1440,7 @@
"message": "Search features..."
},
"search_hint": {
"message": "Start typing to search your modules and assignments. Use @coursename to search a specific course, or @grades to open a course's grades page."
"message": "Start typing to search your modules and assignments. Use @coursename to search a specific course, or @grades to open a course's grades page, or @home to jump to your dashboard."
},
"search_index_count": {
"message": "{{COUNT}} items"
@ -1523,6 +1523,9 @@
"search_type_grades": {
"message": "Grades"
},
"search_type_home": {
"message": "Home"
},
"search_type_item": {
"message": "Item"
},

View File

@ -1416,7 +1416,7 @@
"message": "Buscar funciones..."
},
"search_hint": {
"message": "Empieza a escribir para buscar en tus módulos y tareas. Usa @coursename para buscar un curso concreto, o @grades para abrir la página de notas de un curso."
"message": "Empieza a escribir para buscar en tus módulos y tareas. Usa @coursename para buscar un curso concreto, o @grades para abrir la página de notas de un curso, o @home para ir a tu panel."
},
"search_navigate": {
"message": "navegar"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "Archivo"
},
"search_type_home": {
"message": "Inicio"
},
"search_type_item": {
"message": "Elemento"
},

View File

@ -1416,7 +1416,7 @@
"message": "Rechercher des fonctionnalités..."
},
"search_hint": {
"message": "Commencez à taper pour rechercher vos modules et devoirs. Utilisez @nomducours pour chercher un cours précis, ou @grades pour ouvrir la page des notes d'un cours."
"message": "Commencez à taper pour rechercher vos modules et devoirs. Utilisez @nomducours pour chercher un cours précis, ou @grades pour ouvrir la page des notes d'un cours, ou @home pour aller à votre tableau de bord."
},
"search_navigate": {
"message": "naviguer"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "Fichier"
},
"search_type_home": {
"message": "Accueil"
},
"search_type_item": {
"message": "Élément"
},

View File

@ -1416,7 +1416,7 @@
"message": "Cerca funzioni..."
},
"search_hint": {
"message": "Inizia a digitare per cercare moduli e consegne. Usa @corsonome per cercare un corso specifico o @grades per aprire la pagina dei voti di un corso."
"message": "Inizia a digitare per cercare moduli e consegne. Usa @corsonome per cercare un corso specifico o @grades per aprire la pagina dei voti di un corso, oppure @home per andare alla tua dashboard."
},
"search_navigate": {
"message": "naviga"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "File"
},
"search_type_home": {
"message": "Home"
},
"search_type_item": {
"message": "Elemento"
},

View File

@ -1416,7 +1416,7 @@
"message": "機能を検索..."
},
"search_hint": {
"message": "モジュールや課題を検索するには入力してください。@コース名で特定のコースを検索、@gradesでコースの成績ページを開けます。"
"message": "モジュールや課題を検索するには入力してください。@コース名で特定のコースを検索、@gradesでコースの成績ページを開けます、または @home でダッシュボードに移動できます。"
},
"search_navigate": {
"message": "移動"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "ファイル"
},
"search_type_home": {
"message": "ホーム"
},
"search_type_item": {
"message": "項目"
},

View File

@ -1416,7 +1416,7 @@
"message": "Pesquisar funcionalidades..."
},
"search_hint": {
"message": "Começa a escrever para procurar módulos e trabalhos. Usa @nomedocurso para procurar num curso específico, ou @grades para abrir a página de notas de um curso."
"message": "Começa a escrever para procurar módulos e trabalhos. Usa @nomedocurso para procurar num curso específico, ou @grades para abrir a página de notas de um curso, ou @home para ires para o teu painel."
},
"search_navigate": {
"message": "navegar"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "Ficheiro"
},
"search_type_home": {
"message": "Início"
},
"search_type_item": {
"message": "Item"
},

View File

@ -1416,7 +1416,7 @@
"message": "Поиск функций..."
},
"search_hint": {
"message": "Начните вводить текст, чтобы искать модули и задания. Используйте @названиекурса для поиска по конкретному курсу или @grades, чтобы открыть страницу оценок курса."
"message": "Начните вводить текст, чтобы искать модули и задания. Используйте @названиекурса для поиска по конкретному курсу или @grades, чтобы открыть страницу оценок курса, или @home, чтобы перейти на главную."
},
"search_navigate": {
"message": "перемещение"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "Файл"
},
"search_type_home": {
"message": "Главная"
},
"search_type_item": {
"message": "Элемент"
},

View File

@ -1416,7 +1416,7 @@
"message": "Sök funktioner..."
},
"search_hint": {
"message": "Börja skriva för att söka bland moduler och uppgifter. Använd @kursnamn för att söka i en viss kurs, eller @grades för att öppna en kurs betygssida."
"message": "Börja skriva för att söka bland moduler och uppgifter. Använd @kursnamn för att söka i en viss kurs, eller @grades för att öppna en kurs betygssida, eller @home för att gå till din översikt."
},
"search_navigate": {
"message": "navigera"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "Fil"
},
"search_type_home": {
"message": "Start"
},
"search_type_item": {
"message": "Objekt"
},

View File

@ -1416,7 +1416,7 @@
"message": "搜索功能..."
},
"search_hint": {
"message": "开始输入以搜索你的模块和作业。使用 @课程名 搜索特定课程,或使用 @grades 打开课程的成绩页面。"
"message": "开始输入以搜索你的模块和作业。使用 @课程名 搜索特定课程,或使用 @grades 打开课程的成绩页面,或输入 @home 跳转到你的仪表板。"
},
"search_navigate": {
"message": "导航"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "文件"
},
"search_type_home": {
"message": "主页"
},
"search_type_item": {
"message": "项目"
},

View File

@ -1416,7 +1416,7 @@
"message": "搜尋功能..."
},
"search_hint": {
"message": "開始輸入以搜尋你的課程模組和作業。使用 @課程名稱 搜尋特定課程,或使用 @grades 開啟課程的成績頁面。"
"message": "開始輸入以搜尋你的課程模組和作業。使用 @課程名稱 搜尋特定課程,或使用 @grades 開啟課程的成績頁面,或輸入 @home 前往你的儀表板。"
},
"search_navigate": {
"message": "瀏覽"
@ -1472,6 +1472,9 @@
"search_type_file": {
"message": "檔案"
},
"search_type_home": {
"message": "首頁"
},
"search_type_item": {
"message": "項目"
},

View File

@ -373,6 +373,7 @@
.canvasrefined-gs-type-link, .canvasrefined-gs-type-external-tool { background: #fff4d6; color: #7a5b00; border-color: #f1dfab; }
.canvasrefined-gs-type-course { background: #dff3f3; color: #0b6e6e; border-color: #b3dede; }
.canvasrefined-gs-type-grades { background: #e8eefc; color: #1d4ed8; border-color: #c3d2f5; }
.canvasrefined-gs-type-home { background: #e7f6ec; color: #1b7a3d; border-color: #c2e6cd; }
.canvasrefined-gs-status {
display: flex; align-items: center; gap: 10px; padding: 6px 14px;
border-top: 1px solid var(--bcborders, #e2e6e8);

View File

@ -1258,6 +1258,10 @@ hr {
background: transparent !important;
box-shadow: none !important;
}
/* InstUI flex View ships an opaque surface that stays light in dark mode */
.css-43gqe2-view--flex-flex {
background: transparent !important;
}
/* content span ships a light background + border and sets dark ink */
.css-1ta5ds2-baseButton__content {
background: var(--bcbackground-1) !important;
@ -1490,4 +1494,17 @@ input[type="checkbox"]:is([name="turnitin_pledge"], [name="vericite_pledge"]) {
[data-testid="similarity-pledge"] [class*="-checkboxFacade__facade"]::before {
border-color: var(--bclinks) !important;
}
/* the footer's full-width surface leaves a bare strip between Previous and Next */
.module-sequence-footer,
.module-sequence-footer .module-sequence-footer-content {
background: none !important;
border-top: none !important;
box-shadow: none !important;
}
/* with the surface gone the buttons need their own outline */
.module-sequence-footer .module-sequence-footer-button--previous a,
.module-sequence-footer .module-sequence-footer-button--next a {
border: 1px solid var(--bcborders) !important;
border-radius: 6px !important;
}
`;

View File

@ -1442,8 +1442,8 @@
<button class="big-button back-btn" data-i18n="back">Back</button>
</div>
<div class="option-container">
<h3 class="header-small" id="fontsDropdown" data-i18n="dashboard_font" style="cursor:pointer; display:flex; align-items:center; gap:8px;">
Dashboard Font
<h3 class="header-small" id="fontsDropdown" style="cursor:pointer; display:flex; align-items:center; gap:8px;">
<span data-i18n="dashboard_font">Dashboard Font</span>
<img id="fontsDropdownArrow" style="transform:rotate(180deg);" src="../icon/dropdownArrow.svg" width="16px" height="16px">
<span style="margin-left:auto; display:flex; align-items:center; gap:6px; cursor:pointer;">
<input type="checkbox" id="custom_font_skip_p" name="custom_font_skip_p">

View File

@ -74,6 +74,7 @@ function setupNavigationListener() {
if (next === current_page) return;
current_page = next;
watchSequenceFooter();
applyHideAssignmentSidebar();
watchSubmissionPageButton();
watchProfileLogoutPageButton();
watchGradeAnalytics();
@ -378,6 +379,31 @@ function watchSequenceFooter() {
applyHideSequenceFooter();
}
// The assignment page's details column repeats what the assignment header already
// shows and takes half the width, so it is dropped there. CSS-only, so it survives
// Canvas re-renders and SPA navigation; removed again on any other page.
function isAssignmentShowPage() {
return /^\/courses\/\d+\/assignments\/\d+(?!\/submissions)(?:\/|$)/.test(current_page);
}
function applyHideAssignmentSidebar() {
let style = document.getElementById("canvasrefined-hide-assignment-sidebar");
if (!isAssignmentShowPage()) {
if (style) style.remove();
return;
}
if (!style) {
style = document.createElement("style");
style.id = "canvasrefined-hide-assignment-sidebar";
style.textContent = `
#right-side-wrapper { display: none !important; }
/* the freed column belongs to the page body */
#not_right_side { width: 100% !important; max-width: 100% !important; }
`;
(document.head || document.documentElement).appendChild(style);
}
}
// Persistent observer keeping both assignment nav buttons mounted;
// the delayed re-checks cover React hydration.
function maintainAssignmentNavButtons() {
@ -992,6 +1018,7 @@ function startExtension() {
// Watchers start before the async storage callbacks, so a later throw can't block them.
setupNavigationListener();
applyHideAssignmentSidebar();
watchSubmissionPageButton();
toggleDarkMode();
@ -1639,11 +1666,12 @@ async function applyCustomBackground() {
.page-title {
background: none !important;
}
.module-sequence-footer,
.module-sequence-footer .module-sequence-footer-content {
background-color: color-mix(in srgb, var(--bcbackground-0), transparent ${bgTransparent}%) !important;
backdrop-filter: blur(${bgBlur}px) !important;
-webkit-backdrop-filter: blur(${bgBlur}px) !important;
border-radius: 5px !important;
background: none !important;
border-top: none !important;
backdrop-filter: none !important;
-webkit-backdrop-filter: none !important;
}
.item-group-condensed,
.item-group-container {
@ -1685,6 +1713,10 @@ async function applyCustomBackground() {
-webkit-backdrop-filter: blur(${bgBlur}px) !important;
border-radius: 5px !important;
}
/* same flex View, other emotion hash: its opaque surface hides the image */
.css-43gqe2-view--flex-flex {
background: transparent !important;
}
/* flatten inner Views to one surface; keep avatars, role pills, buttons */
.css-fiozi7-view--flex-flex [class*="-view"]:not([class*="-avatar"]):not([data-testid="pill-container"]):not([data-testid="pill-container"] *):not([class*="-baseButton"]) {
background: none !important;
@ -10356,6 +10388,7 @@ const GS_KIND_CLASS = {
externalurl: "link",
externaltool: "external-tool",
grades: "grades",
home: "home",
};
function gsKindClass(kind) {
@ -10366,6 +10399,7 @@ function gsKindLabel(kind) {
if (kind === "course") return getMsg("search_type_course", "Course");
if (kind === "module") return getMsg("search_type_module", "Module");
if (kind === "grades") return getMsg("search_type_grades", "Grades");
if (kind === "home") return getMsg("search_type_home", "Home");
return prettyModuleItemType(kind);
}
@ -10969,6 +11003,23 @@ async function runGlobalSearch(query, resultsEl) {
resultsEl.innerHTML = `<div class="canvasrefined-gs-hint">${getMsg("search_hint", "Start typing to search your modules and assignments. Use @coursename to search a specific course, or @grades to open a course's grades page.")}</div>`;
return [];
}
// "@home" opens the dashboard and needs no index, so it answers before the
// empty-index guard below.
if (query.trim().toLowerCase() === "@home") {
const homeRows = [{
kind: "home",
cls: "home",
type: gsKindLabel("home"),
title: getMsg("dashboard", "Dashboard"),
course: "",
courseId: null,
url: `${domain}/`,
}];
resultsEl.innerHTML = homeRows.map((item, i) => globalSearchRowHtml(item, i)).join("");
bindGlobalSearchRows(resultsEl, homeRows);
return homeRows;
}
if (!index.length) {
resultsEl.innerHTML = indexing
? `<div class="canvasrefined-gs-loading">${getMsg("search_building", "Building search index…")}</div>`

View File

@ -155,7 +155,11 @@ function applyI18nOverride() {
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.dataset.i18n;
const msg = getMsg(key);
if (msg) el.textContent = msg;
if (!msg) return;
// textContent would destroy interactive or non-text children (the font
// dropdown's arrow and its "keep font" checkbox live inside a label).
if (el.querySelector("input,select,button,a,img,picture,svg,iframe,video,canvas")) return;
el.textContent = msg;
});
document.querySelectorAll('[data-i18n-placeholder]').forEach(el => {
const msg = getMsg(el.dataset.i18nPlaceholder);