This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const updatedTag = eTag.replace('W/"', '"').replace('\\"', ""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ref = { | |
/** @type {PlannerReference} */ | |
[this.#encodePlannerExternalReferenceUrl(driveItem.webUrl)]: { | |
"@odata.type": "#microsoft.graph.plannerExternalReference", | |
alias: name, | |
type: "Other", | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Encodes the URL ins the special planner format that is for oif but not quite | |
* following the encodeURIComponent() specification... | |
* @param {String} url | |
* @returns {String} | |
*/ | |
#encodePlannerExternalReferenceUrl = (url) => { | |
// Encode specific characters: : . _ | |
const encodedUrl = url.replace(/:/g, "%3A").replace(/\./g, "%2E").replace(/ /g, "%20"); | |
return encodedUrl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="trello.d.js" /> | |
/** @type {TrelloPowerUp} */ | |
const tpu = window.TrelloPowerUp; | |
tpu.initialize({ | |
'board-buttons': | |
/** | |
* Returns the board button | |
* @param {TrelloObject} t | |
* @returns {TrelloBoardButtonOption[]} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CopyWebpackPlugin = require("copy-webpack-plugin"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const fs = require("fs"); | |
module.exports = async (env, options) => { | |
const isProduction = options.mode === 'production'; | |
const config = { | |
devtool: isProduction ? false : 'source-map', | |
mode: isProduction ? "production" : "development", | |
entry: { | |
details: "./js/details.js", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "trello-hello-world", | |
"appName": "Hello World", | |
"version": "1.0", | |
"description": "A Power-Up to say hello.", | |
"scripts": { | |
"start": "webpack-dev-server --mode development", | |
"build": "node webpack --mode production" | |
}, | |
"dependencies": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../types/trello.d.js" /> | |
import Common from "../common/common"; | |
export default class SettingsPage { | |
constructor() { } | |
/** | |
* Renders the settings page | |
* @param {TrelloObject} t | |
*/ | |
render = async (t) => { | |
/** @type {String} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global TrelloPowerUp */ | |
/// <reference path="../types/trello.d.js" /> | |
import SettingsPage from "./pages/settingsPage"; | |
/** @type {TrelloPowerUp} */ | |
const tpu = window.TrelloPowerUp; | |
/** @type {TrelloObject} Trello iframe object */ | |
const t = tpu.iframe(); | |
t.render(() => { | |
/** @type { "settings" } */ | |
const page = t.arg("page"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global TrelloPowerUp */ | |
/// <reference path="../types/trello.d.js" /> | |
import Common from './common/common'; | |
/** @type {TrelloPowerUp} */ | |
const tpu = window.TrelloPowerUp; | |
tpu.initialize({ | |
'board-buttons': async (t) => await getBoardButton(t), | |
}); | |
/** | |
* Returns the board button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PACKAGE = require('../../package.json'); | |
/** | |
* CommonFunctions to be shared across all the project | |
*/ | |
export default class Common { | |
/** @type {String} */ | |
static APPNAME = PACKAGE.appName; | |
/** @type {String} */ | |
static VERSION = PACKAGE.version; | |
/** @type {String} */ |
NewerOlder