1
0
Fork 0

Pull Edikoyo-Main into Edikoyo-n04 #1

Merged
n04 merged 107 commits from Edikoyo/EdikoyoWiki:main into main 2024-09-07 23:41:19 +00:00
13 changed files with 1100 additions and 7 deletions
Showing only changes of commit 5fd19895fd - Show all commits

View file

@ -4,5 +4,8 @@
"obsidian-linter",
"dataview",
"dataview-serializer",
"iconic"
"iconic",
"ribbon-divider",
"pinned-notes",
"privacy-glasses"
]

View file

@ -0,0 +1,26 @@
{
"biggerIcons": "mobile",
"clickableIcons": "desktop",
"showAllFileIcons": false,
"showAllFolderIcons": false,
"minimalFolderIcons": false,
"showItemName": "desktop",
"biggerSearchResults": "mobile",
"maxSearchResults": 50,
"colorPicker1": "list",
"colorPicker2": "rgb",
"uncolorHover": false,
"uncolorDrag": false,
"uncolorSelect": false,
"rememberDeletedItems": false,
"appIcons": {},
"tabIcons": {},
"fileIcons": {},
"bookmarkIcons": {},
"propertyIcons": {},
"ribbonIcons": {
"pinned-notes:Countries": {
"icon": "lucide-trees"
}
}
}

View file

@ -0,0 +1,10 @@
{
"pinnedNotes": [
{
"id": "710a3527-2ed2-4ad6-a7c9-bcad95cfb914",
"icon": "",
"path": "Countries/_index",
"title": "Countries"
}
]
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,11 @@
{
"id": "pinned-notes",
"name": "Pinned Notes",
"version": "2.0.3",
"minAppVersion": "0.15.0",
"description": "Pin frequently-used notes on Ribbon actions",
"author": "vasilcoin002",
"authorUrl": "https://github.com/vasilcoin002",
"fundingUrl": "https://buymeacoffee.com/vasilcoin002",
"isDesktopOnly": true
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "privacy-glasses",
"name": "Privacy Glasses",
"version": "0.7.4",
"minAppVersion": "1.1",
"description": "Provides a button and command to obfuscate onscreen text for better privacy in public settings.",
"author": "Jill Alberts",
"authorUrl": "https://github.com/jillalberts/privacy-glasses",
"isDesktopOnly": false
}

View file

@ -0,0 +1,44 @@
.workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container, .cm-callout),
.workspace-leaf-content.is-non-md-view,
.workspace-leaf-content.is-md-view-headlines-only :is(.cm-line, .cm-callout),
.privacy-glasses-blur-all .workspace-tab-header-inner-title,
.privacy-glasses-blur-all #quick-explorer,
.privacy-glasses-reveal-headlines .workspace-tab-header-inner-title,
.privacy-glasses-reveal-headlines #quick-explorer {
filter: blur(calc(var(--blurLevel) * 1));
}
:is(.media-embed, .image-container) :is(img, video, svg, canvas) {
filter: blur(calc(var(--blurLevel) * 5));
}
.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container).inline-title:focus-within,
.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container).cm-active,
.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-non-md-view.inline-title:focus-within,
.privacy-glasses-reveal-under-caret .workspace-leaf-content.is-non-md-view.cm-active,
.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all .workspace-tab-header-inner-title.inline-title:focus-within,
.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all .workspace-tab-header-inner-title.cm-active,
.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all #quick-explorer.inline-title:focus-within,
.privacy-glasses-reveal-under-caret .privacy-glasses-blur-all #quick-explorer.cm-active,
.privacy-glasses-reveal-under-caret :is(.media-embed, .image-container) :is(img, video, svg, canvas).inline-title:focus-within,
.privacy-glasses-reveal-under-caret :is(.media-embed, .image-container) :is(img, video, svg, canvas).cm-active,
.privacy-glasses-reveal-on-hover .workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container, .cm-callout):hover,
.privacy-glasses-reveal-on-hover .workspace-leaf-content.is-non-md-view:hover,
.privacy-glasses-reveal-on-hover .workspace-leaf-content.is-md-view-headlines-only :is(.cm-line, .cm-callout):hover,
.privacy-glasses-reveal-on-hover .privacy-glasses-blur-all .workspace-tab-header-inner-title:hover,
.privacy-glasses-reveal-on-hover .privacy-glasses-reveal-headlines .workspace-tab-header-inner-title:hover,
.privacy-glasses-reveal-on-hover .privacy-glasses-blur-all #quick-explorer:hover,
.privacy-glasses-reveal-on-hover :is(.media-embed, .image-container) :is(img, video, svg, canvas):hover,
.privacy-glasses-reveal.workspace-leaf-content.is-md-view :is(.inline-title, .cm-line, .view-header-title-container),
.privacy-glasses-reveal.workspace-leaf-content.is-non-md-view,
.privacy-glasses-reveal.privacy-glasses-blur-all .workspace-tab-header-inner-title,
.privacy-glasses-reveal.privacy-glasses-blur-all #quick-explorer,
.privacy-glasses-reveal.privacy-glasses-reveal-headlines .workspace-tab-header-inner-title,
.privacy-glasses-reveal.privacy-glasses-reveal-headlines #quick-explorer,
.privacy-glasses-reveal :is(.media-embed, .image-container) :is(img, video, svg, canvas),
.workspace-tab-header .workspace-tab-header-inner-title:hover,
.workspace-leaf-content.is-md-view-headlines-only .HyperMD-header,
.privacy-glasses-reveal :is(.cm-callout),
.privacy-glasses-reveal-all :is(.cm-callout) {
filter: unset !important;
}

View file

@ -0,0 +1,7 @@
{
"dividers": {
"698b2a69-a92b-4b1b-bf0f-d93bf98733ef": {
"id": "698b2a69-a92b-4b1b-bf0f-d93bf98733ef"
}
}
}

View file

@ -0,0 +1,175 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: !0 });
}, __copyProps = (to, from, except, desc) => {
if (from && typeof from == "object" || typeof from == "function")
for (let key of __getOwnPropNames(from))
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
// main.ts
var main_exports = {};
__export(main_exports, {
default: () => DividerPlugin
});
module.exports = __toCommonJS(main_exports);
var import_obsidian = require("obsidian");
// node_modules/uuid/dist/esm-browser/rng.js
var getRandomValues, rnds8 = new Uint8Array(16);
function rng() {
if (!getRandomValues && (getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !getRandomValues))
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
return getRandomValues(rnds8);
}
// node_modules/uuid/dist/esm-browser/stringify.js
var byteToHex = [];
for (let i = 0; i < 256; ++i)
byteToHex.push((i + 256).toString(16).slice(1));
function unsafeStringify(arr, offset = 0) {
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
}
// node_modules/uuid/dist/esm-browser/native.js
var randomUUID = typeof crypto != "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto), native_default = {
randomUUID
};
// node_modules/uuid/dist/esm-browser/v4.js
function v4(options, buf, offset) {
if (native_default.randomUUID && !buf && !options)
return native_default.randomUUID();
options = options || {};
let rnds = options.random || (options.rng || rng)();
if (rnds[6] = rnds[6] & 15 | 64, rnds[8] = rnds[8] & 63 | 128, buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i)
buf[offset + i] = rnds[i];
return buf;
}
return unsafeStringify(rnds);
}
var v4_default = v4;
// main.ts
var DEFAULT_SETTINGS = {
dividers: {}
}, DividerPlugin = class extends import_obsidian.Plugin {
constructor() {
super(...arguments);
this.dividerElements = {};
}
async onload() {
await this.loadSettings(), this.versionCheck(), Object.keys(this.settings.dividers).forEach((dividerId) => {
let divider = this.settings.dividers[dividerId];
this.renderDivider(divider);
}), this.addSettingTab(new DividerSettingTab(this.app, this));
}
onunload() {
}
/**
* Load data from disk, stored in data.json in plugin folder
*/
async loadSettings() {
let data = await this.loadData() || {};
this.settings = Object.assign({}, DEFAULT_SETTINGS, data), this.settings.dividers || (this.settings.dividers = {});
}
/**
* Save data to disk, stored in data.json in plugin folder
*/
async saveSettings() {
await this.saveData(this.settings);
}
/**
* Check the local plugin version against github. If there is a new version, notify the user.
*/
async versionCheck() {
let localVersion = "1.1.1", stableVersion = await (0, import_obsidian.requestUrl)(
"https://raw.githubusercontent.com/andrewmcgivery/obsidian-ribbon-divider/main/package.json"
).then(async (res) => {
if (res.status === 200)
return (await res.json).version;
}), betaVersion = await (0, import_obsidian.requestUrl)(
"https://raw.githubusercontent.com/andrewmcgivery/obsidian-ribbon-divider/beta/package.json"
).then(async (res) => {
if (res.status === 200)
return (await res.json).version;
});
(localVersion == null ? void 0 : localVersion.indexOf("beta")) !== -1 ? localVersion !== betaVersion && new import_obsidian.Notice(
"There is a beta update available for the Ribbon Divider plugin. Please update to to the latest version to get the latest features!",
0
) : localVersion !== stableVersion && new import_obsidian.Notice(
"There is an update available for the Ribbon Divider plugin. Please update to to the latest version to get the latest features!",
0
);
}
/**
* Renders a divider on the ribbon. The HTMLElement is saved to this.dividerElemenets so we can remove it if the
* user deletes it from the settings screen.
* @param divider
*/
async renderDivider(divider) {
if (document.body.hasClass("is-phone"))
return;
let dividerIconEl = this.addRibbonIcon(
"",
`ribbon-divider-${divider.id}`,
(evt) => {
}
);
dividerIconEl.addClass("ribbon-divider"), dividerIconEl.addClass(`ribbon-divider-${divider.id}`), this.dividerElements[divider.id] = dividerIconEl;
}
/**
* Add a new divider and render it
* @param divider
*/
async addDivider(divider) {
this.renderDivider(divider), this.settings.dividers[divider.id] = divider, await this.saveSettings();
}
/**
* Remove an existing divider, both from settings, and from the UI by calling remove() on the saved HTMLElement
* @param dividerId
*/
async removeDivider(dividerId) {
delete this.settings.dividers[dividerId], this.saveSettings(), this.dividerElements[dividerId] && (this.dividerElements[dividerId].remove(), delete this.dividerElements[dividerId]);
}
}, DividerSettingTab = class extends import_obsidian.PluginSettingTab {
constructor(app, plugin) {
super(app, plugin);
this.plugin = plugin;
}
display() {
let { containerEl } = this;
containerEl.empty(), containerEl.createEl("p", {
attr: {
style: "display: block; margin-bottom: 5px"
},
text: 'Use this settings screen to add/update dividers to your ribbon. Clicking "New Divider" below will immediately add the divider.'
}), containerEl.createEl("hr");
let dividersContainerEl = containerEl.createDiv("dividers-container");
Object.keys(this.plugin.settings.dividers).forEach((dividerId) => {
let divider = this.plugin.settings.dividers[dividerId];
new import_obsidian.Setting(dividersContainerEl).setName("Divider").setDesc(`Id: ${divider.id}`).addButton((button) => {
button.setButtonText("Delete").onClick(async () => {
await this.plugin.removeDivider(divider.id), this.display();
});
});
}), containerEl.createEl("button", { text: "New divider", cls: "mod-cta" }).addEventListener("click", () => {
this.plugin.addDivider({
id: v4_default()
}), this.display();
});
}
};

View file

@ -0,0 +1,11 @@
{
"id": "ribbon-divider",
"name": "Ribbon Divider",
"version": "1.1.1",
"minAppVersion": "0.15.0",
"description": "Allows you to add dividers to the ribbon to space out your icons.",
"author": "Andrew McGivery",
"authorUrl": "https://github.com/andrewmcgivery",
"fundingUrl": "https://www.buymeacoffee.com/andrewmcgivery",
"isDesktopOnly": false
}

View file

@ -0,0 +1,17 @@
/* styles.scss */
.side-dock-actions .side-dock-ribbon-action.ribbon-divider {
height: 1px;
width: 70%;
padding: 4px 0;
}
.side-dock-actions .side-dock-ribbon-action.ribbon-divider:hover {
background-color: transparent;
}
.side-dock-actions .side-dock-ribbon-action.ribbon-divider:before {
content: "";
display: block;
height: 1px;
width: 100%;
background-color: var(--icon-color);
opacity: .5;
}

View file

@ -73,7 +73,7 @@
"state": {
"type": "markdown",
"state": {
"file": "Landmarks/Untitled.md",
"file": "Countries/_index.md",
"mode": "source",
"source": false
}
@ -146,7 +146,7 @@
"state": {
"type": "backlink",
"state": {
"file": "Landmarks/Untitled.md",
"file": "Countries/_index.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -163,7 +163,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Landmarks/Untitled.md",
"file": "Countries/_index.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
@ -186,7 +186,7 @@
"state": {
"type": "outline",
"state": {
"file": "Landmarks/Untitled.md"
"file": "Countries/_index.md"
}
}
},
@ -212,11 +212,19 @@
"graph:Open graph view": false,
"templates:Insert template": false,
"command-palette:Open command palette": false,
"obsidian-git:Open Git source control": false
"obsidian-git:Open Git source control": false,
"privacy-glasses:Reveal non-private": true,
"ribbon-divider:ribbon-divider-5b05ebe7-55cd-443b-9de6-33e3cb2c36c3": false,
"privacy-glasses:Reveal all": false,
"privacy-glasses:Hide all": false,
"privacy-glasses:Reveal headlines only": false,
"ribbon-divider:ribbon-divider-698b2a69-a92b-4b1b-bf0f-d93bf98733ef": false,
"pinned-notes:Countries": false
}
},
"active": "e18161b255f8c3cb",
"lastOpenFiles": [
"Landmarks/Untitled.md",
"Countries/Batanoka.md",
"Animals/Cat.md",
"Animals/Dog.md",
@ -242,7 +250,6 @@
"Countries/Nakadon.md",
"Countries/Mortham.md",
"Countries/Mantine.md",
"Countries/Llasuki.md",
"Images/Slimes/garden-1.png",
"Images/Slimes/sunflower-2.png",
"Images/Slimes/sunflower-1.png",